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

Unified Diff: third_party/WebKit/Source/core/loader/EmptyClients.cpp

Issue 2680843006: Tidy DEFINE_(THREAD_SAFE_)STATIC_LOCAL() implementations. (Closed)
Patch Set: explain safety of HTMLTableSectionElement singletons 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/loader/EmptyClients.cpp
diff --git a/third_party/WebKit/Source/core/loader/EmptyClients.cpp b/third_party/WebKit/Source/core/loader/EmptyClients.cpp
index b3bd6352f92845bef4ef3f138eafb83e0f2fe933..a5df28b9e48a0def0c235352e5e9a1740c2b8700 100644
--- a/third_party/WebKit/Source/core/loader/EmptyClients.cpp
+++ b/third_party/WebKit/Source/core/loader/EmptyClients.cpp
@@ -47,8 +47,12 @@
namespace blink {
void fillWithEmptyClients(Page::PageClients& pageClients) {
+ // |ChromeClient| contains a weak reference to a |Node| (which derives
+ // from |ScriptWrappable|). That reference is only used for unit testing
+ // purposes and will not accidentally leak between contexts. Consequently,
+ // disable the singleton verification check.
DEFINE_STATIC_LOCAL(ChromeClient, dummyChromeClient,
- (EmptyChromeClient::create()));
+ (EmptyChromeClient::create()), CheckScriptWrappable::No);
pageClients.chromeClient = &dummyChromeClient;
DEFINE_STATIC_LOCAL(EmptyContextMenuClient, dummyContextMenuClient, ());

Powered by Google App Engine
This is Rietveld 408576698