| Index: src/api.cc
|
| diff --git a/src/api.cc b/src/api.cc
|
| index a7ff337f7acda76c5475620fa697bd8e9317d0f5..a3a0dceec8b684e190ff62f1b7f91c33ceac0771 100644
|
| --- a/src/api.cc
|
| +++ b/src/api.cc
|
| @@ -755,6 +755,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(
|
| @@ -1094,6 +1097,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 =
|
|
|