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

Unified Diff: third_party/WebKit/Source/bindings/core/v8/ScriptStreamerTest.cpp

Issue 1667843003: Make Resource RefCountedWillBeGarbageCollectedFinalized, attempt #2 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix known issues Created 4 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/bindings/core/v8/ScriptStreamerTest.cpp
diff --git a/third_party/WebKit/Source/bindings/core/v8/ScriptStreamerTest.cpp b/third_party/WebKit/Source/bindings/core/v8/ScriptStreamerTest.cpp
index 4056578c8b1ea107e5c049882c9a45125469ae3b..7317c685328e005708efa5bddcb7e42120a07896 100644
--- a/third_party/WebKit/Source/bindings/core/v8/ScriptStreamerTest.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/ScriptStreamerTest.cpp
@@ -32,7 +32,7 @@ public:
, m_scope(v8::Isolate::GetCurrent())
, m_settings(Settings::create())
, m_resourceRequest("http://www.streaming-test.com/")
- , m_resource(new ScriptResource(m_resourceRequest, "UTF-8"))
+ , m_resource(ScriptResource::create(m_resourceRequest, "UTF-8"))
, m_pendingScript(PendingScript::create(0, m_resource.get()))
{
m_resource->setLoading(true);
@@ -89,7 +89,7 @@ protected:
// fetch any data outside the test; the test controls the data by calling
// ScriptResource::appendData.
ResourceRequest m_resourceRequest;
- ResourcePtr<ScriptResource> m_resource;
+ RefPtrWillBePersistent<ScriptResource> m_resource;
OwnPtrWillBePersistent<PendingScript> m_pendingScript;
};
@@ -194,7 +194,7 @@ TEST_F(ScriptStreamingTest, CancellingStreaming)
pendingScript()->stopWatchingForLoad(&client);
pendingScript()->releaseElementAndClear();
m_pendingScript = nullptr; // This will destroy m_resource.
- m_resource = 0;
+ m_resource = nullptr;
// The V8 side will complete too. This should not crash. We don't receive
// any results from the streaming and the client doesn't get notified.

Powered by Google App Engine
This is Rietveld 408576698