Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: chrome/ext/background.js

Issue 5673543668858880: Issue 451 - Fall back to the first known frame instead of hard-coding the top level frame (Closed)
Patch Set: Created May 9, 2014, 5:49 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/ext/background.js
===================================================================
--- a/chrome/ext/background.js
+++ b/chrome/ext/background.js
@@ -313,7 +313,7 @@
else
frameId = details.frameId;
- frame = frames[frameId] || frames[0];
+ frame = frames[frameId] || frames[Object.keys(frames)[0]];
Wladimir Palant 2014/05/13 14:29:49 Object.keys() doesn't guarantee a particular order
if (frame && !ext.webRequest.onBeforeRequest._dispatch(details.url, details.type, new Page({id: details.tabId}), frame))
return {cancel: true};
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld