diff options
Diffstat (limited to 'chromium/third_party/blink/renderer/bindings/core/v8/custom/v8_window_custom.cc')
-rw-r--r-- | chromium/third_party/blink/renderer/bindings/core/v8/custom/v8_window_custom.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/chromium/third_party/blink/renderer/bindings/core/v8/custom/v8_window_custom.cc b/chromium/third_party/blink/renderer/bindings/core/v8/custom/v8_window_custom.cc index 7a5b86fb3cc..00aacbd8a1d 100644 --- a/chromium/third_party/blink/renderer/bindings/core/v8/custom/v8_window_custom.cc +++ b/chromium/third_party/blink/renderer/bindings/core/v8/custom/v8_window_custom.cc @@ -269,11 +269,11 @@ void V8Window::NamedPropertyGetterCustom( } // Search named items in the document. - Document* doc = To<LocalFrame>(frame)->GetDocument(); - if (!doc || !doc->IsHTMLDocument()) + auto* doc = DynamicTo<HTMLDocument>(To<LocalFrame>(frame)->GetDocument()); + if (!doc) return; - bool has_named_item = ToHTMLDocument(doc)->HasNamedItem(name); + bool has_named_item = doc->HasNamedItem(name); bool has_id_item = doc->HasElementWithId(name); if (!has_named_item && !has_id_item) |