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

Unified Diff: src/runtime/runtime-scopes.cc

Issue 1424703005: Remove JSBuiltinsObject. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 2 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
Index: src/runtime/runtime-scopes.cc
diff --git a/src/runtime/runtime-scopes.cc b/src/runtime/runtime-scopes.cc
index 4e512f97be11b73367bf2aa42bfc97ef0452579e..10cb075e1b31a00ce98cdba74fdea733a6be7730 100644
--- a/src/runtime/runtime-scopes.cc
+++ b/src/runtime/runtime-scopes.cc
@@ -673,9 +673,8 @@ RUNTIME_FUNCTION(Runtime_NewScriptContext) {
// Script contexts have a canonical empty function as their closure, not the
// anonymous closure containing the global code. See
// FullCodeGenerator::PushFunctionArgumentForContextAllocation.
- Handle<JSFunction> closure(global_object->IsJSBuiltinsObject()
- ? *function
- : native_context->closure());
+ Handle<JSFunction> closure(function->IsBuiltin() ? *function
+ : native_context->closure());
Handle<Context> result =
isolate->factory()->NewScriptContext(closure, scope_info);

Powered by Google App Engine
This is Rietveld 408576698