| Index: src/api.cc
|
| diff --git a/src/api.cc b/src/api.cc
|
| index 7380cc447e46f8a8aa6654458b11603fdcfdcb1f..16d8e31e0670a49df3be594b67857433f4dd940d 100644
|
| --- a/src/api.cc
|
| +++ b/src/api.cc
|
| @@ -1567,7 +1567,7 @@ Local<Script> UnboundScript::BindToCurrentContext() {
|
| function_info(i::SharedFunctionInfo::cast(*obj), obj->GetIsolate());
|
| i::Handle<i::JSFunction> function =
|
| obj->GetIsolate()->factory()->NewFunctionFromSharedFunctionInfo(
|
| - function_info, obj->GetIsolate()->global_context());
|
| + function_info, obj->GetIsolate()->native_context());
|
| return ToApiHandle<Script>(function);
|
| }
|
|
|
| @@ -1732,7 +1732,7 @@ Local<UnboundScript> ScriptCompiler::CompileUnbound(
|
| EXCEPTION_PREAMBLE(isolate);
|
| i::Handle<i::SharedFunctionInfo> result = i::Compiler::CompileScript(
|
| str, name_obj, line_offset, column_offset, is_shared_cross_origin,
|
| - isolate->global_context(), NULL, &script_data, options,
|
| + isolate->native_context(), NULL, &script_data, options,
|
| i::NOT_NATIVES_CODE);
|
| has_pending_exception = result.is_null();
|
| if (has_pending_exception && script_data != NULL) {
|
| @@ -1777,17 +1777,6 @@ Local<Script> ScriptCompiler::Compile(
|
| ScriptCompiler::ScriptStreamingTask* ScriptCompiler::StartStreamingScript(
|
| Isolate* v8_isolate, StreamedSource* source, CompileOptions options) {
|
| i::Isolate* isolate = reinterpret_cast<i::Isolate*>(v8_isolate);
|
| - if (!isolate->global_context().is_null() &&
|
| - !isolate->global_context()->IsNativeContext()) {
|
| - // The context chain is non-trivial, and constructing the corresponding
|
| - // non-trivial Scope chain outside the V8 heap is not implemented. Don't
|
| - // stream the script. This will only occur if Harmony scoping is enabled and
|
| - // a previous script has introduced "let" or "const" variables. TODO(marja):
|
| - // Implement externalizing ScopeInfos and constructing non-trivial Scope
|
| - // chains independent of the V8 heap so that we can stream also in this
|
| - // case.
|
| - return NULL;
|
| - }
|
| return new i::BackgroundParsingTask(source->impl(), options,
|
| i::FLAG_stack_size, isolate);
|
| }
|
| @@ -1824,7 +1813,7 @@ Local<Script> ScriptCompiler::Compile(Isolate* v8_isolate,
|
| v8::True(v8_isolate));
|
| }
|
| source->info->set_script(script);
|
| - source->info->SetContext(isolate->global_context());
|
| + source->info->SetContext(isolate->native_context());
|
|
|
| EXCEPTION_PREAMBLE(isolate);
|
|
|
|
|