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: Created Sept. 16, 2018, 2:10 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
@@ -246,20 +246,20 @@
updatePageFrameStructure(details.frameId, details.tabId, details.url,
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:"))
+ // Requests can be made by about: and data: frames before the frame's
+ // onCommitted event has fired, so we update the frame structure for those
+ // now.
+ if (/^(about|data):/.test(details.url))
Sebastian Noack 2018/09/17 16:02:31 Nit: I'm not sure if a regular expression is justi
Manish Jethani 2018/09/21 20:32:24 Changed to String.startsWith. I have a hunch that
{
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