| Index: webrequest.js |
| =================================================================== |
| --- a/webrequest.js |
| +++ b/webrequest.js |
| @@ -67,6 +67,8 @@ |
| if (type == "main_frame" || type == "sub_frame") |
| recordFrame(details.tabId, details.frameId, details.parentFrameId, details.url); |
| + else if (details.tabId in frames && !(details.frameId in frames[details.tabId])) |
| + recordFrame(details.tabId, details.frameId, details.parentFrameId, null); |
| if (type == "main_frame") |
| return {}; |
| @@ -147,6 +149,15 @@ |
| { |
| if (!(tabId in frames)) |
| frames[tabId] = {}; |
| + |
| + if (frameUrl == null) |
| + { |
| + if (tabId in frames && parentFrameId in frames[tabId]) |
|
Wladimir Palant
2013/11/13 12:03:03
No point for the |tabId in frames| part of the che
|
| + frameUrl = frames[tabId][parentFrameId].url; |
| + else |
| + return; // We cannot do anything meaningful here |
| + } |
| + |
| frames[tabId][frameId] = {url: frameUrl, parent: parentFrameId}; |
| } |