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

Unified Diff: third_party/WebKit/Source/bindings/core/v8/ScriptPromise.cpp

Issue 2258873004: Leak Detector: Count ScriptPromise and ActiveDOMObject on worker threads (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Bug fix: Build fail on ChromeOS Created 4 years, 4 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 | third_party/WebKit/Source/core/dom/ActiveDOMObject.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/bindings/core/v8/ScriptPromise.cpp
diff --git a/third_party/WebKit/Source/bindings/core/v8/ScriptPromise.cpp b/third_party/WebKit/Source/bindings/core/v8/ScriptPromise.cpp
index 35322d3ef63b79e4ac2a61ae8e8e7abb60cd89fe..e3568eb8eaa4f0f3b654f07c1a7e95a8fc4f0c25 100644
--- a/third_party/WebKit/Source/bindings/core/v8/ScriptPromise.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/ScriptPromise.cpp
@@ -316,17 +316,12 @@ ScriptPromise ScriptPromise::all(ScriptState* scriptState, const Vector<ScriptPr
void ScriptPromise::increaseInstanceCount()
{
- // An instance is only counted only on the main thread. This is because the
- // leak detector can detect leaks on the main thread so far. We plan to fix
- // the leak detector to work on worker threads (crbug.com/507224).
- if (isMainThread())
- InstanceCounters::incrementCounter(InstanceCounters::ScriptPromiseCounter);
+ InstanceCounters::incrementCounter(InstanceCounters::ScriptPromiseCounter);
}
void ScriptPromise::decreaseInstanceCount()
{
- if (isMainThread())
- InstanceCounters::decrementCounter(InstanceCounters::ScriptPromiseCounter);
+ InstanceCounters::decrementCounter(InstanceCounters::ScriptPromiseCounter);
}
} // namespace blink
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/dom/ActiveDOMObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698