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

Unified Diff: src/accessors.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 | « no previous file | src/api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/accessors.cc
diff --git a/src/accessors.cc b/src/accessors.cc
index 7f45f404c45dbcc680636d49453559b8639cf077..de84a7f2b153bf87d0d326b5867b91aebfafe68e 100644
--- a/src/accessors.cc
+++ b/src/accessors.cc
@@ -1024,10 +1024,11 @@ MaybeHandle<JSFunction> FindCaller(Isolate* isolate,
if (caller == NULL) return MaybeHandle<JSFunction>();
} while (caller->shared()->is_toplevel());
- // If caller is a built-in function and caller's caller is also built-in,
+ // If caller is not user code and caller's caller is also not user code,
// use that instead.
JSFunction* potential_caller = caller;
- while (potential_caller != NULL && potential_caller->shared()->IsBuiltin()) {
+ while (potential_caller != NULL &&
+ !potential_caller->shared()->IsUserJavaScript()) {
caller = potential_caller;
potential_caller = it.next();
}
« no previous file with comments | « no previous file | src/api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698