Disallow object/function templates when creating snapshots.
R=vogelheim@chromium.org Review URL: https://codereview.chromium.org/791033002 Cr-Commit-Position: refs/heads/master@{#25749}
This commit is contained in:
parent
f65a023fac
commit
25cfc5dc29
@ -802,6 +802,9 @@ Local<FunctionTemplate> FunctionTemplate::New(
|
||||
v8::Handle<Signature> signature,
|
||||
int length) {
|
||||
i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate);
|
||||
// Changes to the environment cannot be captured in the snapshot. Expect no
|
||||
// function templates when the isolate is created for serialization.
|
||||
DCHECK(!i_isolate->serializer_enabled());
|
||||
LOG_API(i_isolate, "FunctionTemplate::New");
|
||||
ENTER_V8(i_isolate);
|
||||
return FunctionTemplateNew(
|
||||
@ -1141,6 +1144,9 @@ Local<ObjectTemplate> ObjectTemplate::New() {
|
||||
Local<ObjectTemplate> ObjectTemplate::New(
|
||||
i::Isolate* isolate,
|
||||
v8::Handle<FunctionTemplate> constructor) {
|
||||
// Changes to the environment cannot be captured in the snapshot. Expect no
|
||||
// object templates when the isolate is created for serialization.
|
||||
DCHECK(!isolate->serializer_enabled());
|
||||
LOG_API(isolate, "ObjectTemplate::New");
|
||||
ENTER_V8(isolate);
|
||||
i::Handle<i::Struct> struct_obj =
|
||||
|
Loading…
Reference in New Issue
Block a user