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

Unified Diff: third_party/WebKit/Source/core/dom/PendingScript.cpp

Issue 2780463002: Introduce blink::Script (Closed)
Patch Set: style Created 3 years, 8 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/PendingScript.cpp
diff --git a/third_party/WebKit/Source/core/dom/PendingScript.cpp b/third_party/WebKit/Source/core/dom/PendingScript.cpp
index 4771069d7d7d2441578ca73f93d1c3db92347f33..0c39fea3e13f5a8208e579fcae24a3078cdcca04 100644
--- a/third_party/WebKit/Source/core/dom/PendingScript.cpp
+++ b/third_party/WebKit/Source/core/dom/PendingScript.cpp
@@ -26,6 +26,7 @@
#include "core/dom/PendingScript.h"
#include "bindings/core/v8/ScriptSourceCode.h"
+#include "core/dom/ClassicScript.h"
#include "core/dom/ScriptElementBase.h"
#include "core/frame/SubresourceIntegrity.h"
#include "platform/SharedBuffer.h"
@@ -225,20 +226,20 @@ DEFINE_TRACE(PendingScript) {
MemoryCoordinatorClient::trace(visitor);
}
-ScriptSourceCode PendingScript::getSource(const KURL& documentURL,
- bool& errorOccurred) const {
+ClassicScript* PendingScript::getSource(const KURL& documentURL,
+ bool& errorOccurred) const {
checkState();
errorOccurred = this->errorOccurred();
if (resource()) {
DCHECK(resource()->isLoaded());
if (m_streamer && !m_streamer->streamingSuppressed())
- return ScriptSourceCode(m_streamer, resource());
- return ScriptSourceCode(resource());
+ return ClassicScript::create(ScriptSourceCode(m_streamer, resource()));
+ return ClassicScript::create(ScriptSourceCode(resource()));
}
- return ScriptSourceCode(m_element->textContent(), documentURL,
- startingPosition());
+ return ClassicScript::create(ScriptSourceCode(
+ m_element->textContent(), documentURL, startingPosition()));
}
void PendingScript::setStreamer(ScriptStreamer* streamer) {

Powered by Google App Engine
This is Rietveld 408576698