summaryrefslogtreecommitdiffstats
path: root/extensions/renderer
diff options
context:
space:
mode:
authoralexmos <alexmos@chromium.org>2016-01-26 12:48:05 -0800
committerCommit bot <commit-bot@chromium.org>2016-01-26 20:49:24 +0000
commit1cf50512acf1e7098750465e4cb94a27d614c480 (patch)
tree121661012bd6d0355a83e659bcb0e3a503b9e384 /extensions/renderer
parent3ab1c0a52ad4052331f0f8d2c3953a78ea6173ae (diff)
downloadchromium_src-1cf50512acf1e7098750465e4cb94a27d614c480.zip
chromium_src-1cf50512acf1e7098750465e4cb94a27d614c480.tar.gz
chromium_src-1cf50512acf1e7098750465e4cb94a27d614c480.tar.bz2
Fix remote frame origin access in ContentWatcher::NotifyBrowserOfChange.
The frame traversal in that function was accessing the frame's SecurityOrigin via the document(), which is incorrect in the case of remote frames which have no document(). BUG=581274 Review URL: https://codereview.chromium.org/1634203002 Cr-Commit-Position: refs/heads/master@{#371592}
Diffstat (limited to 'extensions/renderer')
-rw-r--r--extensions/renderer/content_watcher.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/extensions/renderer/content_watcher.cc b/extensions/renderer/content_watcher.cc
index d16f356..7cb1851 100644
--- a/extensions/renderer/content_watcher.cc
+++ b/extensions/renderer/content_watcher.cc
@@ -97,7 +97,7 @@ void ContentWatcher::NotifyBrowserOfChange(
std::set<base::StringPiece> transitive_selectors;
for (blink::WebFrame* frame = top_frame; frame;
frame = frame->traverseNext(/*wrap=*/false)) {
- if (top_origin.canAccess(frame->document().securityOrigin())) {
+ if (top_origin.canAccess(frame->securityOrigin())) {
std::map<blink::WebFrame*, std::set<std::string> >::const_iterator
frame_selectors = matching_selectors_.find(frame);
if (frame_selectors != matching_selectors_.end()) {