| Index: third_party/WebKit/Source/web/WebViewImpl.cpp
|
| diff --git a/third_party/WebKit/Source/web/WebViewImpl.cpp b/third_party/WebKit/Source/web/WebViewImpl.cpp
|
| index 62a586d0d4df06c569cbfa5fdc8bd6e3bdb48eee..f8e76dd19bfe68b8ef1dc12e012d0df9ce16617b 100644
|
| --- a/third_party/WebKit/Source/web/WebViewImpl.cpp
|
| +++ b/third_party/WebKit/Source/web/WebViewImpl.cpp
|
| @@ -2896,9 +2896,15 @@ WebFrame* WebViewImpl::findFrameByName(
|
| return WebLocalFrameImpl::fromFrame(toLocalFrame(frame));
|
| }
|
|
|
| -WebFrame* WebViewImpl::focusedFrame()
|
| +WebLocalFrame* WebViewImpl::focusedFrame()
|
| {
|
| - return WebFrame::fromFrame(focusedCoreFrame());
|
| + Frame* frame = focusedCoreFrame();
|
| + // TODO(yabinh): focusedCoreFrame() should always return a local frame, and
|
| + // the following check should be unnecessary.
|
| + // See crbug.com/625068
|
| + if (!frame || !frame->isLocalFrame())
|
| + return nullptr;
|
| + return WebLocalFrameImpl::fromFrame(toLocalFrame(frame));
|
| }
|
|
|
| void WebViewImpl::setFocusedFrame(WebFrame* frame)
|
|
|