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

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

Issue 2505853003: Refactor SharedFunctionInfo::IsBuiltin. (Closed)
Patch Set: rebase 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 377799fe047dbc6539463e032028eb4fb561db97..5d7c2cd232f976f5b2322578c0bc5d876193a569 100644
--- a/src/runtime/runtime-scopes.cc
+++ b/src/runtime/runtime-scopes.cc
@@ -670,8 +670,9 @@ 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(
- function->shared()->IsBuiltin() ? *function : native_context->closure());
+ Handle<JSFunction> closure(function->shared()->IsUserJavaScript()
+ ? native_context->closure()
+ : *function);
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