Chromium Code Reviews| Index: src/inspector/V8Debugger.cpp |
| diff --git a/src/inspector/V8Debugger.cpp b/src/inspector/V8Debugger.cpp |
| index 675623de34e8ac2d0095fcfe0153c77e97010ec3..4c67a949f99effcf5bbc262b2de2dc1553517f6a 100644 |
| --- a/src/inspector/V8Debugger.cpp |
| +++ b/src/inspector/V8Debugger.cpp |
| @@ -650,9 +650,10 @@ void V8Debugger::handleV8AsyncTaskEvent(v8::Local<v8::Context> context, |
| ->ToInteger(context) |
| .ToLocalChecked() |
| ->Value(); |
| - // The scopes for the ids are defined by the eventData.name namespaces. There |
| - // are currently two namespaces: "Object." and "Promise.". |
| - void* ptr = reinterpret_cast<void*>(id * 4 + (name[0] == 'P' ? 2 : 0) + 1); |
| + // Async task events from Promises are given misaligned pointers to prevent |
| + // from overlapping with other Blink task identifiers. There is a single |
| + // namespace of such ids, managed by src/js/promise.js. |
| + void* ptr = reinterpret_cast<void*>(id * 2 + 1); |
|
adamk
2016/09/20 22:20:03
This used to be
id * 4 + 3
now it's
id * 2 + 1
Dan Ehrenberg
2016/09/20 22:21:58
They were all given odd numbers. It used to altern
|
| if (type == v8AsyncTaskEventEnqueue) |
| asyncTaskScheduled(name, ptr, false); |
| else if (type == v8AsyncTaskEventWillHandle) |