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

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

Issue 1667843003: Make Resource RefCountedWillBeGarbageCollectedFinalized, attempt #2 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase + address review comments 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/V8ScriptRunnerTest.cpp
diff --git a/third_party/WebKit/Source/bindings/core/v8/V8ScriptRunnerTest.cpp b/third_party/WebKit/Source/bindings/core/v8/V8ScriptRunnerTest.cpp
index 1cf157a43f875b676a6ad01972f3ed54dd844839..a974e8bc7c6c2411a8b9bc0c80288cd605512587 100644
--- a/third_party/WebKit/Source/bindings/core/v8/V8ScriptRunnerTest.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/V8ScriptRunnerTest.cpp
@@ -73,13 +73,13 @@ public:
void setEmptyResource()
{
m_resourceRequest = ResourceRequest();
- m_resource = new ScriptResource(m_resourceRequest, "UTF-8");
+ m_resource = ScriptResource::create(m_resourceRequest, "UTF-8");
}
void setResource()
{
m_resourceRequest = ResourceRequest(url());
- m_resource = new ScriptResource(m_resourceRequest, "UTF-8");
+ m_resource = ScriptResource::create(m_resourceRequest, "UTF-8");
}
CachedMetadataHandler* cacheHandler()
@@ -89,7 +89,7 @@ public:
protected:
ResourceRequest m_resourceRequest;
- ResourcePtr<ScriptResource> m_resource;
+ RefPtrWillBePersistent<ScriptResource> m_resource;
V8TestingScope m_scope;
static int counter;
@@ -118,7 +118,7 @@ TEST_F(V8ScriptRunnerTest, parseOption)
EXPECT_FALSE(cacheHandler()->cachedMetadata(tagForCodeCache(cacheHandler())));
// The cached data is associated with the encoding.
ResourceRequest request(url());
- ResourcePtr<ScriptResource> anotherResource = new ScriptResource(request, "UTF-16");
+ RefPtrWillBeRawPtr<ScriptResource> anotherResource = ScriptResource::create(request, "UTF-16");
EXPECT_FALSE(cacheHandler()->cachedMetadata(tagForParserCache(anotherResource->cacheHandler())));
}
@@ -134,7 +134,7 @@ TEST_F(V8ScriptRunnerTest, codeOption)
EXPECT_TRUE(cacheHandler()->cachedMetadata(tagForCodeCache(cacheHandler())));
// The cached data is associated with the encoding.
ResourceRequest request(url());
- ResourcePtr<ScriptResource> anotherResource = new ScriptResource(request, "UTF-16");
+ RefPtrWillBeRawPtr<ScriptResource> anotherResource = ScriptResource::create(request, "UTF-16");
EXPECT_FALSE(cacheHandler()->cachedMetadata(tagForCodeCache(anotherResource->cacheHandler())));
}

Powered by Google App Engine
This is Rietveld 408576698