| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 /** \mainpage V8 API Reference Guide | 5 /** \mainpage V8 API Reference Guide |
| 6 * | 6 * |
| 7 * V8 is Google's open source JavaScript engine. | 7 * V8 is Google's open source JavaScript engine. |
| 8 * | 8 * |
| 9 * This set of documents provides reference material generated from the | 9 * This set of documents provides reference material generated from the |
| 10 * V8 header file, include/v8.h. | 10 * V8 header file, include/v8.h. |
| (...skipping 6602 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6613 struct CreateParams { | 6613 struct CreateParams { |
| 6614 CreateParams() | 6614 CreateParams() |
| 6615 : entry_hook(nullptr), | 6615 : entry_hook(nullptr), |
| 6616 code_event_handler(nullptr), | 6616 code_event_handler(nullptr), |
| 6617 snapshot_blob(nullptr), | 6617 snapshot_blob(nullptr), |
| 6618 counter_lookup_callback(nullptr), | 6618 counter_lookup_callback(nullptr), |
| 6619 create_histogram_callback(nullptr), | 6619 create_histogram_callback(nullptr), |
| 6620 add_histogram_sample_callback(nullptr), | 6620 add_histogram_sample_callback(nullptr), |
| 6621 array_buffer_allocator(nullptr), | 6621 array_buffer_allocator(nullptr), |
| 6622 external_references(nullptr), | 6622 external_references(nullptr), |
| 6623 allow_atomics_wait(true), | 6623 allow_atomics_wait(true) {} |
| 6624 host_import_module_dynamically_callback_(nullptr) {} | |
| 6625 | 6624 |
| 6626 /** | 6625 /** |
| 6627 * The optional entry_hook allows the host application to provide the | 6626 * The optional entry_hook allows the host application to provide the |
| 6628 * address of a function that's invoked on entry to every V8-generated | 6627 * address of a function that's invoked on entry to every V8-generated |
| 6629 * function. Note that entry_hook is invoked at the very start of each | 6628 * function. Note that entry_hook is invoked at the very start of each |
| 6630 * generated function. | 6629 * generated function. |
| 6631 * An entry_hook can only be provided in no-snapshot builds; in snapshot | 6630 * An entry_hook can only be provided in no-snapshot builds; in snapshot |
| 6632 * builds it must be nullptr. | 6631 * builds it must be nullptr. |
| 6633 */ | 6632 */ |
| 6634 FunctionEntryHook entry_hook; | 6633 FunctionEntryHook entry_hook; |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6677 * deserialization. This array and its content must stay valid for the | 6676 * deserialization. This array and its content must stay valid for the |
| 6678 * entire lifetime of the isolate. | 6677 * entire lifetime of the isolate. |
| 6679 */ | 6678 */ |
| 6680 intptr_t* external_references; | 6679 intptr_t* external_references; |
| 6681 | 6680 |
| 6682 /** | 6681 /** |
| 6683 * Whether calling Atomics.wait (a function that may block) is allowed in | 6682 * Whether calling Atomics.wait (a function that may block) is allowed in |
| 6684 * this isolate. This can also be configured via SetAllowAtomicsWait. | 6683 * this isolate. This can also be configured via SetAllowAtomicsWait. |
| 6685 */ | 6684 */ |
| 6686 bool allow_atomics_wait; | 6685 bool allow_atomics_wait; |
| 6687 | |
| 6688 /** | |
| 6689 * This is an unfinished experimental feature, and is only exposed | |
| 6690 * here for internal testing purposes. DO NOT USE. | |
| 6691 * | |
| 6692 * This specifies the callback called by the upcoming dynamic | |
| 6693 * import() language feature to load modules. | |
| 6694 */ | |
| 6695 HostImportModuleDynamicallyCallback | |
| 6696 host_import_module_dynamically_callback_; | |
| 6697 }; | 6686 }; |
| 6698 | 6687 |
| 6699 | 6688 |
| 6700 /** | 6689 /** |
| 6701 * Stack-allocated class which sets the isolate for all operations | 6690 * Stack-allocated class which sets the isolate for all operations |
| 6702 * executed within a local scope. | 6691 * executed within a local scope. |
| 6703 */ | 6692 */ |
| 6704 class V8_EXPORT Scope { | 6693 class V8_EXPORT Scope { |
| 6705 public: | 6694 public: |
| 6706 explicit Scope(Isolate* isolate) : isolate_(isolate) { | 6695 explicit Scope(Isolate* isolate) : isolate_(isolate) { |
| (...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6878 * then V8 will abort if either: | 6867 * then V8 will abort if either: |
| 6879 * - no custom callback is set. | 6868 * - no custom callback is set. |
| 6880 * - the custom callback set returns true. | 6869 * - the custom callback set returns true. |
| 6881 * Otherwise, the custom callback will not be called and V8 will not abort. | 6870 * Otherwise, the custom callback will not be called and V8 will not abort. |
| 6882 */ | 6871 */ |
| 6883 typedef bool (*AbortOnUncaughtExceptionCallback)(Isolate*); | 6872 typedef bool (*AbortOnUncaughtExceptionCallback)(Isolate*); |
| 6884 void SetAbortOnUncaughtExceptionCallback( | 6873 void SetAbortOnUncaughtExceptionCallback( |
| 6885 AbortOnUncaughtExceptionCallback callback); | 6874 AbortOnUncaughtExceptionCallback callback); |
| 6886 | 6875 |
| 6887 /** | 6876 /** |
| 6877 * This is an unfinished experimental feature, and is only exposed |
| 6878 * here for internal testing purposes. DO NOT USE. |
| 6879 * |
| 6880 * This specifies the callback called by the upcoming dynamic |
| 6881 * import() language feature to load modules. |
| 6882 */ |
| 6883 void SetHostImportModuleDynamicallyCallback( |
| 6884 HostImportModuleDynamicallyCallback callback); |
| 6885 |
| 6886 /** |
| 6888 * Optional notification that the system is running low on memory. | 6887 * Optional notification that the system is running low on memory. |
| 6889 * V8 uses these notifications to guide heuristics. | 6888 * V8 uses these notifications to guide heuristics. |
| 6890 * It is allowed to call this function from another thread while | 6889 * It is allowed to call this function from another thread while |
| 6891 * the isolate is executing long running JavaScript code. | 6890 * the isolate is executing long running JavaScript code. |
| 6892 */ | 6891 */ |
| 6893 void MemoryPressureNotification(MemoryPressureLevel level); | 6892 void MemoryPressureNotification(MemoryPressureLevel level); |
| 6894 | 6893 |
| 6895 /** | 6894 /** |
| 6896 * Methods below this point require holding a lock (using Locker) in | 6895 * Methods below this point require holding a lock (using Locker) in |
| 6897 * a multi-threaded environment. | 6896 * a multi-threaded environment. |
| (...skipping 3248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10146 */ | 10145 */ |
| 10147 | 10146 |
| 10148 | 10147 |
| 10149 } // namespace v8 | 10148 } // namespace v8 |
| 10150 | 10149 |
| 10151 | 10150 |
| 10152 #undef TYPE_CHECK | 10151 #undef TYPE_CHECK |
| 10153 | 10152 |
| 10154 | 10153 |
| 10155 #endif // INCLUDE_V8_H_ | 10154 #endif // INCLUDE_V8_H_ |
| OLD | NEW |