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

Unified Diff: third_party/WebKit/Source/core/html/parser/BackgroundHTMLParser.cpp

Issue 1983753002: Remove OwnPtr::release() calls in core/ (part 2). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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/BackgroundHTMLParser.cpp
diff --git a/third_party/WebKit/Source/core/html/parser/BackgroundHTMLParser.cpp b/third_party/WebKit/Source/core/html/parser/BackgroundHTMLParser.cpp
index 7b0a0342be5faee8b67e748cdeb93ec2c8741acd..110d6889055c714ad6142f54715767aa6f20163c 100644
--- a/third_party/WebKit/Source/core/html/parser/BackgroundHTMLParser.cpp
+++ b/third_party/WebKit/Source/core/html/parser/BackgroundHTMLParser.cpp
@@ -102,9 +102,9 @@ BackgroundHTMLParser::BackgroundHTMLParser(PassRefPtr<WeakReference<BackgroundHT
, m_parser(config->parser)
, m_pendingTokens(adoptPtr(new CompactHTMLTokenStream))
, m_pendingTokenLimit(config->pendingTokenLimit)
- , m_xssAuditor(config->xssAuditor.release())
+ , m_xssAuditor(std::move(config->xssAuditor))
, m_preloadScanner(adoptPtr(new TokenPreloadScanner(documentURL, std::move(cachedDocumentParameters), mediaValuesCachedData)))
- , m_decoder(config->decoder.release())
+ , m_decoder(std::move(config->decoder))
, m_loadingTaskRunner(std::move(loadingTaskRunner))
, m_parsedChunkQueue(config->parsedChunkQueue.release())
, m_startingScript(false)
@@ -171,8 +171,8 @@ void BackgroundHTMLParser::updateDocument(const String& decodedData)
void BackgroundHTMLParser::resumeFrom(PassOwnPtr<Checkpoint> checkpoint)
{
m_parser = checkpoint->parser;
- m_token = checkpoint->token.release();
- m_tokenizer = checkpoint->tokenizer.release();
+ m_token = std::move(checkpoint->token);
+ m_tokenizer = std::move(checkpoint->tokenizer);
m_treeBuilderSimulator.setState(checkpoint->treeBuilderState);
m_input.rewindTo(checkpoint->inputCheckpoint, checkpoint->unparsedInput);
m_preloadScanner->rewindTo(checkpoint->preloadScannerCheckpoint);
@@ -242,7 +242,7 @@ void BackgroundHTMLParser::pumpTokenizer()
if (OwnPtr<XSSInfo> xssInfo = m_xssAuditor->filterToken(FilterTokenRequest(*m_token, m_sourceTracker, m_tokenizer->shouldAllowCDATA()))) {
xssInfo->m_textPosition = position;
- m_pendingXSSInfos.append(xssInfo.release());
+ m_pendingXSSInfos.append(std::move(xssInfo));
}
CompactHTMLToken token(m_token.get(), position);
@@ -297,12 +297,12 @@ void BackgroundHTMLParser::sendTokensToMainThread()
chunk->treeBuilderState = m_treeBuilderSimulator.state();
chunk->inputCheckpoint = m_input.createCheckpoint(m_pendingTokens->size());
chunk->preloadScannerCheckpoint = m_preloadScanner->createCheckpoint();
- chunk->tokens = m_pendingTokens.release();
+ chunk->tokens = std::move(m_pendingTokens);
chunk->startingScript = m_startingScript;
chunk->likelyDocumentWriteScriptIndices.swap(m_likelyDocumentWriteScriptIndices);
m_startingScript = false;
- bool isEmpty = m_parsedChunkQueue->enqueue(chunk.release());
+ bool isEmpty = m_parsedChunkQueue->enqueue(std::move(chunk));
if (isEmpty) {
m_loadingTaskRunner->postTask(
BLINK_FROM_HERE,

Powered by Google App Engine
This is Rietveld 408576698