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

Commits:

13 changed files:

Changes:

  • browser/base/content/main-popupset.inc.xhtml
    ... ... @@ -133,7 +133,8 @@
    133 133
              hidden="true"
    
    134 134
              overflowpadding="4"
    
    135 135
              norolluponanchor="true"
    
    136
    -         nomaxresults="true" />
    
    136
    +         nomaxresults="true"
    
    137
    +         locationspecific="true" />
    
    137 138
     
    
    138 139
       <!-- for search with one-off buttons -->
    
    139 140
       <panel is="search-autocomplete-richlistbox-popup"
    

  • browser/components/aboutlogins/AboutLoginsParent.sys.mjs
    ... ... @@ -87,12 +87,9 @@ export class AboutLoginsParent extends JSWindowActorParent {
    87 87
         // Only respond to messages sent from a privlegedabout process. Ideally
    
    88 88
         // we would also check the contentPrincipal.originNoSuffix but this
    
    89 89
         // check has been removed due to bug 1576722.
    
    90
    -    if (
    
    91
    -      this.browsingContext.embedderElement.remoteType !=
    
    92
    -      EXPECTED_ABOUTLOGINS_REMOTE_TYPE
    
    93
    -    ) {
    
    90
    +    if (this.manager.remoteType != EXPECTED_ABOUTLOGINS_REMOTE_TYPE) {
    
    94 91
           throw new Error(
    
    95
    -        `AboutLoginsParent: Received ${message.name} message the remote type didn't match expectations: ${this.browsingContext.embedderElement.remoteType} == ${EXPECTED_ABOUTLOGINS_REMOTE_TYPE}`
    
    92
    +        `AboutLoginsParent: Received ${message.name} message the remote type didn't match expectations: ${this.manager.remoteType} == ${EXPECTED_ABOUTLOGINS_REMOTE_TYPE}`
    
    96 93
           );
    
    97 94
         }
    
    98 95
     
    

  • browser/components/migration/MigrationWizardParent.sys.mjs
    ... ... @@ -62,9 +62,8 @@ export class MigrationWizardParent extends JSWindowActorParent {
    62 62
         // make sure that any messages from content are coming from the privileged
    
    63 63
         // about content process type.
    
    64 64
         if (
    
    65
    -      !this.browsingContext.currentWindowGlobal.isInProcess &&
    
    66
    -      this.browsingContext.currentRemoteType !=
    
    67
    -        E10SUtils.PRIVILEGEDABOUT_REMOTE_TYPE
    
    65
    +      !this.manager.isInProcess &&
    
    66
    +      this.manager.remoteType != E10SUtils.PRIVILEGEDABOUT_REMOTE_TYPE
    
    68 67
         ) {
    
    69 68
           throw new Error(
    
    70 69
             "MigrationWizardParent: received message from the wrong content process type."
    

  • dom/base/Document.cpp
    No preview for this file type
  • dom/base/DocumentOrShadowRoot.cpp
    ... ... @@ -62,9 +62,7 @@ void DocumentOrShadowRoot::AddSizeOfExcludingThis(nsWindowSizes& aSizes) const {
    62 62
     }
    
    63 63
     
    
    64 64
     DocumentOrShadowRoot::~DocumentOrShadowRoot() {
    
    65
    -  for (StyleSheet* sheet : mStyleSheets) {
    
    66
    -    sheet->ClearAssociatedDocumentOrShadowRoot();
    
    67
    -  }
    
    65
    +  MOZ_ASSERT(mStyleSheets.IsEmpty());
    
    68 66
     }
    
    69 67
     
    
    70 68
     StyleSheetList* DocumentOrShadowRoot::StyleSheets() {
    

  • dom/base/ShadowRoot.cpp
    ... ... @@ -105,6 +105,8 @@ ShadowRoot::~ShadowRoot() {
    105 105
     
    
    106 106
       MOZ_DIAGNOSTIC_ASSERT(!OwnerDoc()->IsComposedDocShadowRoot(*this));
    
    107 107
     
    
    108
    +  DocumentOrShadowRoot::Unlink(this);
    
    109
    +
    
    108 110
       UnsetFlags(NODE_IS_IN_SHADOW_TREE);
    
    109 111
     
    
    110 112
       // nsINode destructor expects mSubtreeRoot == this.
    

  • dom/chrome-webidl/WindowGlobalActors.webidl
    ... ... @@ -80,6 +80,9 @@ interface WindowGlobalParent : WindowContext {
    80 80
     
    
    81 81
       readonly attribute long osPid;
    
    82 82
     
    
    83
    +  // The remote type of `this.domProcess`.
    
    84
    +  readonly attribute UTF8String? remoteType;
    
    85
    +
    
    83 86
       // A WindowGlobalParent is the root in its process if it has no parent, or its
    
    84 87
       // embedder is in a different process.
    
    85 88
       readonly attribute boolean isProcessRoot;
    

  • dom/ipc/WindowGlobalParent.cpp
    ... ... @@ -591,6 +591,10 @@ const nsACString& WindowGlobalParent::GetRemoteType() {
    591 591
       return NOT_REMOTE_TYPE;
    
    592 592
     }
    
    593 593
     
    
    594
    +void WindowGlobalParent::GetRemoteType(nsACString& aRemoteType) {
    
    595
    +  aRemoteType = GetRemoteType();
    
    596
    +}
    
    597
    +
    
    594 598
     void WindowGlobalParent::NotifyContentBlockingEvent(
    
    595 599
         uint32_t aEvent, nsIRequest* aRequest, bool aBlocked,
    
    596 600
         const nsACString& aTrackingOrigin,
    

  • dom/ipc/WindowGlobalParent.h
    ... ... @@ -218,6 +218,7 @@ class WindowGlobalParent final : public WindowContext,
    218 218
       nsITransportSecurityInfo* GetSecurityInfo() { return mSecurityInfo; }
    
    219 219
     
    
    220 220
       const nsACString& GetRemoteType() override;
    
    221
    +  void GetRemoteType(nsACString& aRemoteType);
    
    221 222
     
    
    222 223
       void NotifySessionStoreUpdatesComplete(Element* aEmbedder);
    
    223 224
     
    

  • services/fxaccounts/FxAccountsWebChannel.sys.mjs
    ... ... @@ -244,10 +244,12 @@ FxAccountsWebChannel.prototype = {
    244 244
               lazy.accountServer.asciiHost.endsWith("." + val)
    
    245 245
             );
    
    246 246
           });
    
    247
    -    let { currentRemoteType } = sendingContext.browsingContext;
    
    248
    -    if (shouldCheckRemoteType && currentRemoteType != "privilegedmozilla") {
    
    247
    +    if (
    
    248
    +      shouldCheckRemoteType &&
    
    249
    +      sendingContext.remoteType != "privilegedmozilla"
    
    250
    +    ) {
    
    249 251
           log.error(
    
    250
    -        `Rejected FxA webchannel message from remoteType = ${currentRemoteType}`
    
    252
    +        `Rejected FxA webchannel message from remoteType = ${sendingContext.remoteType}`
    
    251 253
           );
    
    252 254
           return;
    
    253 255
         }
    
    ... ... @@ -471,6 +473,9 @@ FxAccountsWebChannel.prototype = {
    471 473
          *               The <EventTarget> where the message was sent.
    
    472 474
          *        @param sendingContext.principal {Principal}
    
    473 475
          *               The <Principal> of the EventTarget where the message was sent.
    
    476
    +     *        @param sendingContext.remoteType {String}
    
    477
    +     *               The remoteType from which the
    
    478
    +     *               WebChannelMessageToChrome was sent.
    
    474 479
          * @private
    
    475 480
          *
    
    476 481
          */
    

  • toolkit/actors/WebChannelParent.sys.mjs
    ... ... @@ -18,6 +18,7 @@ export class WebChannelParent extends JSWindowActorParent {
    18 18
           browser: this.browsingContext.top.embedderElement,
    
    19 19
           eventTarget: msg.data.eventTarget,
    
    20 20
           principal: this.manager.documentPrincipal,
    
    21
    +      remoteType: this.manager.remoteType,
    
    21 22
         };
    
    22 23
         // data must be a string except for a few legacy origins allowed by browser-content.js.
    
    23 24
         if (typeof data == "string") {
    

  • toolkit/components/extensions/ConduitsParent.sys.mjs
    ... ... @@ -165,19 +165,23 @@ const Hub = {
    165 165
         let windowGlobal = actor.manager;
    
    166 166
     
    
    167 167
         while (windowGlobal) {
    
    168
    -      let { browsingContext: bc, documentPrincipal: prin } = windowGlobal;
    
    168
    +      let {
    
    169
    +        parentWindowContext: parent,
    
    170
    +        documentPrincipal: prin,
    
    171
    +        remoteType,
    
    172
    +      } = windowGlobal;
    
    169 173
     
    
    170 174
           if (prin.addonId !== extensionId) {
    
    171 175
             throw new Error(`Bad ${extensionId} principal: ${prin.URI.spec}`);
    
    172 176
           }
    
    173
    -      if (bc.currentRemoteType !== prin.addonPolicy.extension.remoteType) {
    
    174
    -        throw new Error(`Bad ${extensionId} process: ${bc.currentRemoteType}`);
    
    177
    +      if (remoteType !== prin.addonPolicy.extension.remoteType) {
    
    178
    +        throw new Error(`Bad ${extensionId} process: ${remoteType}`);
    
    175 179
           }
    
    176 180
     
    
    177
    -      if (!bc.parent) {
    
    181
    +      if (!parent) {
    
    178 182
             return true;
    
    179 183
           }
    
    180
    -      windowGlobal = bc.embedderWindowGlobal;
    
    184
    +      windowGlobal = parent;
    
    181 185
         }
    
    182 186
         throw new Error(`Missing WindowGlobalParent for ${extensionId}`);
    
    183 187
       },
    

  • toolkit/modules/WebChannel.sys.mjs
    ... ... @@ -170,6 +170,9 @@ WebChannel.prototype = {
    170 170
        *               @param sendingContext.principal {Principal}
    
    171 171
        *                      The <Principal> of the EventTarget where the
    
    172 172
        *                      message was sent.
    
    173
    +   *               @param sendingContext.remoteType {String}
    
    174
    +   *                      The remoteType from which the
    
    175
    +   *                      WebChannelMessageToChrome was sent.
    
    173 176
        */
    
    174 177
       listen(callback) {
    
    175 178
         if (this._deliverCallback) {