Index: third_party/WebKit/Source/core/dom/ScriptLoader.cpp |
diff --git a/third_party/WebKit/Source/core/dom/ScriptLoader.cpp b/third_party/WebKit/Source/core/dom/ScriptLoader.cpp |
index 6ab367b7c14f6272c6b0911d803356756ee4cb48..7330d2e3e9514140b75634f1cc20852e3c602dc5 100644 |
--- a/third_party/WebKit/Source/core/dom/ScriptLoader.cpp |
+++ b/third_party/WebKit/Source/core/dom/ScriptLoader.cpp |
@@ -465,8 +465,10 @@ void ScriptLoader::notifyFinished(Resource* resource) |
DCHECK(!m_willBeParserExecuted); |
Document* contextDocument = m_element->document().contextDocument(); |
- if (!contextDocument) |
+ if (!contextDocument) { |
+ detach(); |
return; |
+ } |
ASSERT_UNUSED(resource, resource == m_resource); |