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

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

Issue 2512463002: Revert of Refactor SharedFunctionInfo::IsBuiltin. (Closed)
Patch Set: Created 4 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 | « src/runtime/runtime-internal.cc ('k') | test/cctest/heap/test-heap.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime/runtime-scopes.cc
diff --git a/src/runtime/runtime-scopes.cc b/src/runtime/runtime-scopes.cc
index 6c9eb3171246f78769307c34b36b429af4376c4d..0c037db307a60ca994da643e9a2554b462654ced 100644
--- a/src/runtime/runtime-scopes.cc
+++ b/src/runtime/runtime-scopes.cc
@@ -670,9 +670,8 @@
// Script contexts have a canonical empty function as their closure, not the
// anonymous closure containing the global code. See
// FullCodeGenerator::PushFunctionArgumentForContextAllocation.
- Handle<JSFunction> closure(function->shared()->IsUserJavaScript()
- ? native_context->closure()
- : *function);
+ Handle<JSFunction> closure(
+ function->shared()->IsBuiltin() ? *function : native_context->closure());
Handle<Context> result =
isolate->factory()->NewScriptContext(closure, scope_info);
« no previous file with comments | « src/runtime/runtime-internal.cc ('k') | test/cctest/heap/test-heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698