ma1 pushed to branch tor-browser-115.2.0esr-13.0-1 at The Tor Project / Applications / Tor Browser

Commits:

1 changed file:

Changes:

  • devtools/client/netmonitor/src/components/new-request/HTTPCustomRequestPanel.js
    ... ... @@ -4,6 +4,11 @@
    4 4
     
    
    5 5
     "use strict";
    
    6 6
     
    
    7
    +const lazy = {};
    
    8
    +ChromeUtils.defineESModuleGetters(lazy, {
    
    9
    +  PrivateBrowsingUtils: "resource://gre/modules/PrivateBrowsingUtils.sys.mjs",
    
    10
    +});
    
    11
    +
    
    7 12
     const {
    
    8 13
       Component,
    
    9 14
       createFactory,
    
    ... ... @@ -122,10 +127,12 @@ class HTTPCustomRequestPanel extends Component {
    122 127
     
    
    123 128
       async componentDidMount() {
    
    124 129
         let { connector, request } = this.props;
    
    125
    -    const persistedCustomRequest = await asyncStorage.getItem(
    
    126
    -      "devtools.netmonitor.customRequest"
    
    127
    -    );
    
    128
    -    request = request || persistedCustomRequest;
    
    130
    +    if (!lazy.PrivateBrowsingUtils.isWindowPrivate(window)) {
    
    131
    +      const persistedCustomRequest = await asyncStorage.getItem(
    
    132
    +        "devtools.netmonitor.customRequest"
    
    133
    +      );
    
    134
    +      request = request || persistedCustomRequest;
    
    135
    +    }
    
    129 136
     
    
    130 137
         if (!request) {
    
    131 138
           this.setState({ _isStateDataReady: true });
    
    ... ... @@ -191,7 +198,9 @@ class HTTPCustomRequestPanel extends Component {
    191 198
       }
    
    192 199
     
    
    193 200
       componentWillUnmount() {
    
    194
    -    asyncStorage.setItem("devtools.netmonitor.customRequest", this.state);
    
    201
    +    if (!lazy.PrivateBrowsingUtils.isWindowPrivate(window)) {
    
    202
    +      asyncStorage.setItem("devtools.netmonitor.customRequest", this.state);
    
    203
    +    }
    
    195 204
       }
    
    196 205
     
    
    197 206
       handleChangeURL(event) {