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 4081 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4092 private: | 4092 private: |
4093 int max_semi_space_size_; | 4093 int max_semi_space_size_; |
4094 int max_old_space_size_; | 4094 int max_old_space_size_; |
4095 int max_executable_size_; | 4095 int max_executable_size_; |
4096 uint32_t* stack_limit_; | 4096 uint32_t* stack_limit_; |
4097 int max_available_threads_; | 4097 int max_available_threads_; |
4098 size_t code_range_size_; | 4098 size_t code_range_size_; |
4099 }; | 4099 }; |
4100 | 4100 |
4101 | 4101 |
4102 /** | |
4103 * Sets the given ResourceConstraints on the given Isolate. | |
4104 * | |
4105 * Deprecated, will be removed. Pass constraints via Isolate::New or modify | |
4106 * the stack limit via Isolate::SetStackLimit. | |
4107 */ | |
4108 bool V8_EXPORT SetResourceConstraints(Isolate* isolate, | |
4109 ResourceConstraints* constraints); | |
4110 | |
4111 | |
4112 // --- Exceptions --- | 4102 // --- Exceptions --- |
4113 | 4103 |
4114 | 4104 |
4115 typedef void (*FatalErrorCallback)(const char* location, const char* message); | 4105 typedef void (*FatalErrorCallback)(const char* location, const char* message); |
4116 | 4106 |
4117 | 4107 |
4118 typedef void (*MessageCallback)(Handle<Message> message, Handle<Value> error); | 4108 typedef void (*MessageCallback)(Handle<Message> message, Handle<Value> error); |
4119 | 4109 |
4120 // --- Tracing --- | 4110 // --- Tracing --- |
4121 | 4111 |
(...skipping 1001 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5123 static void SetEntropySource(EntropySource source); | 5113 static void SetEntropySource(EntropySource source); |
5124 | 5114 |
5125 /** | 5115 /** |
5126 * Allows the host application to provide a callback that allows v8 to | 5116 * Allows the host application to provide a callback that allows v8 to |
5127 * cooperate with a profiler that rewrites return addresses on stack. | 5117 * cooperate with a profiler that rewrites return addresses on stack. |
5128 */ | 5118 */ |
5129 static void SetReturnAddressLocationResolver( | 5119 static void SetReturnAddressLocationResolver( |
5130 ReturnAddressLocationResolver return_address_resolver); | 5120 ReturnAddressLocationResolver return_address_resolver); |
5131 | 5121 |
5132 /** | 5122 /** |
5133 * Allows the host application to provide the address of a function that's | |
5134 * invoked on entry to every V8-generated function. | |
5135 * Note that \p entry_hook is invoked at the very start of each | |
5136 * generated function. | |
5137 * | |
5138 * \param isolate the isolate to operate on. | |
5139 * \param entry_hook a function that will be invoked on entry to every | |
5140 * V8-generated function. | |
5141 * \returns true on success on supported platforms, false on failure. | |
5142 * \note Setting an entry hook can only be done very early in an isolates | |
5143 * lifetime, and once set, the entry hook cannot be revoked. | |
5144 * | |
5145 * Deprecated, will be removed. Use Isolate::New(entry_hook) instead. | |
5146 */ | |
5147 static bool SetFunctionEntryHook(Isolate* isolate, | |
5148 FunctionEntryHook entry_hook); | |
5149 | |
5150 /** | |
5151 * Allows the host application to provide the address of a function that is | |
5152 * notified each time code is added, moved or removed. | |
5153 * | |
5154 * \param options options for the JIT code event handler. | |
5155 * \param event_handler the JIT code event handler, which will be invoked | |
5156 * each time code is added, moved or removed. | |
5157 * \note \p event_handler won't get notified of existent code. | |
5158 * \note since code removal notifications are not currently issued, the | |
5159 * \p event_handler may get notifications of code that overlaps earlier | |
5160 * code notifications. This happens when code areas are reused, and the | |
5161 * earlier overlapping code areas should therefore be discarded. | |
5162 * \note the events passed to \p event_handler and the strings they point to | |
5163 * are not guaranteed to live past each call. The \p event_handler must | |
5164 * copy strings and other parameters it needs to keep around. | |
5165 * \note the set of events declared in JitCodeEvent::EventType is expected to | |
5166 * grow over time, and the JitCodeEvent structure is expected to accrue | |
5167 * new members. The \p event_handler function must ignore event codes | |
5168 * it does not recognize to maintain future compatibility. | |
5169 * | |
5170 * Deprecated, will be removed. Use Isolate::SetJitCodeEventHandler or | |
5171 * Isolate::CreateParams instead. | |
5172 */ | |
5173 static void SetJitCodeEventHandler(JitCodeEventOptions options, | |
5174 JitCodeEventHandler event_handler); | |
5175 | |
5176 /** | |
5177 * Forcefully terminate the current thread of JavaScript execution | 5123 * Forcefully terminate the current thread of JavaScript execution |
5178 * in the given isolate. | 5124 * in the given isolate. |
5179 * | 5125 * |
5180 * This method can be used by any thread even if that thread has not | 5126 * This method can be used by any thread even if that thread has not |
5181 * acquired the V8 lock with a Locker object. | 5127 * acquired the V8 lock with a Locker object. |
5182 * | 5128 * |
5183 * \param isolate The isolate in which to terminate the current JS execution. | 5129 * \param isolate The isolate in which to terminate the current JS execution. |
5184 */ | 5130 */ |
5185 static void TerminateExecution(Isolate* isolate); | 5131 static void TerminateExecution(Isolate* isolate); |
5186 | 5132 |
(...skipping 1816 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7003 */ | 6949 */ |
7004 | 6950 |
7005 | 6951 |
7006 } // namespace v8 | 6952 } // namespace v8 |
7007 | 6953 |
7008 | 6954 |
7009 #undef TYPE_CHECK | 6955 #undef TYPE_CHECK |
7010 | 6956 |
7011 | 6957 |
7012 #endif // V8_H_ | 6958 #endif // V8_H_ |
OLD | NEW |