Index: webrequest.js |
=================================================================== |
--- a/webrequest.js |
+++ b/webrequest.js |
@@ -56,6 +56,13 @@ |
return {}; |
var type = details.type; |
+ |
+ // Assume that the first request belongs to the top frame. Chrome may give the |
+ // top frame the type "object" instead of "main_frame". |
+ // https://code.google.com/p/chromium/issues/detail?id=281711 |
+ if (details.frameId == 0 && !(details.tabId in frames) && type == "object") |
Wladimir Palant
2013/08/30 12:16:25
Please ensure details.tabId >= 0, tabId -1 means a
|
+ type = "main_frame"; |
+ |
if (type == "main_frame" || type == "sub_frame") |
recordFrame(details.tabId, details.frameId, details.parentFrameId, details.url); |