| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 3724 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3735 | 3735 |
| 3736 static bool active_; | 3736 static bool active_; |
| 3737 | 3737 |
| 3738 // Disallow copying and assigning. | 3738 // Disallow copying and assigning. |
| 3739 Locker(const Locker&); | 3739 Locker(const Locker&); |
| 3740 void operator=(const Locker&); | 3740 void operator=(const Locker&); |
| 3741 }; | 3741 }; |
| 3742 | 3742 |
| 3743 | 3743 |
| 3744 /** | 3744 /** |
| 3745 * A struct for exporting HeapStats data from V8, using "push" model. |
| 3746 */ |
| 3747 struct HeapStatsUpdate; |
| 3748 |
| 3749 |
| 3750 /** |
| 3745 * An interface for exporting data from V8, using "push" model. | 3751 * An interface for exporting data from V8, using "push" model. |
| 3746 */ | 3752 */ |
| 3747 class V8EXPORT OutputStream { // NOLINT | 3753 class V8EXPORT OutputStream { // NOLINT |
| 3748 public: | 3754 public: |
| 3749 enum OutputEncoding { | 3755 enum OutputEncoding { |
| 3750 kAscii = 0, // 7-bit ASCII. | 3756 kAscii = 0 // 7-bit ASCII. |
| 3751 kUint32 = 1 | |
| 3752 }; | 3757 }; |
| 3753 enum WriteResult { | 3758 enum WriteResult { |
| 3754 kContinue = 0, | 3759 kContinue = 0, |
| 3755 kAbort = 1 | 3760 kAbort = 1 |
| 3756 }; | 3761 }; |
| 3757 virtual ~OutputStream() {} | 3762 virtual ~OutputStream() {} |
| 3758 /** Notify about the end of stream. */ | 3763 /** Notify about the end of stream. */ |
| 3759 virtual void EndOfStream() = 0; | 3764 virtual void EndOfStream() = 0; |
| 3760 /** Get preferred output chunk size. Called only once. */ | 3765 /** Get preferred output chunk size. Called only once. */ |
| 3761 virtual int GetChunkSize() { return 1024; } | 3766 virtual int GetChunkSize() { return 1024; } |
| 3762 /** Get preferred output encoding. Called only once. */ | 3767 /** Get preferred output encoding. Called only once. */ |
| 3763 virtual OutputEncoding GetOutputEncoding() { return kAscii; } | 3768 virtual OutputEncoding GetOutputEncoding() { return kAscii; } |
| 3764 /** | 3769 /** |
| 3765 * Writes the next chunk of snapshot data into the stream. Writing | 3770 * Writes the next chunk of snapshot data into the stream. Writing |
| 3766 * can be stopped by returning kAbort as function result. EndOfStream | 3771 * can be stopped by returning kAbort as function result. EndOfStream |
| 3767 * will not be called in case writing was aborted. | 3772 * will not be called in case writing was aborted. |
| 3768 */ | 3773 */ |
| 3769 virtual WriteResult WriteAsciiChunk(char* data, int size) = 0; | 3774 virtual WriteResult WriteAsciiChunk(char* data, int size) = 0; |
| 3770 /** | 3775 /** |
| 3771 * Writes the next chunk of heap stats data into the stream. Writing | 3776 * Writes the next chunk of heap stats data into the stream. Writing |
| 3772 * can be stopped by returning kAbort as function result. EndOfStream | 3777 * can be stopped by returning kAbort as function result. EndOfStream |
| 3773 * will not be called in case writing was aborted. | 3778 * will not be called in case writing was aborted. |
| 3774 */ | 3779 */ |
| 3775 // TODO(loislo): Make this pure virtual when WebKit's V8 bindings | 3780 virtual WriteResult WriteHeapStatsChunk(HeapStatsUpdate* data, int count) { |
| 3776 // have been updated. | |
| 3777 virtual WriteResult WriteUint32Chunk(uint32_t* data, int count) { | |
| 3778 return kAbort; | 3781 return kAbort; |
| 3779 }; | 3782 }; |
| 3780 }; | 3783 }; |
| 3781 | 3784 |
| 3782 | 3785 |
| 3783 /** | 3786 /** |
| 3784 * An interface for reporting progress and controlling long-running | 3787 * An interface for reporting progress and controlling long-running |
| 3785 * activities. | 3788 * activities. |
| 3786 */ | 3789 */ |
| 3787 class V8EXPORT ActivityControl { // NOLINT | 3790 class V8EXPORT ActivityControl { // NOLINT |
| (...skipping 550 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4338 | 4341 |
| 4339 | 4342 |
| 4340 } // namespace v8 | 4343 } // namespace v8 |
| 4341 | 4344 |
| 4342 | 4345 |
| 4343 #undef V8EXPORT | 4346 #undef V8EXPORT |
| 4344 #undef TYPE_CHECK | 4347 #undef TYPE_CHECK |
| 4345 | 4348 |
| 4346 | 4349 |
| 4347 #endif // V8_H_ | 4350 #endif // V8_H_ |
| OLD | NEW |