| Index: third_party/WebKit/Source/core/html/parser/HTMLDocumentParser.cpp
|
| diff --git a/third_party/WebKit/Source/core/html/parser/HTMLDocumentParser.cpp b/third_party/WebKit/Source/core/html/parser/HTMLDocumentParser.cpp
|
| index ce7ae53ee92cb75360850659490e93faa9c2471a..180fee9ba2686b4a3a0e0f9bbc53531bb7b0fbae 100644
|
| --- a/third_party/WebKit/Source/core/html/parser/HTMLDocumentParser.cpp
|
| +++ b/third_party/WebKit/Source/core/html/parser/HTMLDocumentParser.cpp
|
| @@ -85,12 +85,12 @@ static HTMLTokenizer::State tokenizerStateForContextElement(Element* contextElem
|
| return HTMLTokenizer::DataState;
|
| }
|
|
|
| -class ParserDataReceiver final : public RefCountedWillBeGarbageCollectedFinalized<ParserDataReceiver>, public ThreadedDataReceiver, public DocumentLifecycleObserver {
|
| - WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(ParserDataReceiver);
|
| +class ParserDataReceiver final : public GarbageCollectedFinalized<ParserDataReceiver>, public ThreadedDataReceiver, public DocumentLifecycleObserver {
|
| + USING_GARBAGE_COLLECTED_MIXIN(ParserDataReceiver);
|
| public:
|
| - static PassRefPtrWillBeRawPtr<ParserDataReceiver> create(WeakPtr<BackgroundHTMLParser> backgroundParser, Document* document)
|
| + static RawPtr<ParserDataReceiver> create(WeakPtr<BackgroundHTMLParser> backgroundParser, Document* document)
|
| {
|
| - return adoptRefWillBeNoop(new ParserDataReceiver(backgroundParser, document));
|
| + return (new ParserDataReceiver(backgroundParser, document));
|
| }
|
|
|
| #if !ENABLE(OILPAN)
|
| @@ -259,7 +259,7 @@ void HTMLDocumentParser::prepareToStopParsing()
|
|
|
| // pumpTokenizer can cause this parser to be detached from the Document,
|
| // but we need to ensure it isn't deleted yet.
|
| - RefPtrWillBeRawPtr<HTMLDocumentParser> protect(this);
|
| + RawPtr<HTMLDocumentParser> protect(this);
|
|
|
| // NOTE: This pump should only ever emit buffered character tokens.
|
| if (m_tokenizer) {
|
| @@ -315,7 +315,7 @@ void HTMLDocumentParser::resumeParsingAfterYield()
|
|
|
| // pumpPendingSpeculations can cause this parser to be detached from the Document,
|
| // but we need to ensure it isn't deleted yet.
|
| - RefPtrWillBeRawPtr<HTMLDocumentParser> protect(this);
|
| + RawPtr<HTMLDocumentParser> protect(this);
|
| pumpPendingSpeculations();
|
| }
|
|
|
| @@ -324,7 +324,7 @@ void HTMLDocumentParser::runScriptsForPausedTreeBuilder()
|
| ASSERT(scriptingContentIsAllowed(parserContentPolicy()));
|
|
|
| TextPosition scriptStartPosition = TextPosition::belowRangePosition();
|
| - RefPtrWillBeRawPtr<Element> scriptElement = m_treeBuilder->takeScriptToProcess(scriptStartPosition);
|
| + RawPtr<Element> scriptElement = m_treeBuilder->takeScriptToProcess(scriptStartPosition);
|
| // We will not have a scriptRunner when parsing a DocumentFragment.
|
| if (m_scriptRunner)
|
| m_scriptRunner->execute(scriptElement.release(), scriptStartPosition);
|
| @@ -753,7 +753,7 @@ void HTMLDocumentParser::insert(const SegmentedString& source)
|
|
|
| // pumpTokenizer can cause this parser to be detached from the Document,
|
| // but we need to ensure it isn't deleted yet.
|
| - RefPtrWillBeRawPtr<HTMLDocumentParser> protect(this);
|
| + RawPtr<HTMLDocumentParser> protect(this);
|
|
|
| if (!m_tokenizer) {
|
| ASSERT(!inPumpSession());
|
| @@ -847,7 +847,7 @@ void HTMLDocumentParser::append(const String& inputSource)
|
|
|
| // pumpTokenizer can cause this parser to be detached from the Document,
|
| // but we need to ensure it isn't deleted yet.
|
| - RefPtrWillBeRawPtr<HTMLDocumentParser> protect(this);
|
| + RawPtr<HTMLDocumentParser> protect(this);
|
| TRACE_EVENT1(TRACE_DISABLED_BY_DEFAULT("blink.debug"), "HTMLDocumentParser::append", "size", inputSource.length());
|
| const SegmentedString source(inputSource);
|
|
|
| @@ -934,7 +934,7 @@ void HTMLDocumentParser::finish()
|
| // However, FrameLoader::stop calls DocumentParser::finish unconditionally.
|
|
|
| // flush may ending up executing arbitrary script, and possibly detach the parser.
|
| - RefPtrWillBeRawPtr<HTMLDocumentParser> protect(this);
|
| + RawPtr<HTMLDocumentParser> protect(this);
|
| flush();
|
| if (isDetached())
|
| return;
|
| @@ -1025,7 +1025,7 @@ void HTMLDocumentParser::resumeParsingAfterScriptExecution()
|
| ASSERT(!m_lastChunkBeforeScript);
|
| // processParsedChunkFromBackgroundParser can cause this parser to be detached from the Document,
|
| // but we need to ensure it isn't deleted yet.
|
| - RefPtrWillBeRawPtr<HTMLDocumentParser> protect(this);
|
| + RawPtr<HTMLDocumentParser> protect(this);
|
| pumpPendingSpeculations();
|
| return;
|
| }
|
| @@ -1046,7 +1046,7 @@ void HTMLDocumentParser::notifyScriptLoaded(Resource* cachedResource)
|
| {
|
| // pumpTokenizer can cause this parser to be detached from the Document,
|
| // but we need to ensure it isn't deleted yet.
|
| - RefPtrWillBeRawPtr<HTMLDocumentParser> protect(this);
|
| + RawPtr<HTMLDocumentParser> protect(this);
|
|
|
| ASSERT(m_scriptRunner);
|
| ASSERT(!isExecutingScript());
|
| @@ -1078,7 +1078,7 @@ void HTMLDocumentParser::executeScriptsWaitingForResources()
|
|
|
| // pumpTokenizer can cause this parser to be detached from the Document,
|
| // but we need to ensure it isn't deleted yet.
|
| - RefPtrWillBeRawPtr<HTMLDocumentParser> protect(this);
|
| + RawPtr<HTMLDocumentParser> protect(this);
|
| m_scriptRunner->executeScriptsWaitingForResources();
|
| if (!isWaitingForScripts())
|
| resumeParsingAfterScriptExecution();
|
| @@ -1086,7 +1086,7 @@ void HTMLDocumentParser::executeScriptsWaitingForResources()
|
|
|
| void HTMLDocumentParser::parseDocumentFragment(const String& source, DocumentFragment* fragment, Element* contextElement, ParserContentPolicy parserContentPolicy)
|
| {
|
| - RefPtrWillBeRawPtr<HTMLDocumentParser> parser = HTMLDocumentParser::create(fragment, contextElement, parserContentPolicy);
|
| + RawPtr<HTMLDocumentParser> parser = HTMLDocumentParser::create(fragment, contextElement, parserContentPolicy);
|
| parser->append(source);
|
| parser->finish();
|
| ASSERT(!parser->processingData()); // Make sure we're done. <rdar://problem/3963151>
|
|
|