| Index: src/inspector/v8-debugger.cc
|
| diff --git a/src/inspector/v8-debugger.cc b/src/inspector/v8-debugger.cc
|
| index 88b609b127dfd8ff037ba7037f309d57db672200..0980cd7d1f0b2f46d1b88fd6f8710772cc0fc922 100644
|
| --- a/src/inspector/v8-debugger.cc
|
| +++ b/src/inspector/v8-debugger.cc
|
| @@ -594,22 +594,18 @@ void V8Debugger::handleV8DebugEvent(
|
| void V8Debugger::handleV8AsyncTaskEvent(v8::Local<v8::Object> eventData) {
|
| if (!m_maxAsyncCallStackDepth) return;
|
|
|
| - v8::debug::AsyncTaskEventType type =
|
| - static_cast<v8::debug::AsyncTaskEventType>(
|
| - callInternalGetterFunction(eventData, "type")
|
| - ->ToInteger(m_isolate->GetCurrentContext())
|
| - .ToLocalChecked()
|
| - ->Value());
|
| - String16 name = toProtocolStringWithTypeCheck(
|
| - callInternalGetterFunction(eventData, "name"));
|
| - int id = static_cast<int>(callInternalGetterFunction(eventData, "id")
|
| - ->ToInteger(m_isolate->GetCurrentContext())
|
| - .ToLocalChecked()
|
| - ->Value());
|
| + v8::Local<v8::debug::AsyncTaskEventData> data(
|
| + v8::Local<v8::debug::AsyncTaskEventData>::Cast(eventData));
|
| +
|
| + v8::debug::AsyncTaskEventType type = data->type();
|
| + String16 name;
|
| + v8::Local<v8::String> nameValue;
|
| + if (data->name().ToLocal(&nameValue))
|
| + name = toProtocolStringWithTypeCheck(nameValue);
|
| // 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);
|
| + void* ptr = reinterpret_cast<void*>(data->id() * 2 + 1);
|
| if (type == v8::debug::EnqueueRecurring)
|
| asyncTaskScheduled(name, ptr, true);
|
| else if (type == v8::debug::WillHandle)
|
|
|