Index: third_party/WebKit/Source/core/html/parser/HTMLParserScriptRunner.cpp |
diff --git a/third_party/WebKit/Source/core/html/parser/HTMLParserScriptRunner.cpp b/third_party/WebKit/Source/core/html/parser/HTMLParserScriptRunner.cpp |
index ec9bf4e0b0aeeb1b11ffec9f2810ff442bf01a7b..88afa39d916a2a36115136ef176f2b1000c90df6 100644 |
--- a/third_party/WebKit/Source/core/html/parser/HTMLParserScriptRunner.cpp |
+++ b/third_party/WebKit/Source/core/html/parser/HTMLParserScriptRunner.cpp |
@@ -580,13 +580,11 @@ void HTMLParserScriptRunner::requestDeferredScript(Element* element) { |
PendingScript* HTMLParserScriptRunner::requestPendingScript( |
Element* element) const { |
- // This should correctly return 0 for empty or invalid srcValues. |
ScriptResource* resource = toScriptLoaderIfPossible(element)->resource(); |
- if (!resource) { |
- DVLOG(1) << "Not implemented."; // Dispatch error event. |
- return nullptr; |
- } |
- |
+ // Here |resource| should be non-null. If it were nullptr, |
+ // ScriptLoader::fetchScript() should have returned false and |
+ // thus the control shouldn't have reached here. |
+ CHECK(resource); |
return PendingScript::create(element, resource); |
} |