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 3840 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3851 kAllocationActionAll = kAllocationActionAllocate | kAllocationActionFree | 3851 kAllocationActionAll = kAllocationActionAllocate | kAllocationActionFree |
3852 }; | 3852 }; |
3853 | 3853 |
3854 typedef void (*MemoryAllocationCallback)(ObjectSpace space, | 3854 typedef void (*MemoryAllocationCallback)(ObjectSpace space, |
3855 AllocationAction action, | 3855 AllocationAction action, |
3856 int size); | 3856 int size); |
3857 | 3857 |
3858 // --- Leave Script Callback --- | 3858 // --- Leave Script Callback --- |
3859 typedef void (*CallCompletedCallback)(); | 3859 typedef void (*CallCompletedCallback)(); |
3860 | 3860 |
3861 // --- External Microtask Callback --- | |
3862 typedef void (*MicrotaskCallback)(); | |
Sven Panne
2014/02/10 14:22:02
We should probably add an Isolate* parameter. Ever
rafaelw
2014/02/11 00:28:52
Done.
| |
3863 | |
3861 // --- Failed Access Check Callback --- | 3864 // --- Failed Access Check Callback --- |
3862 typedef void (*FailedAccessCheckCallback)(Local<Object> target, | 3865 typedef void (*FailedAccessCheckCallback)(Local<Object> target, |
3863 AccessType type, | 3866 AccessType type, |
3864 Local<Value> data); | 3867 Local<Value> data); |
3865 | 3868 |
3866 // --- AllowCodeGenerationFromStrings callbacks --- | 3869 // --- AllowCodeGenerationFromStrings callbacks --- |
3867 | 3870 |
3868 /** | 3871 /** |
3869 * Callback to check if code generation from strings is allowed. See | 3872 * Callback to check if code generation from strings is allowed. See |
3870 * Context::AllowCodeGenerationFromStrings. | 3873 * Context::AllowCodeGenerationFromStrings. |
(...skipping 701 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4572 * further callbacks. | 4575 * further callbacks. |
4573 */ | 4576 */ |
4574 static void AddCallCompletedCallback(CallCompletedCallback callback); | 4577 static void AddCallCompletedCallback(CallCompletedCallback callback); |
4575 | 4578 |
4576 /** | 4579 /** |
4577 * Removes callback that was installed by AddCallCompletedCallback. | 4580 * Removes callback that was installed by AddCallCompletedCallback. |
4578 */ | 4581 */ |
4579 static void RemoveCallCompletedCallback(CallCompletedCallback callback); | 4582 static void RemoveCallCompletedCallback(CallCompletedCallback callback); |
4580 | 4583 |
4581 /** | 4584 /** |
4585 * Runs the Microtask Work Queue until empty | |
rossberg
2014/02/10 14:09:01
The new functions could use comments pointing out
rafaelw
2014/02/11 00:28:52
Done.
| |
4586 */ | |
4587 static void RunMicrotasks(Isolate* isolate); | |
4588 | |
4589 /** | |
4590 * Enqueues the callback to the Microtask Work Queue | |
4591 */ | |
4592 static void EnqueueExternalMicrotask(Isolate* isolate, | |
4593 MicrotaskCallback callback); | |
4594 | |
4595 /** | |
4596 * Controls whether the Microtask Work Queue is automatically run when the | |
4597 * script call depth decrements to zero. | |
4598 */ | |
4599 static void SetAutorunMicrotasks(Isolate *source, bool autorun); | |
4600 | |
4601 /** | |
4582 * Initializes from snapshot if possible. Otherwise, attempts to | 4602 * Initializes from snapshot if possible. Otherwise, attempts to |
4583 * initialize from scratch. This function is called implicitly if | 4603 * initialize from scratch. This function is called implicitly if |
4584 * you use the API without calling it first. | 4604 * you use the API without calling it first. |
4585 */ | 4605 */ |
4586 static bool Initialize(); | 4606 static bool Initialize(); |
4587 | 4607 |
4588 /** | 4608 /** |
4589 * Allows the host application to provide a callback which can be used | 4609 * Allows the host application to provide a callback which can be used |
4590 * as a source of entropy for random number generators. | 4610 * as a source of entropy for random number generators. |
4591 */ | 4611 */ |
(...skipping 1847 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
6439 */ | 6459 */ |
6440 | 6460 |
6441 | 6461 |
6442 } // namespace v8 | 6462 } // namespace v8 |
6443 | 6463 |
6444 | 6464 |
6445 #undef TYPE_CHECK | 6465 #undef TYPE_CHECK |
6446 | 6466 |
6447 | 6467 |
6448 #endif // V8_H_ | 6468 #endif // V8_H_ |
OLD | NEW |