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

Unified Diff: src/api.cc

Issue 10872084: Allocate block-scoped global bindings to global context. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 4 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/bootstrapper.h » ('j') | src/objects.cc » ('J')
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 dafeed3572b36493d2309fc883548c82c3d9f7cc..23e8c571caaea1140645b5bf2daa577b41a9d04f 100644
--- a/src/api.cc
+++ b/src/api.cc
@@ -1539,7 +1539,7 @@ Local<Script> Script::New(v8::Handle<String> source,
name_obj,
line_offset,
column_offset,
- isolate->native_context(),
+ isolate->global_context(),
NULL,
pre_data_impl,
Utils::OpenHandle(*script_data),
@@ -1577,7 +1577,7 @@ Local<Script> Script::Compile(v8::Handle<String> source,
i::Handle<i::JSFunction> result =
isolate->factory()->NewFunctionFromSharedFunctionInfo(
function,
- isolate->native_context());
+ isolate->global_context());
return Local<Script>(ToApi<Script>(result));
}
@@ -1604,7 +1604,7 @@ Local<Value> Script::Run() {
i::Handle<i::SharedFunctionInfo>
function_info(i::SharedFunctionInfo::cast(*obj), isolate);
fun = isolate->factory()->NewFunctionFromSharedFunctionInfo(
- function_info, isolate->native_context());
+ function_info, isolate->global_context());
} else {
fun = i::Handle<i::JSFunction>(i::JSFunction::cast(*obj), isolate);
}
@@ -4536,9 +4536,9 @@ void Context::ReattachGlobal(Handle<Object> global_object) {
i::Object** ctx = reinterpret_cast<i::Object**>(this);
i::Handle<i::Context> context =
i::Handle<i::Context>::cast(i::Handle<i::Object>(ctx));
- isolate->bootstrapper()->ReattachGlobal(
- context,
- Utils::OpenHandle(*global_object));
+ i::Handle<i::JSGlobalProxy> global_proxy =
+ i::Handle<i::JSGlobalProxy>::cast(Utils::OpenHandle(*global_object));
+ isolate->bootstrapper()->ReattachGlobal(context, global_proxy);
}
« no previous file with comments | « no previous file | src/bootstrapper.h » ('j') | src/objects.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698