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

Unified Diff: ext/background.js

Issue 29793570: Issue 6692 - Update frame structure for about:blank frames earlier (Closed)
Patch Set: Only handle about:blank Created May 29, 2018, 5:26 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: ext/background.js
diff --git a/ext/background.js b/ext/background.js
index 7bf5e393f74b5785b4c83580edc63bee67410d85..2335d144a47875f21d87453cee81b1731e516e29 100644
--- a/ext/background.js
+++ b/ext/background.js
@@ -274,6 +274,18 @@
}
});
+ browser.webNavigation.onBeforeNavigate.addListener(details =>
+ {
+ // We also need to update the frame structure for about:blank frames, in
+ // order to properly attribute the requests they make.
Sebastian Noack 2018/05/29 17:35:09 This comment is a bit vague. In my tests about:bla
kzar 2018/05/29 17:46:18 Done.
+ let {url} = details;
Sebastian Noack 2018/05/29 17:35:08 Nit: I don't think this temporary variable is wort
kzar 2018/05/29 17:46:18 Done.
+ if (url == "about:blank")
+ {
+ updatePageFrameStructure(details.frameId, details.tabId, url,
+ details.parentFrameId);
+ }
+ });
+
function forgetTab(tabId)
{
ext.pages.onRemoved._dispatch(tabId);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld