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

Unified Diff: ext/background.js

Issue 29882555: Issue 6953 - Update frame structure for data URI frames (Closed) Base URL: https://hg.adblockplus.org/adblockpluschrome/
Patch Set: Remove mistakenly uploaded dependencies file Created Sept. 25, 2018, 4:08 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
===================================================================
--- a/ext/background.js
+++ b/ext/background.js
@@ -247,19 +247,21 @@
details.parentFrameId);
},
{types: ["main_frame", "sub_frame"], urls: ["http://*/*", "https://*/*"]},
["responseHeaders"]);
browser.webNavigation.onBeforeNavigate.addListener(details =>
{
// Requests can be made by about:blank frames before the frame's
- // onCommitted event has fired, so we update the frame structure
- // for those now.
- if (details.url.startsWith("about:"))
+ // onCommitted event has fired; besides, the parent frame's ID is not
+ // available in onCommitted, nor is the onHeadersReceived event fired for
+ // about: and data: frames; so we update the frame structure for such
+ // frames here.
+ if (details.url.startsWith("about:") || details.url.startsWith("data:"))
{
updatePageFrameStructure(details.frameId, details.tabId, details.url,
details.parentFrameId);
}
});
browser.webNavigation.onCommitted.addListener(details =>
{
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld