Skip to content

Commit e22cd35

Browse files
committed
Backed out 9 changesets (bug 1580448) for linux build bustages in /builds/worker/workspace/obj-build/dist/include/mozilla/dom/JSWindowActorChild.h CLOSED TREE
Backed out changeset 6b4db1a501df (bug 1580448) Backed out changeset 677257a41457 (bug 1580448) Backed out changeset 6db8de5fc125 (bug 1580448) Backed out changeset fd7527c86239 (bug 1580448) Backed out changeset bfbd3330b0a5 (bug 1580448) Backed out changeset dafa80c63322 (bug 1580448) Backed out changeset 2a1701831a6a (bug 1580448) Backed out changeset 9b548bd38671 (bug 1580448) Backed out changeset 358f764ae48b (bug 1580448)
1 parent 49c6346 commit e22cd35

File tree

70 files changed

+501
-2182
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

70 files changed

+501
-2182
lines changed

dom/base/ChromeUtils.cpp

Lines changed: 3 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
#include "mozilla/dom/ContentChild.h"
2727
#include "mozilla/dom/ContentParent.h"
2828
#include "mozilla/dom/IdleDeadline.h"
29-
#include "mozilla/dom/JSActorService.h"
29+
#include "mozilla/dom/JSWindowActorService.h"
3030
#include "mozilla/dom/MediaControlUtils.h"
3131
#include "mozilla/dom/MediaControlService.h"
3232
#include "mozilla/dom/MediaMetadata.h"
@@ -1204,7 +1204,7 @@ void ChromeUtils::RegisterWindowActor(const GlobalObject& aGlobal,
12041204
ErrorResult& aRv) {
12051205
MOZ_ASSERT(XRE_IsParentProcess());
12061206

1207-
RefPtr<JSActorService> service = JSActorService::GetSingleton();
1207+
RefPtr<JSWindowActorService> service = JSWindowActorService::GetSingleton();
12081208
service->RegisterWindowActor(aName, aOptions, aRv);
12091209
}
12101210

@@ -1213,30 +1213,10 @@ void ChromeUtils::UnregisterWindowActor(const GlobalObject& aGlobal,
12131213
const nsACString& aName) {
12141214
MOZ_ASSERT(XRE_IsParentProcess());
12151215

1216-
RefPtr<JSActorService> service = JSActorService::GetSingleton();
1216+
RefPtr<JSWindowActorService> service = JSWindowActorService::GetSingleton();
12171217
service->UnregisterWindowActor(aName);
12181218
}
12191219

1220-
/* static */
1221-
void ChromeUtils::RegisterProcessActor(const GlobalObject& aGlobal,
1222-
const nsACString& aName,
1223-
const ProcessActorOptions& aOptions,
1224-
ErrorResult& aRv) {
1225-
MOZ_ASSERT(XRE_IsParentProcess());
1226-
1227-
RefPtr<JSActorService> service = JSActorService::GetSingleton();
1228-
service->RegisterProcessActor(aName, aOptions, aRv);
1229-
}
1230-
1231-
/* static */
1232-
void ChromeUtils::UnregisterProcessActor(const GlobalObject& aGlobal,
1233-
const nsACString& aName) {
1234-
MOZ_ASSERT(XRE_IsParentProcess());
1235-
1236-
RefPtr<JSActorService> service = JSActorService::GetSingleton();
1237-
service->UnregisterProcessActor(aName);
1238-
}
1239-
12401220
/* static */
12411221
bool ChromeUtils::IsClassifierBlockingErrorCode(GlobalObject& aGlobal,
12421222
uint32_t aError) {

dom/base/ChromeUtils.h

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ struct MediaMetadataInit;
3030
class MozQueryInterface;
3131
class PrecompiledScript;
3232
class Promise;
33-
struct ProcessActorOptions;
3433
struct WindowActorOptions;
3534

3635
class ChromeUtils {
@@ -201,14 +200,6 @@ class ChromeUtils {
201200
static void UnregisterWindowActor(const GlobalObject& aGlobal,
202201
const nsACString& aName);
203202

204-
static void RegisterProcessActor(const GlobalObject& aGlobal,
205-
const nsACString& aName,
206-
const ProcessActorOptions& aOptions,
207-
ErrorResult& aRv);
208-
209-
static void UnregisterProcessActor(const GlobalObject& aGlobal,
210-
const nsACString& aName);
211-
212203
static bool IsClassifierBlockingErrorCode(GlobalObject& aGlobal,
213204
uint32_t aError);
214205

dom/base/InProcessBrowserChildMessageManager.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
#include "mozilla/dom/SameProcessMessageQueue.h"
2121
#include "mozilla/dom/ScriptLoader.h"
2222
#include "mozilla/dom/WindowProxyHolder.h"
23-
#include "mozilla/dom/JSActorService.h"
23+
#include "mozilla/dom/JSWindowActorService.h"
2424

2525
using namespace mozilla;
2626
using namespace mozilla::dom;
@@ -37,7 +37,7 @@ InProcessBrowserChildMessageManager::Create(nsDocShell* aShell,
3737
NS_ENSURE_TRUE(mm->Init(), nullptr);
3838

3939
if (XRE_IsParentProcess()) {
40-
RefPtr<JSActorService> wasvc = JSActorService::GetSingleton();
40+
RefPtr<JSWindowActorService> wasvc = JSWindowActorService::GetSingleton();
4141
wasvc->RegisterChromeEventTarget(mm);
4242
}
4343

@@ -111,7 +111,7 @@ InProcessBrowserChildMessageManager::InProcessBrowserChildMessageManager(
111111

112112
InProcessBrowserChildMessageManager::~InProcessBrowserChildMessageManager() {
113113
if (XRE_IsParentProcess()) {
114-
JSActorService::UnregisterChromeEventTarget(this);
114+
JSWindowActorService::UnregisterChromeEventTarget(this);
115115
}
116116

117117
mAnonymousGlobalScopes.Clear();

dom/base/nsWindowRoot.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
#include "mozilla/dom/BrowserParent.h"
3131
#include "mozilla/dom/HTMLTextAreaElement.h"
3232
#include "mozilla/dom/HTMLInputElement.h"
33-
#include "mozilla/dom/JSActorService.h"
33+
#include "mozilla/dom/JSWindowActorService.h"
3434

3535
#ifdef MOZ_XUL
3636
# include "nsXULElement.h"
@@ -50,7 +50,7 @@ nsWindowRoot::~nsWindowRoot() {
5050
}
5151

5252
if (XRE_IsContentProcess()) {
53-
JSActorService::UnregisterChromeEventTarget(this);
53+
JSWindowActorService::UnregisterChromeEventTarget(this);
5454
}
5555
}
5656

@@ -379,7 +379,7 @@ already_AddRefed<EventTarget> NS_NewWindowRoot(nsPIDOMWindowOuter* aWindow) {
379379
nsCOMPtr<EventTarget> result = new nsWindowRoot(aWindow);
380380

381381
if (XRE_IsContentProcess()) {
382-
RefPtr<JSActorService> wasvc = JSActorService::GetSingleton();
382+
RefPtr<JSWindowActorService> wasvc = JSWindowActorService::GetSingleton();
383383
wasvc->RegisterChromeEventTarget(result);
384384
}
385385

dom/chrome-webidl/ChromeUtils.webidl

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44
* You can obtain one at http://mozilla.org/MPL/2.0/.
55
*/
66

7-
interface nsIContentChild;
8-
97
/**
108
* An optimized QueryInterface method, generated by generateQI.
119
*
@@ -448,18 +446,6 @@ partial namespace ChromeUtils {
448446
[ChromeOnly]
449447
void unregisterWindowActor(UTF8String aName);
450448

451-
/**
452-
* Register a new toplevel content global actor. This method may only be
453-
* called in the parent process. |name| must be globally unique.
454-
*
455-
* See JSProcessActor.webidl for ProcessActorOptions fields documentation.
456-
*/
457-
[ChromeOnly, Throws]
458-
void registerProcessActor(UTF8String aName, optional ProcessActorOptions aOptions = {});
459-
460-
[ChromeOnly]
461-
void unregisterProcessActor(UTF8String aName);
462-
463449
[ChromeOnly]
464450
// aError should a nsresult.
465451
boolean isClassifierBlockingErrorCode(unsigned long aError);

dom/chrome-webidl/JSActor.webidl

Lines changed: 0 additions & 54 deletions
This file was deleted.

dom/chrome-webidl/JSProcessActor.webidl

Lines changed: 0 additions & 76 deletions
This file was deleted.

dom/chrome-webidl/JSWindowActor.webidl

Lines changed: 53 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,19 @@
44
* License, v. 2.0. If a copy of the MPL was not distributed with this
55
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
66

7-
/**
8-
* An actor architecture designed to allow compositional parent/content
9-
* communications. The lifetime of a JSWindowActor{Child, Parent} is the `WindowGlobalParent`
10-
* (for the parent-side) / `WindowGlobalChild` (for the child-side).
11-
*
12-
* See https://firefox-source-docs.mozilla.org/dom/Fission.html#jswindowactor for
13-
* more details on how to use this architecture.
14-
*/
15-
167
interface nsISupports;
8+
interface nsIContentChild;
9+
interface nsIContentParent;
10+
11+
interface mixin JSWindowActor {
12+
[Throws]
13+
void sendAsyncMessage(DOMString messageName,
14+
optional any obj);
15+
16+
[Throws]
17+
Promise<any> sendQuery(DOMString messageName,
18+
optional any obj);
19+
};
1720

1821
[ChromeOnly, Exposed=Window]
1922
interface JSWindowActorParent {
@@ -30,13 +33,13 @@ interface JSWindowActorParent {
3033
[Throws]
3134
readonly attribute CanonicalBrowsingContext? browsingContext;
3235
};
33-
JSWindowActorParent includes JSActor;
36+
JSWindowActorParent includes JSWindowActor;
3437

3538
[ChromeOnly, Exposed=Window]
3639
interface JSWindowActorChild {
3740
[ChromeOnly]
3841
constructor();
39-
42+
4043
/**
4144
* Actor initialization occurs after the constructor is called but before the
4245
* first message is delivered. Until the actor is initialized, accesses to
@@ -61,7 +64,45 @@ interface JSWindowActorChild {
6164
[Throws]
6265
readonly attribute WindowProxy? contentWindow;
6366
};
64-
JSWindowActorChild includes JSActor;
67+
JSWindowActorChild includes JSWindowActor;
68+
69+
/**
70+
* WebIDL callback interface version of the nsIObserver interface for use when
71+
* calling the observe method on JSWindowActors.
72+
*
73+
* NOTE: This isn't marked as ChromeOnly, as it has no interface object, and
74+
* thus cannot be conditionally exposed.
75+
*/
76+
[Exposed=Window]
77+
callback interface MozObserverCallback {
78+
void observe(nsISupports subject, ByteString topic, DOMString? data);
79+
};
80+
81+
/**
82+
* WebIDL callback interface calling the `willDestroy`, `didDestroy`, and
83+
* `actorCreated` methods on JSWindowActors.
84+
*/
85+
[MOZ_CAN_RUN_SCRIPT_BOUNDARY]
86+
callback MozJSWindowActorCallback = void();
87+
88+
/**
89+
* The willDestroy method, if present, will be called at the last opportunity
90+
* to send messages to the remote side, giving implementers the chance to clean
91+
* up and send final messages.
92+
* The didDestroy method, if present, will be called after the actor is no
93+
* longer able to receive any more messages.
94+
* The actorCreated method, if present, will be called immediately after the
95+
* actor has been created and initialized.
96+
*
97+
* NOTE: Messages may be received between willDestroy and didDestroy, but they
98+
* may not be sent.
99+
*/
100+
[GenerateInit]
101+
dictionary MozJSWindowActorCallbacks {
102+
[ChromeOnly] MozJSWindowActorCallback willDestroy;
103+
[ChromeOnly] MozJSWindowActorCallback didDestroy;
104+
[ChromeOnly] MozJSWindowActorCallback actorCreated;
105+
};
65106

66107
/**
67108
* Used by ChromeUtils.registerWindowActor() to register JS window actor.

dom/chrome-webidl/WindowGlobalActors.webidl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ interface URI;
88
interface nsIDocShell;
99
interface RemoteTab;
1010
interface nsITransportSecurityInfo;
11-
interface nsIContentParent;
1211

1312
[Exposed=Window, ChromeOnly]
1413
interface WindowContext {

dom/chrome-webidl/moz.build

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,6 @@ WEBIDL_FILES = [
4949
'HeapSnapshot.webidl',
5050
'InspectorUtils.webidl',
5151
'IteratorResult.webidl',
52-
'JSActor.webidl',
53-
'JSProcessActor.webidl',
5452
'JSWindowActor.webidl',
5553
'L10nOverlays.webidl',
5654
'Localization.webidl',

0 commit comments

Comments
 (0)