Browse Source

Fix patch for bug 1480236

Ian Neal 5 months ago
parent
commit
cd3fab9d93

+ 24 - 14
mozilla-release/patches/1480236-PARTIAL-notests-69a1.patch

@@ -2,13 +2,13 @@
 # User Olli Pettay <Olli.Pettay@helsinki.fi>
 # Date 1558686423 -10800
 # Node ID 574e6b299f2d8683fa071ddee27c32ebb61dbc80
-# Parent  4c1b7df00533fd0971c5d472ce51d05d07039c56
+# Parent  cf6919e788e54e0cdd7105dec5b3a4a08fca9d82
 Bug 1480236 - Implement queueMicrotask(), r=baku
 
 diff --git a/dom/base/nsIGlobalObject.cpp b/dom/base/nsIGlobalObject.cpp
 --- a/dom/base/nsIGlobalObject.cpp
 +++ b/dom/base/nsIGlobalObject.cpp
-@@ -1,19 +1,28 @@
+@@ -1,22 +1,30 @@
  /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  /* vim: set ts=8 sts=2 et sw=2 tw=80: */
  /* This Source Code Form is subject to the terms of the Mozilla Public
@@ -26,9 +26,12 @@ diff --git a/dom/base/nsIGlobalObject.cpp b/dom/base/nsIGlobalObject.cpp
 +using mozilla::CycleCollectedJSContext;
 +using mozilla::ErrorResult;
 +using mozilla::IgnoredErrorResult;
+ using mozilla::Maybe;
 +using mozilla::MicroTaskRunnable;
+ using mozilla::dom::ClientInfo;
+ using mozilla::dom::ServiceWorkerDescriptor;
 +using mozilla::dom::VoidFunction;
-+
+ 
  nsIGlobalObject::~nsIGlobalObject()
  {
    UnlinkHostObjectURIs();
@@ -36,9 +39,7 @@ diff --git a/dom/base/nsIGlobalObject.cpp b/dom/base/nsIGlobalObject.cpp
  
  nsIPrincipal*
  nsIGlobalObject::PrincipalOrNull()
- {
-@@ -107,8 +116,34 @@ nsIGlobalObject::TraverseHostObjectURIs(
-   if (!NS_IsMainThread()) {
+@@ -112,16 +120,42 @@ nsIGlobalObject::TraverseHostObjectURIs(
      return;
    }
  
@@ -46,7 +47,7 @@ diff --git a/dom/base/nsIGlobalObject.cpp b/dom/base/nsIGlobalObject.cpp
      nsHostObjectProtocolHandler::Traverse(mHostObjectURIs[index], aCb);
    }
  }
-+
+ 
 +class QueuedMicrotask : public MicroTaskRunnable {
 + public:
 +  QueuedMicrotask(nsIGlobalObject* aGlobal, VoidFunction& aCallback)
@@ -72,10 +73,19 @@ diff --git a/dom/base/nsIGlobalObject.cpp b/dom/base/nsIGlobalObject.cpp
 +    context->DispatchToMicroTask(mt.forget());
 +  }
 +}
++
+ Maybe<ClientInfo>
+ nsIGlobalObject::GetClientInfo() const
+ {
+   // By default globals do not expose themselves as a client.  Only real
+   // window and worker globals are currently considered clients.
+   return Maybe<ClientInfo>();
+ }
+ 
 diff --git a/dom/base/nsIGlobalObject.h b/dom/base/nsIGlobalObject.h
 --- a/dom/base/nsIGlobalObject.h
 +++ b/dom/base/nsIGlobalObject.h
-@@ -15,16 +15,22 @@
+@@ -18,16 +18,22 @@
  
  #define NS_IGLOBALOBJECT_IID \
  { 0x11afa8be, 0xd997, 0x4e07, \
@@ -98,14 +108,14 @@ diff --git a/dom/base/nsIGlobalObject.h b/dom/base/nsIGlobalObject.h
  
  protected:
    nsIGlobalObject()
-@@ -71,16 +77,18 @@ public:
+@@ -80,16 +86,18 @@ public:
+   virtual bool IsInSyncOperation() { return false; }
  
-   // Any CC class inheriting nsIGlobalObject should call these 2 methods if it
-   // exposes the URL API.
-   void UnlinkHostObjectURIs();
-   void TraverseHostObjectURIs(nsCycleCollectionTraversalCallback &aCb);
+   virtual mozilla::Maybe<mozilla::dom::ClientInfo>
+   GetClientInfo() const;
  
-   virtual bool IsInSyncOperation() { return false; }
+   virtual mozilla::Maybe<mozilla::dom::ServiceWorkerDescriptor>
+   GetController() const;
  
 +  void QueueMicrotask(mozilla::dom::VoidFunction& aCallback);
 +

+ 1 - 1
mozilla-release/patches/1835833-115a1.patch

@@ -3,7 +3,7 @@
 # Date 1685465808 0
 #      Tue May 30 16:56:48 2023 +0000
 # Node ID fdae8692c5f724b7209d50201e52c8efac172cd7
-# Parent  fb9cabb6035a24110c8b3587b3a13b2981c7defe
+# Parent  cb6eeda548278952fceefceaa7bd046188968b42
 Bug 1835833 - Update OTS to 9.1.0. r=jfkthame
 
 Differential Revision: https://phabricator.services.mozilla.com/D179464