Remove handling in inspector for Object.observe async task events

Review-Url: https://codereview.chromium.org/2353503006
Cr-Commit-Position: refs/heads/master@{#39601}
This commit is contained in:
littledan 2016-09-21 08:46:29 -07:00 committed by Commit bot
parent 4c1d574b22
commit f322d3ad5c

View File

@ -647,9 +647,10 @@ void V8Debugger::handleV8AsyncTaskEvent(v8::Local<v8::Context> context,
->ToInteger(context) ->ToInteger(context)
.ToLocalChecked() .ToLocalChecked()
->Value(); ->Value();
// The scopes for the ids are defined by the eventData.name namespaces. There // Async task events from Promises are given misaligned pointers to prevent
// are currently two namespaces: "Object." and "Promise.". // from overlapping with other Blink task identifiers. There is a single
void* ptr = reinterpret_cast<void*>(id * 4 + (name[0] == 'P' ? 2 : 0) + 1); // namespace of such ids, managed by src/js/promise.js.
void* ptr = reinterpret_cast<void*>(id * 2 + 1);
if (type == v8AsyncTaskEventEnqueue) if (type == v8AsyncTaskEventEnqueue)
asyncTaskScheduled(name, ptr, false); asyncTaskScheduled(name, ptr, false);
else if (type == v8AsyncTaskEventWillHandle) else if (type == v8AsyncTaskEventWillHandle)