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

Unified Diff: third_party/WebKit/Source/platform/heap/PersistentNode.h

Issue 1962513002: Upon clearing, release PersistentNode of cross-thread-persistent also. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: tidy Created 4 years, 7 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 | « third_party/WebKit/Source/platform/heap/HeapTest.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/platform/heap/PersistentNode.h
diff --git a/third_party/WebKit/Source/platform/heap/PersistentNode.h b/third_party/WebKit/Source/platform/heap/PersistentNode.h
index 52b558084cb0772fac38b2915c8fc591c9e614d5..7bbae43f15681a50c158e50971baf2ef13e245e3 100644
--- a/third_party/WebKit/Source/platform/heap/PersistentNode.h
+++ b/third_party/WebKit/Source/platform/heap/PersistentNode.h
@@ -201,7 +201,12 @@ private:
// because we don't want to virtualize performance-sensitive methods
// such as PersistentRegion::allocate/freePersistentNode.
OwnPtr<PersistentRegion> m_persistentRegion;
- Mutex m_mutex;
+
+ // Recursive as prepareForThreadStateTermination() clears a PersistentNode's
+ // associated Persistent<> -- it in turn freeing the PersistentNode. And both
+ // CrossThreadPersistentRegion operations need a lock on the region before
+ // mutating.
+ RecursiveMutex m_mutex;
};
} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/platform/heap/HeapTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698