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

Unified Diff: src/inspector/V8Debugger.cpp

Issue 2353503006: Remove handling in inspector for Object.observe async task events (Closed)
Patch Set: Created 4 years, 3 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698