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

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

Issue 2780463002: Introduce blink::Script (Closed)
Patch Set: Rebase 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
« no previous file with comments | « third_party/WebKit/Source/core/dom/PendingScript.h ('k') | third_party/WebKit/Source/core/dom/Script.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 409bbaa61582dda09a65e68fe01a5217e0eb5509..c3471192149d5137d2587196893412edf0d0d8b1 100644
--- a/third_party/WebKit/Source/core/dom/PendingScript.cpp
+++ b/third_party/WebKit/Source/core/dom/PendingScript.cpp
@@ -28,6 +28,7 @@
#include "bindings/core/v8/ScriptSourceCode.h"
#include "bindings/core/v8/ScriptState.h"
#include "bindings/core/v8/V8Binding.h"
+#include "core/dom/ClassicScript.h"
#include "core/dom/Document.h"
#include "core/dom/ScriptElementBase.h"
#include "core/dom/TaskRunnerHelper.h"
@@ -231,20 +232,20 @@ DEFINE_TRACE(PendingScript) {
MemoryCoordinatorClient::Trace(visitor);
}
-ScriptSourceCode PendingScript::GetSource(const KURL& document_url,
- bool& error_occurred) const {
+ClassicScript* PendingScript::GetSource(const KURL& document_url,
+ bool& error_occurred) const {
CheckState();
error_occurred = this->ErrorOccurred();
if (GetResource()) {
DCHECK(GetResource()->IsLoaded());
if (streamer_ && !streamer_->StreamingSuppressed())
- return ScriptSourceCode(streamer_, GetResource());
- return ScriptSourceCode(GetResource());
+ return ClassicScript::Create(ScriptSourceCode(streamer_, GetResource()));
+ return ClassicScript::Create(ScriptSourceCode(GetResource()));
}
- return ScriptSourceCode(element_->TextContent(), document_url,
- StartingPosition());
+ return ClassicScript::Create(ScriptSourceCode(
+ element_->TextContent(), document_url, StartingPosition()));
}
void PendingScript::SetStreamer(ScriptStreamer* streamer) {
« no previous file with comments | « third_party/WebKit/Source/core/dom/PendingScript.h ('k') | third_party/WebKit/Source/core/dom/Script.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698