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

Unified Diff: include/v8.h

Issue 2100073002: [snapshot] revisit snapshot API. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/v8.h
diff --git a/include/v8.h b/include/v8.h
index 2a9c64f4e0fe11af8222e15a6a5d46bec64dcc05..f428f710f78c910ee0555412011608f73e53b0e0 100644
--- a/include/v8.h
+++ b/include/v8.h
@@ -4490,7 +4490,8 @@ class V8_EXPORT FunctionTemplate : public Template {
Local<Signature> signature = Local<Signature>(), int length = 0);
/** Get a template included in the snapshot by index. */
- static Local<FunctionTemplate> FromSnapshot(Isolate* isolate, size_t index);
+ static MaybeLocal<FunctionTemplate> FromSnapshot(Isolate* isolate,
+ size_t index);
/**
* Creates a function template with a fast handler. If a fast handler is set,
@@ -4668,7 +4669,8 @@ class V8_EXPORT ObjectTemplate : public Template {
static V8_DEPRECATED("Use isolate version", Local<ObjectTemplate> New());
/** Get a template included in the snapshot by index. */
- static Local<ObjectTemplate> FromSnapshot(Isolate* isolate, size_t index);
+ static MaybeLocal<ObjectTemplate> FromSnapshot(Isolate* isolate,
+ size_t index);
/** Creates a new instance of this template.*/
V8_DEPRECATE_SOON("Use maybe version", Local<Object> NewInstance());
@@ -7128,8 +7130,13 @@ class V8_EXPORT Context {
static Local<Context> New(
Isolate* isolate, ExtensionConfiguration* extensions = NULL,
Local<ObjectTemplate> global_template = Local<ObjectTemplate>(),
- Local<Value> global_object = Local<Value>(),
- size_t context_snapshot_index = 0);
+ Local<Value> global_object = Local<Value>());
+
+ static MaybeLocal<Context> FromSnapshot(
+ Isolate* isolate, size_t context_snapshot_index,
+ ExtensionConfiguration* extensions = NULL,
+ Local<ObjectTemplate> global_template = Local<ObjectTemplate>(),
+ Local<Value> global_object = Local<Value>());
/**
* Sets the security token for the context. To access an object in
« 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