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

Unified Diff: src/debug/debug.cc

Issue 1996943002: [esnext] Fix various callsites to use is_resumable, not is_generator (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix dcheck again Created 4 years, 7 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
« no previous file with comments | « src/compiler.cc ('k') | src/debug/liveedit.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/debug/debug.cc
diff --git a/src/debug/debug.cc b/src/debug/debug.cc
index e1f0d489c74e202104f5ba997ef0296638bfdd79..e8d615879040ffd0857721683275011c868db222 100644
--- a/src/debug/debug.cc
+++ b/src/debug/debug.cc
@@ -1329,7 +1329,7 @@ bool Debug::PrepareFunctionForBreakPoints(Handle<SharedFunctionInfo> shared) {
// smarter here and avoid the heap walk.
HeapIterator iterator(isolate_->heap());
HeapObject* obj;
- bool include_generators = !is_interpreted && shared->is_generator();
+ bool include_generators = !is_interpreted && shared->is_resumable();
Yang 2016/05/30 12:32:46 how about we rename "include_generators" to "find_
Dan Ehrenberg 2016/05/31 08:53:37 Good idea, done.
while ((obj = iterator.next())) {
if (obj->IsJSFunction()) {
@@ -1341,6 +1341,8 @@ bool Debug::PrepareFunctionForBreakPoints(Handle<SharedFunctionInfo> shared) {
if (is_interpreted) continue;
if (function->shared() == *shared) functions.Add(handle(function));
} else if (include_generators && obj->IsJSGeneratorObject()) {
+ // This case handles async functions as well, as they use generator
+ // objects for in-progress async function execution.
JSGeneratorObject* generator_obj = JSGeneratorObject::cast(obj);
if (!generator_obj->is_suspended()) continue;
JSFunction* function = generator_obj->function();
« no previous file with comments | « src/compiler.cc ('k') | src/debug/liveedit.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698