OLD | NEW |
---|---|
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 3723 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3734 void operator=(const Locker&); | 3734 void operator=(const Locker&); |
3735 }; | 3735 }; |
3736 | 3736 |
3737 | 3737 |
3738 /** | 3738 /** |
3739 * An interface for exporting data from V8, using "push" model. | 3739 * An interface for exporting data from V8, using "push" model. |
3740 */ | 3740 */ |
3741 class V8EXPORT OutputStream { // NOLINT | 3741 class V8EXPORT OutputStream { // NOLINT |
3742 public: | 3742 public: |
3743 enum OutputEncoding { | 3743 enum OutputEncoding { |
3744 kAscii = 0 // 7-bit ASCII. | 3744 kAscii = 0, // 7-bit ASCII. |
3745 kUint32 = 1 | |
3745 }; | 3746 }; |
3746 enum WriteResult { | 3747 enum WriteResult { |
3747 kContinue = 0, | 3748 kContinue = 0, |
3748 kAbort = 1 | 3749 kAbort = 1 |
3749 }; | 3750 }; |
3750 virtual ~OutputStream() {} | 3751 virtual ~OutputStream() {} |
3751 /** Notify about the end of stream. */ | 3752 /** Notify about the end of stream. */ |
3752 virtual void EndOfStream() = 0; | 3753 virtual void EndOfStream() = 0; |
3753 /** Get preferred output chunk size. Called only once. */ | 3754 /** Get preferred output chunk size. Called only once. */ |
3754 virtual int GetChunkSize() { return 1024; } | 3755 virtual int GetChunkSize() { return 1024; } |
3755 /** Get preferred output encoding. Called only once. */ | 3756 /** Get preferred output encoding. Called only once. */ |
3756 virtual OutputEncoding GetOutputEncoding() { return kAscii; } | 3757 virtual OutputEncoding GetOutputEncoding() { return kAscii; } |
3757 /** | 3758 /** |
3758 * Writes the next chunk of snapshot data into the stream. Writing | 3759 * Writes the next chunk of snapshot data into the stream. Writing |
3759 * can be stopped by returning kAbort as function result. EndOfStream | 3760 * can be stopped by returning kAbort as function result. EndOfStream |
3760 * will not be called in case writing was aborted. | 3761 * will not be called in case writing was aborted. |
3761 */ | 3762 */ |
3762 virtual WriteResult WriteAsciiChunk(char* data, int size) = 0; | 3763 virtual WriteResult WriteAsciiChunk(char* data, int size) = 0; |
3764 /** | |
3765 * Writes the next chunk of heap stats data into the stream. Writing | |
3766 * can be stopped by returning kAbort as function result. EndOfStream | |
3767 * will not be called in case writing was aborted. | |
3768 */ | |
3769 virtual WriteResult WriteUint32Chunk(uint32_t* data, int size) = 0; | |
mnaganov (inactive)
2012/04/12 13:32:26
Is this really data size or items count? Looking a
| |
3763 }; | 3770 }; |
3764 | 3771 |
3765 | 3772 |
3766 /** | 3773 /** |
3767 * An interface for reporting progress and controlling long-running | 3774 * An interface for reporting progress and controlling long-running |
3768 * activities. | 3775 * activities. |
3769 */ | 3776 */ |
3770 class V8EXPORT ActivityControl { // NOLINT | 3777 class V8EXPORT ActivityControl { // NOLINT |
3771 public: | 3778 public: |
3772 enum ControlOption { | 3779 enum ControlOption { |
(...skipping 538 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4311 | 4318 |
4312 | 4319 |
4313 } // namespace v8 | 4320 } // namespace v8 |
4314 | 4321 |
4315 | 4322 |
4316 #undef V8EXPORT | 4323 #undef V8EXPORT |
4317 #undef TYPE_CHECK | 4324 #undef TYPE_CHECK |
4318 | 4325 |
4319 | 4326 |
4320 #endif // V8_H_ | 4327 #endif // V8_H_ |
OLD | NEW |