Removed useless work-around suggested in moz bug 1410755 which caused Tor Browser content process crashes.
This commit is contained in:
parent
c0fbf92cfa
commit
0910566926
|
@ -1,10 +1,8 @@
|
|||
'use strict';
|
||||
{
|
||||
let NULL = new Uint8Array();
|
||||
|
||||
let xmlFeedOrImage = /^(?:(?:application|text)\/(?:(?:r(?:ss|df)|atom)\+)xml(;|$))|image\//i;
|
||||
let rawXml = /^(?:application|text)\/xml;/i;
|
||||
let brokenOnLoad;
|
||||
let brokenXMLOnLoad;
|
||||
|
||||
let pendingRequests = new Map();
|
||||
|
||||
|
@ -83,12 +81,12 @@
|
|||
}
|
||||
|
||||
if (xmlFeedOrImage.test(content.type) && !/\/svg\b/i.test(content.type)) return;
|
||||
if (typeof brokenOnLoad === "undefined") {
|
||||
brokenOnLoad = await (async () => parseInt((await browser.runtime.getBrowserInfo()).version) < 61)();
|
||||
if (typeof brokenXMLOnLoad === "undefined") {
|
||||
brokenXMLOnLoad = await (async () => parseInt((await browser.runtime.getBrowserInfo()).version) < 61)();
|
||||
}
|
||||
|
||||
let mustCheckFeed = brokenOnLoad && frameId === 0 && rawXml.test(content.type);
|
||||
debug("mustCheckFeed = %s, brokenOnLoad = %s", mustCheckFeed, brokenOnLoad);
|
||||
let mustCheckFeed = brokenXMLOnLoad && frameId === 0 && rawXml.test(content.type);
|
||||
debug("mustCheckFeed = %s, brokenXMLOnLoad = %s", mustCheckFeed, brokenXMLOnLoad);
|
||||
let filter = browser.webRequest.filterResponseData(requestId);
|
||||
let buffer = [];
|
||||
let first = true;
|
||||
|
@ -114,13 +112,6 @@
|
|||
}
|
||||
};
|
||||
|
||||
if (brokenOnLoad) {
|
||||
filter.onstart = event => {
|
||||
filter.write(NULL);
|
||||
debug("onstart", url);
|
||||
}
|
||||
}
|
||||
|
||||
filter.ondata = event => {
|
||||
if (first) {
|
||||
runAndFlush();
|
||||
|
|
Loading…
Reference in New Issue