Skip to content
Snippets Groups Projects
Commit bea39ca4 authored by Pier Angelo Vendrame's avatar Pier Angelo Vendrame :jack_o_lantern: Committed by Richard Pospesel
Browse files

Revert "Bug 41881: Don't persist custom network requests on private windows"

This reverts commit 6450a4e6.
parent bed64b83
No related branches found
No related tags found
No related merge requests found
......@@ -4,11 +4,6 @@
"use strict";
const lazy = {};
ChromeUtils.defineESModuleGetters(lazy, {
PrivateBrowsingUtils: "resource://gre/modules/PrivateBrowsingUtils.sys.mjs",
});
const {
Component,
createFactory,
......@@ -127,12 +122,10 @@ class HTTPCustomRequestPanel extends Component {
async componentDidMount() {
let { connector, request } = this.props;
if (!lazy.PrivateBrowsingUtils.isWindowPrivate(window)) {
const persistedCustomRequest = await asyncStorage.getItem(
"devtools.netmonitor.customRequest"
);
request = request || persistedCustomRequest;
}
const persistedCustomRequest = await asyncStorage.getItem(
"devtools.netmonitor.customRequest"
);
request = request || persistedCustomRequest;
if (!request) {
this.setState({ _isStateDataReady: true });
......@@ -198,9 +191,7 @@ class HTTPCustomRequestPanel extends Component {
}
componentWillUnmount() {
if (!lazy.PrivateBrowsingUtils.isWindowPrivate(window)) {
asyncStorage.setItem("devtools.netmonitor.customRequest", this.state);
}
asyncStorage.setItem("devtools.netmonitor.customRequest", this.state);
}
handleChangeURL(event) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment