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

Unified Diff: Source/core/xml/parser/XMLDocumentParser.cpp

Issue 288673002: Make ScriptLoader into a ResourceOwner (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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
« no previous file with comments | « Source/core/html/parser/HTMLScriptRunner.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/xml/parser/XMLDocumentParser.cpp
diff --git a/Source/core/xml/parser/XMLDocumentParser.cpp b/Source/core/xml/parser/XMLDocumentParser.cpp
index 008125d6652d19944091601e8eff1c09cd061add..695b2783adcd235fde2e827c88948f1027710087 100644
--- a/Source/core/xml/parser/XMLDocumentParser.cpp
+++ b/Source/core/xml/parser/XMLDocumentParser.cpp
@@ -1036,14 +1036,15 @@ void XMLDocumentParser::endElementNs()
ASSERT(!m_pendingScript);
m_requestingScript = true;
- if (scriptLoader->prepareScript(m_scriptStartPosition, ScriptLoader::AllowLegacyTypeInTypeAttribute)) {
+ ScriptPrep prep = scriptLoader->prepareScript(m_scriptStartPosition, ScriptLoader::AllowLegacyTypeInTypeAttribute);
+ if (prep.succeeded()) {
// FIXME: Script execution should be shared between
// the libxml2 and Qt XMLDocumentParser implementations.
if (scriptLoader->readyToBeParserExecuted()) {
scriptLoader->executeScript(ScriptSourceCode(scriptLoader->scriptContent(), document()->url(), m_scriptStartPosition));
} else if (scriptLoader->willBeParserExecuted()) {
- m_pendingScript = scriptLoader->resource();
+ m_pendingScript = prep.resource();
m_scriptElement = element;
m_pendingScript->addClient(this);
« no previous file with comments | « Source/core/html/parser/HTMLScriptRunner.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698