Index: webrequest.js |
=================================================================== |
--- a/webrequest.js |
+++ b/webrequest.js |
@@ -56,7 +56,10 @@ |
return {}; |
var type = details.type; |
- if (type == "main_frame" || type == "sub_frame") |
+ // 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 (type == "main_frame" || type == "sub_frame" || !(details.tabId in frames)) |
recordFrame(details.tabId, details.frameId, details.parentFrameId, details.url); |
if (type == "main_frame") |