From 61797b78021d9cbea75dc1542bd1c05492341f53 Mon Sep 17 00:00:00 2001 From: Aleksei Kuzmin Date: Tue, 22 Aug 2017 01:30:55 +0300 Subject: [PATCH] Move GetDocument method from WebFrame to WebLocalFrame. https://codereview.chromium.org/2928033002 --- atom/renderer/atom_render_view_observer.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/atom/renderer/atom_render_view_observer.cc b/atom/renderer/atom_render_view_observer.cc index cc87f10b6b21..5720be1bf92a 100644 --- a/atom/renderer/atom_render_view_observer.cc +++ b/atom/renderer/atom_render_view_observer.cc @@ -149,7 +149,7 @@ void AtomRenderViewObserver::OnBrowserMessage(bool send_to_all, return; blink::WebFrame* frame = render_view()->GetWebView()->MainFrame(); - if (!frame || frame->IsWebRemoteFrame()) + if (!frame || !frame->IsWebLocalFrame()) return; // Don't handle browser messages before document element is created. @@ -157,7 +157,7 @@ void AtomRenderViewObserver::OnBrowserMessage(bool send_to_all, // to a web page, and when we do that Blink creates an empty // document element if it hasn't been created yet, and it makes our init // script to run while `window.location` is still "about:blank". - blink::WebDocument document = frame->GetDocument(); + blink::WebDocument document = frame->ToWebLocalFrame()->GetDocument(); blink::WebElement html_element = document.DocumentElement(); if (html_element.IsNull()) { return;