Skip to content

Commit 0910566

Browse files
committed
Removed useless work-around suggested in moz bug 1410755 which caused Tor Browser content process crashes.
1 parent c0fbf92 commit 0910566

1 file changed

Lines changed: 5 additions & 14 deletions

File tree

src/bg/RequestUtil.js

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
'use strict';
22
{
3-
let NULL = new Uint8Array();
4-
53
let xmlFeedOrImage = /^(?:(?:application|text)\/(?:(?:r(?:ss|df)|atom)\+)xml(;|$))|image\//i;
64
let rawXml = /^(?:application|text)\/xml;/i;
7-
let brokenOnLoad;
5+
let brokenXMLOnLoad;
86

97
let pendingRequests = new Map();
108

@@ -83,12 +81,12 @@
8381
}
8482

8583
if (xmlFeedOrImage.test(content.type) && !/\/svg\b/i.test(content.type)) return;
86-
if (typeof brokenOnLoad === "undefined") {
87-
brokenOnLoad = await (async () => parseInt((await browser.runtime.getBrowserInfo()).version) < 61)();
84+
if (typeof brokenXMLOnLoad === "undefined") {
85+
brokenXMLOnLoad = await (async () => parseInt((await browser.runtime.getBrowserInfo()).version) < 61)();
8886
}
8987

90-
let mustCheckFeed = brokenOnLoad && frameId === 0 && rawXml.test(content.type);
91-
debug("mustCheckFeed = %s, brokenOnLoad = %s", mustCheckFeed, brokenOnLoad);
88+
let mustCheckFeed = brokenXMLOnLoad && frameId === 0 && rawXml.test(content.type);
89+
debug("mustCheckFeed = %s, brokenXMLOnLoad = %s", mustCheckFeed, brokenXMLOnLoad);
9290
let filter = browser.webRequest.filterResponseData(requestId);
9391
let buffer = [];
9492
let first = true;
@@ -114,13 +112,6 @@
114112
}
115113
};
116114

117-
if (brokenOnLoad) {
118-
filter.onstart = event => {
119-
filter.write(NULL);
120-
debug("onstart", url);
121-
}
122-
}
123-
124115
filter.ondata = event => {
125116
if (first) {
126117
runAndFlush();

0 commit comments

Comments
 (0)