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

Unified Diff: third_party/WebKit/Source/web/WebKit.cpp

Issue 2338293002: Fix unbalanced add/remove task observer (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: third_party/WebKit/Source/web/WebKit.cpp
diff --git a/third_party/WebKit/Source/web/WebKit.cpp b/third_party/WebKit/Source/web/WebKit.cpp
index ec5d97a01e9791f640ff3d6863e8a64f6108864d..af4f7aaa89ad532935a288e1c2e32f416b7b1882 100644
--- a/third_party/WebKit/Source/web/WebKit.cpp
+++ b/third_party/WebKit/Source/web/WebKit.cpp
@@ -100,11 +100,8 @@ void shutdown()
ThreadState::current()->cleanupMainThread();
// currentThread() is null if we are running on a thread without a message loop.
- if (Platform::current()->currentThread()) {
- // We don't need to (cannot) remove s_endOfTaskRunner from the current
- // message loop, because the message loop is already destructed before
- // the shutdown() is called.
- delete s_endOfTaskRunner;
+ if (WebThread* currentThread = Platform::current()->currentThread()) {
+ currentThread->removeTaskObserver(s_endOfTaskRunner);
s_endOfTaskRunner = nullptr;
}
« 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