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

Unified Diff: webrequest.js

Issue 11579001: Workaround for Chrome not specifying which request is main_frame under some circumstances (Closed)
Patch Set: Created Aug. 28, 2013, 1:04 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: webrequest.js
===================================================================
--- a/webrequest.js
+++ b/webrequest.js
@@ -56,6 +56,13 @@
return {};
var type = details.type;
+
+ // Workaround: Under some circumstances Chrome 29+ gives top frame the
+ // type "object" instead of "main_frame". We work around that by assuming
+ // that the first request belongs to the top frame.
+ if (!(details.tabId in frames))
+ type = "main_frame";
Wladimir Palant 2013/08/29 05:57:40 There are two assumption here which both seem to b
+
if (type == "main_frame" || type == "sub_frame")
recordFrame(details.tabId, details.frameId, details.parentFrameId, details.url);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld