diff options
author | dcheng <dcheng@chromium.org> | 2016-02-29 17:36:57 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-03-01 01:38:01 +0000 |
commit | ca84eafdd8202028a7266583a42b65b566cd5d7e (patch) | |
tree | e6c4ceb5e5332c7ae2bdcb07dfc1bdc323513b37 /extensions/renderer | |
parent | 8d209d969e963c2bd874032cbc53cd3a4e622d79 (diff) | |
download | chromium_src-ca84eafdd8202028a7266583a42b65b566cd5d7e.zip chromium_src-ca84eafdd8202028a7266583a42b65b566cd5d7e.tar.gz chromium_src-ca84eafdd8202028a7266583a42b65b566cd5d7e.tar.bz2 |
Fix OOPI crash in extensions::ContentWatcher.
extensions::ContentWatcher should observe changes at the frame level,
but for now, just skip remote frames.
BUG=586077
Review URL: https://codereview.chromium.org/1747573002
Cr-Commit-Position: refs/heads/master@{#378360}
Diffstat (limited to 'extensions/renderer')
-rw-r--r-- | extensions/renderer/content_watcher.cc | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/extensions/renderer/content_watcher.cc b/extensions/renderer/content_watcher.cc index 7cb1851..3ab9e59 100644 --- a/extensions/renderer/content_watcher.cc +++ b/extensions/renderer/content_watcher.cc @@ -49,9 +49,14 @@ void ContentWatcher::OnWatchPages( : css_selectors_(css_selectors) {} bool Visit(content::RenderView* view) override { + // TODO(dcheng): This should be rewritten to be frame-oriented. It + // probably breaks declarative content for OOPI. for (blink::WebFrame* frame = view->GetWebView()->mainFrame(); frame; - frame = frame->traverseNext(/*wrap=*/false)) - frame->document().watchCSSSelectors(css_selectors_); + frame = frame->traverseNext(/*wrap=*/false)) { + if (frame->isWebRemoteFrame()) + continue; + frame->toWebLocalFrame()->document().watchCSSSelectors(css_selectors_); + } return true; // Continue visiting. } |