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

Unified Diff: src/api.cc

Issue 716833002: Various clean-ups after top-level lexical declarations are done. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Patch for landing Created 6 years, 1 month 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 | « include/v8.h ('k') | src/arm/full-codegen-arm.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/api.cc
diff --git a/src/api.cc b/src/api.cc
index 157d9139de76130377b28f71ed564dfe4519d08c..dfb452b2a2707f1a697cc248bcff8b8a3c995b84 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);
« no previous file with comments | « include/v8.h ('k') | src/arm/full-codegen-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698