Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(272)

Side by Side Diff: include/v8.h

Issue 949623006: Attach snapshot data blob to the isolate. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | src/api.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 class NumberObject; 85 class NumberObject;
86 class Object; 86 class Object;
87 class ObjectOperationDescriptor; 87 class ObjectOperationDescriptor;
88 class ObjectTemplate; 88 class ObjectTemplate;
89 class Platform; 89 class Platform;
90 class Primitive; 90 class Primitive;
91 class Promise; 91 class Promise;
92 class RawOperationDescriptor; 92 class RawOperationDescriptor;
93 class Script; 93 class Script;
94 class Signature; 94 class Signature;
95 class StartupData;
95 class StackFrame; 96 class StackFrame;
96 class StackTrace; 97 class StackTrace;
97 class String; 98 class String;
98 class StringObject; 99 class StringObject;
99 class Symbol; 100 class Symbol;
100 class SymbolObject; 101 class SymbolObject;
101 class Private; 102 class Private;
102 class Uint32; 103 class Uint32;
103 class Utils; 104 class Utils;
104 class Value; 105 class Value;
(...skipping 4532 matching lines...) Expand 10 before | Expand all | Expand 10 after
4637 * thread at any given time. The Locker/Unlocker API must be used to 4638 * thread at any given time. The Locker/Unlocker API must be used to
4638 * synchronize. 4639 * synchronize.
4639 */ 4640 */
4640 class V8_EXPORT Isolate { 4641 class V8_EXPORT Isolate {
4641 public: 4642 public:
4642 /** 4643 /**
4643 * Initial configuration parameters for a new Isolate. 4644 * Initial configuration parameters for a new Isolate.
4644 */ 4645 */
4645 struct CreateParams { 4646 struct CreateParams {
4646 CreateParams() 4647 CreateParams()
4647 : entry_hook(NULL), 4648 : entry_hook(NULL), code_event_handler(NULL), snapshot_blob(NULL) {}
4648 code_event_handler(NULL),
4649 enable_serializer(false) {}
4650 4649
4651 /** 4650 /**
4652 * The optional entry_hook allows the host application to provide the 4651 * The optional entry_hook allows the host application to provide the
4653 * address of a function that's invoked on entry to every V8-generated 4652 * address of a function that's invoked on entry to every V8-generated
4654 * function. Note that entry_hook is invoked at the very start of each 4653 * function. Note that entry_hook is invoked at the very start of each
4655 * generated function. Furthermore, if an entry_hook is given, V8 will 4654 * generated function. Furthermore, if an entry_hook is given, V8 will
4656 * always run without a context snapshot. 4655 * always run without a context snapshot.
4657 */ 4656 */
4658 FunctionEntryHook entry_hook; 4657 FunctionEntryHook entry_hook;
4659 4658
4660 /** 4659 /**
4661 * Allows the host application to provide the address of a function that is 4660 * Allows the host application to provide the address of a function that is
4662 * notified each time code is added, moved or removed. 4661 * notified each time code is added, moved or removed.
4663 */ 4662 */
4664 JitCodeEventHandler code_event_handler; 4663 JitCodeEventHandler code_event_handler;
4665 4664
4666 /** 4665 /**
4667 * ResourceConstraints to use for the new Isolate. 4666 * ResourceConstraints to use for the new Isolate.
4668 */ 4667 */
4669 ResourceConstraints constraints; 4668 ResourceConstraints constraints;
4670 4669
4671 /** 4670 /**
4672 * This flag currently renders the Isolate unusable. 4671 * Explicitly specify a startup snapshot blob. The embedder owns the blob.
4673 */ 4672 */
4674 bool enable_serializer; 4673 StartupData* snapshot_blob;
4675 }; 4674 };
4676 4675
4677 4676
4678 /** 4677 /**
4679 * Stack-allocated class which sets the isolate for all operations 4678 * Stack-allocated class which sets the isolate for all operations
4680 * executed within a local scope. 4679 * executed within a local scope.
4681 */ 4680 */
4682 class V8_EXPORT Scope { 4681 class V8_EXPORT Scope {
4683 public: 4682 public:
4684 explicit Scope(Isolate* isolate) : isolate_(isolate) { 4683 explicit Scope(Isolate* isolate) : isolate_(isolate) {
(...skipping 705 matching lines...) Expand 10 before | Expand all | Expand 10 after
5390 * - The call will abort if the data is invalid. 5389 * - The call will abort if the data is invalid.
5391 */ 5390 */
5392 static void SetNativesDataBlob(StartupData* startup_blob); 5391 static void SetNativesDataBlob(StartupData* startup_blob);
5393 static void SetSnapshotDataBlob(StartupData* startup_blob); 5392 static void SetSnapshotDataBlob(StartupData* startup_blob);
5394 5393
5395 /** 5394 /**
5396 * Create a new isolate and context for the purpose of capturing a snapshot 5395 * Create a new isolate and context for the purpose of capturing a snapshot
5397 * Returns { NULL, 0 } on failure. 5396 * Returns { NULL, 0 } on failure.
5398 * The caller owns the data array in the return value. 5397 * The caller owns the data array in the return value.
5399 */ 5398 */
5400 static StartupData CreateSnapshotDataBlob(char* custom_source = NULL); 5399 static StartupData CreateSnapshotDataBlob(const char* custom_source = NULL);
5401 5400
5402 /** 5401 /**
5403 * Adds a message listener. 5402 * Adds a message listener.
5404 * 5403 *
5405 * The same message listener can be added more than once and in that 5404 * The same message listener can be added more than once and in that
5406 * case it will be called more than once for each message. 5405 * case it will be called more than once for each message.
5407 * 5406 *
5408 * If data is specified, it will be passed to the callback when it is called. 5407 * If data is specified, it will be passed to the callback when it is called.
5409 * Otherwise, the exception object will be passed to the callback instead. 5408 * Otherwise, the exception object will be passed to the callback instead.
5410 */ 5409 */
(...skipping 2130 matching lines...) Expand 10 before | Expand all | Expand 10 after
7541 */ 7540 */
7542 7541
7543 7542
7544 } // namespace v8 7543 } // namespace v8
7545 7544
7546 7545
7547 #undef TYPE_CHECK 7546 #undef TYPE_CHECK
7548 7547
7549 7548
7550 #endif // V8_H_ 7549 #endif // V8_H_
OLDNEW
« no previous file with comments | « no previous file | src/api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698