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

Unified Diff: third_party/WebKit/Source/core/testing/DummyPageHolder.h

Issue 2702243003: Disallow cross-thread Persistent<> read access. (Closed)
Patch Set: rebased upto r451733 Created 3 years, 10 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
Index: third_party/WebKit/Source/core/testing/DummyPageHolder.h
diff --git a/third_party/WebKit/Source/core/testing/DummyPageHolder.h b/third_party/WebKit/Source/core/testing/DummyPageHolder.h
index b914fd60f88f13ee472cbe2f929f207420268011..1be5ce924fce8d3d4fed614c3503f855b31ecb4c 100644
--- a/third_party/WebKit/Source/core/testing/DummyPageHolder.h
+++ b/third_party/WebKit/Source/core/testing/DummyPageHolder.h
@@ -88,7 +88,13 @@ class DummyPageHolder {
InterfaceProvider* = nullptr);
Persistent<Page> m_page;
- Persistent<LocalFrame> m_frame;
+
+ // The LocalFrame is accessed from worker threads by unit tests
+ // (WorkerThreadableLoaderTest), hence we need to allow cross-thread
+ // usage of |m_frame|.
+ //
+ // TODO: rework the tests to not require cross-thread access.
+ CrossThreadPersistent<LocalFrame> m_frame;
Persistent<FrameLoaderClient> m_frameLoaderClient;
};

Powered by Google App Engine
This is Rietveld 408576698