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

Unified Diff: webrequest.js

Issue 28067007: Construct frame hierarchy using first request originating from it (Closed)
Patch Set: Created Nov. 13, 2013, 11:48 a.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
@@ -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};
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld