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

Unified Diff: third_party/WebKit/Source/core/html/parser/HTMLScriptRunner.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/core/html/parser/HTMLScriptRunner.cpp
diff --git a/third_party/WebKit/Source/core/html/parser/HTMLScriptRunner.cpp b/third_party/WebKit/Source/core/html/parser/HTMLScriptRunner.cpp
index 20282c6c1f5c7c587390f4640d2e8bb9fbfd5c26..e9862a31e75bcb7baa1e01a98b98bd0681880fdb 100644
--- a/third_party/WebKit/Source/core/html/parser/HTMLScriptRunner.cpp
+++ b/third_party/WebKit/Source/core/html/parser/HTMLScriptRunner.cpp
@@ -156,12 +156,12 @@ void HTMLScriptRunner::detach()
if (!m_document)
return;
- m_parserBlockingScript->stopWatchingForLoad(this);
+ m_parserBlockingScript->stopWatchingForLoad();
m_parserBlockingScript->releaseElementAndClear();
while (!m_scriptsToExecuteAfterParsing.isEmpty()) {
OwnPtrWillBeRawPtr<PendingScript> pendingScript = m_scriptsToExecuteAfterParsing.takeFirst();
- pendingScript->stopWatchingForLoad(this);
+ pendingScript->stopWatchingForLoad();
pendingScript->releaseElementAndClear();
}
m_document = nullptr;
@@ -193,7 +193,7 @@ void HTMLScriptRunner::executePendingScriptAndDispatchEvent(PendingScript* pendi
ScriptSourceCode sourceCode = pendingScript->getSource(documentURLForScriptExecution(m_document), errorOccurred);
// Stop watching loads before executeScript to prevent recursion if the script reloads itself.
- pendingScript->stopWatchingForLoad(this);
+ pendingScript->stopWatchingForLoad();
if (!isExecutingScript()) {
Microtask::performCheckpoint(V8PerIsolateData::mainThreadIsolate());
@@ -239,13 +239,13 @@ void HTMLScriptRunner::executePendingScriptAndDispatchEvent(PendingScript* pendi
void HTMLScriptRunner::stopWatchingResourceForLoad(Resource* resource)
{
if (m_parserBlockingScript->resource() == resource) {
- m_parserBlockingScript->stopWatchingForLoad(this);
+ m_parserBlockingScript->stopWatchingForLoad();
m_parserBlockingScript->releaseElementAndClear();
return;
}
for (auto& script : m_scriptsToExecuteAfterParsing) {
if (script->resource() == resource) {
- script->stopWatchingForLoad(this);
+ script->stopWatchingForLoad();
script->releaseElementAndClear();
return;
}
@@ -390,7 +390,7 @@ bool HTMLScriptRunner::requestPendingScript(PendingScript* pendingScript, Elemen
ASSERT(!pendingScript->element());
pendingScript->setElement(script);
// This should correctly return 0 for empty or invalid srcValues.
- ScriptResource* resource = toScriptLoaderIfPossible(script)->resource().get();
+ ScriptResource* resource = toScriptLoaderIfPossible(script)->resource();
if (!resource) {
notImplemented(); // Dispatch error event.
return false;

Powered by Google App Engine
This is Rietveld 408576698