Index: Source/core/html/HTMLMarqueeElement.cpp |
diff --git a/Source/core/html/HTMLMarqueeElement.cpp b/Source/core/html/HTMLMarqueeElement.cpp |
index c17fa69bf2205585b1e89b5c9ca30a54cabbc9da..06d2e178c402b1119619b5cf7ead25b95c1fb5a2 100644 |
--- a/Source/core/html/HTMLMarqueeElement.cpp |
+++ b/Source/core/html/HTMLMarqueeElement.cpp |
@@ -34,8 +34,10 @@ namespace blink { |
inline HTMLMarqueeElement::HTMLMarqueeElement(Document& document) |
: HTMLElement(HTMLNames::marqueeTag, document) |
{ |
- v8::Handle<v8::Value> classObject = PrivateScriptRunner::installClassIfNeeded(&document, "HTMLMarqueeElement"); |
- RELEASE_ASSERT(!classObject.IsEmpty()); |
+ if (document.contextDocument()) { |
+ v8::Handle<v8::Value> classObject = PrivateScriptRunner::installClassIfNeeded(&document, "HTMLMarqueeElement"); |
+ RELEASE_ASSERT(!classObject.IsEmpty()); |
+ } |
UseCounter::count(document, UseCounter::HTMLMarqueeElement); |
} |