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

Unified Diff: third_party/WebKit/Source/core/dom/ScriptLoader.h

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/dom/ScriptLoader.h
diff --git a/third_party/WebKit/Source/core/dom/ScriptLoader.h b/third_party/WebKit/Source/core/dom/ScriptLoader.h
index 34f3faaf02c061989ff48db89bbeb2526164c28d..b98e90fd56cf2c474c130e30efb86a7c8aa64347 100644
--- a/third_party/WebKit/Source/core/dom/ScriptLoader.h
+++ b/third_party/WebKit/Source/core/dom/ScriptLoader.h
@@ -25,7 +25,6 @@
#include "core/dom/PendingScript.h"
#include "core/fetch/FetchRequest.h"
#include "core/fetch/ResourceClient.h"
-#include "core/fetch/ResourcePtr.h"
#include "core/fetch/ScriptResource.h"
#include "wtf/text/TextPosition.h"
#include "wtf/text/WTFString.h"
@@ -37,9 +36,8 @@ class ScriptLoaderClient;
class ScriptSourceCode;
class LocalFrame;
-class CORE_EXPORT ScriptLoader : public NoBaseWillBeGarbageCollectedFinalized<ScriptLoader>, private ScriptResourceClient {
+class CORE_EXPORT ScriptLoader : public NoBaseWillBeGarbageCollectedFinalized<ScriptLoader>, public ScriptResourceClient {
USING_FAST_MALLOC_WILL_BE_REMOVED(ScriptLoader);
- WILL_BE_USING_PRE_FINALIZER(ScriptLoader, detach);
public:
static PassOwnPtrWillBeRawPtr<ScriptLoader> create(Element* element, bool createdByParser, bool isEvaluated)
{
@@ -69,7 +67,7 @@ public:
bool willBeParserExecuted() const { return m_willBeParserExecuted; }
bool readyToBeParserExecuted() const { return m_readyToBeParserExecuted; }
bool willExecuteWhenDocumentFinishedParsing() const { return m_willExecuteWhenDocumentFinishedParsing; }
- ResourcePtr<ScriptResource> resource() { return m_resource; }
+ ScriptResource* resource() { return m_resource.get(); }
void setHaveFiredLoadEvent(bool haveFiredLoad) { m_haveFiredLoad = haveFiredLoad; }
bool isParserInserted() const { return m_parserInserted; }
@@ -104,7 +102,7 @@ private:
String debugName() const override { return "ScriptLoader"; }
RawPtrWillBeMember<Element> m_element;
- ResourcePtr<ScriptResource> m_resource;
+ RefPtrWillBeMember<ScriptResource> m_resource;
WTF::OrdinalNumber m_startLineNumber;
String m_characterEncoding;
String m_fallbackCharacterEncoding;
« no previous file with comments | « third_party/WebKit/Source/core/dom/ProcessingInstruction.cpp ('k') | third_party/WebKit/Source/core/dom/ScriptLoader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698