Chromium Code Reviews| Index: src/debug/debug.cc |
| diff --git a/src/debug/debug.cc b/src/debug/debug.cc |
| index 3b5fb5f53d5f449b9cd3e0122a34fdffb93c44cc..e7ba17c2fbfb060a2127992c565a471612924f6f 100644 |
| --- a/src/debug/debug.cc |
| +++ b/src/debug/debug.cc |
| @@ -1331,7 +1331,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(); |
|
caitp (gmail)
2016/05/20 13:35:56
I imagine this fixes what could have been broken d
Dan Ehrenberg
2016/05/20 14:59:19
Seems like this will come up if you add a breakpoi
|
| while ((obj = iterator.next())) { |
| if (obj->IsJSFunction()) { |
| @@ -1343,6 +1343,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(); |