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

Unified Diff: src/isolate.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/ic/ic.cc ('k') | src/objects.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/isolate.cc
diff --git a/src/isolate.cc b/src/isolate.cc
index 261d77a3f634cd5ae4aee2378af24faf056a6896..4451444fe9f4a0fcf704096ee49290e46ea83b85 100644
--- a/src/isolate.cc
+++ b/src/isolate.cc
@@ -358,7 +358,7 @@ class StackTraceHelper {
// Determines whether the given stack frame should be displayed in a stack
// trace.
bool IsVisibleInStackTrace(JSFunction* fun) {
- return ShouldIncludeFrame(fun) && IsNotInNativeScript(fun) &&
+ return ShouldIncludeFrame(fun) && IsNotHidden(fun) &&
IsInSameSecurityContext(fun);
}
@@ -386,12 +386,12 @@ class StackTraceHelper {
return false;
}
- bool IsNotInNativeScript(JSFunction* fun) {
- // Functions defined in native scripts are not visible unless directly
+ bool IsNotHidden(JSFunction* fun) {
+ // Functions defined not in user scripts are not visible unless directly
// exposed, in which case the native flag is set.
// The --builtins-in-stack-traces command line flag allows including
// internal call sites in the stack trace for debugging purposes.
- if (!FLAG_builtins_in_stack_traces && fun->shared()->IsBuiltin()) {
+ if (!FLAG_builtins_in_stack_traces && !fun->shared()->IsUserJavaScript()) {
return fun->shared()->native();
}
return true;
« no previous file with comments | « src/ic/ic.cc ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698