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 4410 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4421 * collection performance. Use IdleNotification() or LowMemoryNotification() | 4421 * collection performance. Use IdleNotification() or LowMemoryNotification() |
4422 * instead to influence the garbage collection schedule. | 4422 * instead to influence the garbage collection schedule. |
4423 */ | 4423 */ |
4424 void RequestGarbageCollectionForTesting(GarbageCollectionType type); | 4424 void RequestGarbageCollectionForTesting(GarbageCollectionType type); |
4425 | 4425 |
4426 /** | 4426 /** |
4427 * Set the callback to invoke for logging event. | 4427 * Set the callback to invoke for logging event. |
4428 */ | 4428 */ |
4429 void SetEventLogger(LogEventCallback that); | 4429 void SetEventLogger(LogEventCallback that); |
4430 | 4430 |
| 4431 /** |
| 4432 * Adds a callback to notify the host application when a script finished |
| 4433 * running. If a script re-enters the runtime during executing, the |
| 4434 * CallCompletedCallback is only invoked when the outer-most script |
| 4435 * execution ends. Executing scripts inside the callback do not trigger |
| 4436 * further callbacks. |
| 4437 */ |
| 4438 void AddCallCompletedCallback(CallCompletedCallback callback); |
| 4439 |
| 4440 /** |
| 4441 * Removes callback that was installed by AddCallCompletedCallback. |
| 4442 */ |
| 4443 void RemoveCallCompletedCallback(CallCompletedCallback callback); |
| 4444 |
4431 private: | 4445 private: |
4432 template<class K, class V, class Traits> friend class PersistentValueMap; | 4446 template<class K, class V, class Traits> friend class PersistentValueMap; |
4433 | 4447 |
4434 Isolate(); | 4448 Isolate(); |
4435 Isolate(const Isolate&); | 4449 Isolate(const Isolate&); |
4436 ~Isolate(); | 4450 ~Isolate(); |
4437 Isolate& operator=(const Isolate&); | 4451 Isolate& operator=(const Isolate&); |
4438 void* operator new(size_t size); | 4452 void* operator new(size_t size); |
4439 void operator delete(void*, size_t); | 4453 void operator delete(void*, size_t); |
4440 | 4454 |
(...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4788 * Removes callback that was installed by AddMemoryAllocationCallback. | 4802 * Removes callback that was installed by AddMemoryAllocationCallback. |
4789 */ | 4803 */ |
4790 static void RemoveMemoryAllocationCallback(MemoryAllocationCallback callback); | 4804 static void RemoveMemoryAllocationCallback(MemoryAllocationCallback callback); |
4791 | 4805 |
4792 /** | 4806 /** |
4793 * Adds a callback to notify the host application when a script finished | 4807 * Adds a callback to notify the host application when a script finished |
4794 * running. If a script re-enters the runtime during executing, the | 4808 * running. If a script re-enters the runtime during executing, the |
4795 * CallCompletedCallback is only invoked when the outer-most script | 4809 * CallCompletedCallback is only invoked when the outer-most script |
4796 * execution ends. Executing scripts inside the callback do not trigger | 4810 * execution ends. Executing scripts inside the callback do not trigger |
4797 * further callbacks. | 4811 * further callbacks. |
| 4812 * |
| 4813 * Will be deprecated soon. Use Isolate::AddCallCompletedCallback. |
4798 */ | 4814 */ |
4799 static void AddCallCompletedCallback(CallCompletedCallback callback); | 4815 static void AddCallCompletedCallback(CallCompletedCallback callback); |
4800 | 4816 |
4801 /** | 4817 /** |
4802 * Removes callback that was installed by AddCallCompletedCallback. | 4818 * Removes callback that was installed by AddCallCompletedCallback. |
| 4819 * |
| 4820 * Will be deprecated soon. Use Isolate::RemoveCallCompletedCallback. |
4803 */ | 4821 */ |
4804 static void RemoveCallCompletedCallback(CallCompletedCallback callback); | 4822 static void RemoveCallCompletedCallback(CallCompletedCallback callback); |
4805 | 4823 |
4806 /** | 4824 /** |
4807 * Experimental: Runs the Microtask Work Queue until empty | 4825 * Experimental: Runs the Microtask Work Queue until empty |
4808 */ | 4826 */ |
4809 static void RunMicrotasks(Isolate* isolate); | 4827 static void RunMicrotasks(Isolate* isolate); |
4810 | 4828 |
4811 /** | 4829 /** |
4812 * Experimental: Enqueues the callback to the Microtask Work Queue | 4830 * Experimental: Enqueues the callback to the Microtask Work Queue |
(...skipping 1853 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6666 */ | 6684 */ |
6667 | 6685 |
6668 | 6686 |
6669 } // namespace v8 | 6687 } // namespace v8 |
6670 | 6688 |
6671 | 6689 |
6672 #undef TYPE_CHECK | 6690 #undef TYPE_CHECK |
6673 | 6691 |
6674 | 6692 |
6675 #endif // V8_H_ | 6693 #endif // V8_H_ |
OLD | NEW |