Index: third_party/WebKit/Source/core/layout/LayoutTestHelper.cpp |
diff --git a/third_party/WebKit/Source/core/layout/LayoutTestHelper.cpp b/third_party/WebKit/Source/core/layout/LayoutTestHelper.cpp |
index 06ccad5ce8ecced663480da4a992f7ba31e06e72..685e0dd7ef0efe426b23ea5803e1ae947753b072 100644 |
--- a/third_party/WebKit/Source/core/layout/LayoutTestHelper.cpp |
+++ b/third_party/WebKit/Source/core/layout/LayoutTestHelper.cpp |
@@ -32,7 +32,12 @@ void FrameLoaderClientWithParent::detached(FrameDetachType) { |
} |
ChromeClient& RenderingTest::chromeClient() const { |
- DEFINE_STATIC_LOCAL(EmptyChromeClient, client, (EmptyChromeClient::create())); |
+ // |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(EmptyChromeClient, client, (EmptyChromeClient::create()), |
+ CheckScriptWrappable::No); |
return client; |
} |