| 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 6258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6269 * - To avoid unnecessary copies of data, V8 will point directly into the | 6269 * - To avoid unnecessary copies of data, V8 will point directly into the |
| 6270 * given data blob, so pretty please keep it around until V8 exit. | 6270 * given data blob, so pretty please keep it around until V8 exit. |
| 6271 * - Compression of the startup blob might be useful, but needs to | 6271 * - Compression of the startup blob might be useful, but needs to |
| 6272 * handled entirely on the embedders' side. | 6272 * handled entirely on the embedders' side. |
| 6273 * - The call will abort if the data is invalid. | 6273 * - The call will abort if the data is invalid. |
| 6274 */ | 6274 */ |
| 6275 static void SetNativesDataBlob(StartupData* startup_blob); | 6275 static void SetNativesDataBlob(StartupData* startup_blob); |
| 6276 static void SetSnapshotDataBlob(StartupData* startup_blob); | 6276 static void SetSnapshotDataBlob(StartupData* startup_blob); |
| 6277 | 6277 |
| 6278 /** | 6278 /** |
| 6279 * Create a new isolate and context for the purpose of capturing a snapshot | 6279 * Bootstrap an isolate and a context from scratch to create a startup |
| 6280 * snapshot. Include the side-effects of running the optional script. |
| 6280 * Returns { NULL, 0 } on failure. | 6281 * Returns { NULL, 0 } on failure. |
| 6281 * The caller owns the data array in the return value. | 6282 * The caller acquires ownership of the data array in the return value. |
| 6282 */ | 6283 */ |
| 6283 static StartupData CreateSnapshotDataBlob(const char* custom_source = NULL); | 6284 static StartupData CreateSnapshotDataBlob(const char* embedded_source = NULL); |
| 6285 |
| 6286 /** |
| 6287 * Bootstrap an isolate and a context from the cold startup blob, run the |
| 6288 * warm-up script to trigger code compilation. The side effects are then |
| 6289 * discarded. The resulting startup snapshot will include compiled code. |
| 6290 * Returns { NULL, 0 } on failure. |
| 6291 * The caller acquires ownership of the data array in the return value. |
| 6292 * The argument startup blob is untouched. |
| 6293 */ |
| 6294 static StartupData WarmUpSnapshotDataBlob(StartupData cold_startup_blob, |
| 6295 const char* warmup_source); |
| 6284 | 6296 |
| 6285 /** | 6297 /** |
| 6286 * Adds a message listener. | 6298 * Adds a message listener. |
| 6287 * | 6299 * |
| 6288 * The same message listener can be added more than once and in that | 6300 * The same message listener can be added more than once and in that |
| 6289 * case it will be called more than once for each message. | 6301 * case it will be called more than once for each message. |
| 6290 * | 6302 * |
| 6291 * If data is specified, it will be passed to the callback when it is called. | 6303 * If data is specified, it will be passed to the callback when it is called. |
| 6292 * Otherwise, the exception object will be passed to the callback instead. | 6304 * Otherwise, the exception object will be passed to the callback instead. |
| 6293 */ | 6305 */ |
| (...skipping 2364 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8658 */ | 8670 */ |
| 8659 | 8671 |
| 8660 | 8672 |
| 8661 } // namespace v8 | 8673 } // namespace v8 |
| 8662 | 8674 |
| 8663 | 8675 |
| 8664 #undef TYPE_CHECK | 8676 #undef TYPE_CHECK |
| 8665 | 8677 |
| 8666 | 8678 |
| 8667 #endif // INCLUDE_V8_H_ | 8679 #endif // INCLUDE_V8_H_ |
| OLD | NEW |