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

Unified Diff: src/isolate.cc

Issue 1895603002: [esnext] prototype runtime implementation for async functions (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@AsyncFunction
Patch Set: majorly improve stack traces, get rid of self-spawning behaviour, create inner generator function Created 4 years, 8 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/isolate.cc
diff --git a/src/isolate.cc b/src/isolate.cc
index 63f670facd02f2338db63406cd6f4aa5e5edeb73..264a29f749779c89d70f0c2c2e6ca4a9169d6ec6 100644
--- a/src/isolate.cc
+++ b/src/isolate.cc
@@ -329,6 +329,7 @@ static bool IsVisibleInStackTrace(JSFunction* fun,
}
// Skip all frames until we've seen the caller.
if (!(*seen_caller)) return false;
+
// Functions defined in native 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
@@ -336,6 +337,10 @@ static bool IsVisibleInStackTrace(JSFunction* fun,
if (!FLAG_builtins_in_stack_traces && fun->shared()->IsBuiltin()) {
return fun->shared()->native();
}
+
+ // Async function wrappers are not visible in stack trace
+ if (IsAsyncFunction(fun->shared()->kind())) return false;
+
return true;
}
« no previous file with comments | « src/frames.cc ('k') | src/js/harmony-async-await.js » ('j') | src/parsing/parser.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698