File tree 3 files changed +17
-3
lines changed
3 files changed +17
-3
lines changed Original file line number Diff line number Diff line change @@ -650,8 +650,10 @@ static const char* sObserverTopics[] = {
650
650
// PreallocateProcess is called by the PreallocatedProcessManager.
651
651
// ContentParent then takes this process back within GetNewOrUsedBrowserProcess.
652
652
/* static*/ RefPtr<ContentParent::LaunchPromise>
653
- ContentParent::PreallocateProcess () {
654
- RefPtr<ContentParent> process = new ContentParent (PREALLOC_REMOTE_TYPE, nsString ());
653
+ ContentParent::PreallocateProcess (const nsAString& aRecordingDispatchAddress) {
654
+ RefPtr<ContentParent> process = new ContentParent (
655
+ PREALLOC_REMOTE_TYPE,
656
+ aRecordingDispatchAddress);
655
657
656
658
MOZ_LOG (ContentParent::GetLog (), LogLevel::Debug,
657
659
(" Preallocating process of type prealloc" ));
Original file line number Diff line number Diff line change @@ -152,7 +152,8 @@ class ContentParent final
152
152
/* *
153
153
* Create a subprocess suitable for use later as a content process.
154
154
*/
155
- static RefPtr<LaunchPromise> PreallocateProcess ();
155
+ static RefPtr<LaunchPromise> PreallocateProcess (
156
+ const nsAString& aRecordingDispatchAddress = nsString());
156
157
157
158
/* *
158
159
* Start up the content-process machinery. This might include
Original file line number Diff line number Diff line change @@ -47,6 +47,8 @@ class PreallocatedProcessManagerImpl final : public nsIObserver {
47
47
48
48
static StaticRefPtr<PreallocatedProcessManagerImpl> sSingleton ;
49
49
50
+ static nsresult GetReplayDispatchServer (nsAString& dispatchServer);
51
+
50
52
PreallocatedProcessManagerImpl ();
51
53
~PreallocatedProcessManagerImpl ();
52
54
PreallocatedProcessManagerImpl (const PreallocatedProcessManagerImpl&) =
@@ -119,6 +121,15 @@ PreallocatedProcessManagerImpl::~PreallocatedProcessManagerImpl() {
119
121
MOZ_RELEASE_ASSERT (!mLaunchInProgress );
120
122
}
121
123
124
+ nsresult PreallocatedProcessManagerImpl::GetReplayDispatchServer (nsAString& addr) {
125
+ const char * envAddr = getenv (" RECORD_REPLAY_SERVER" );
126
+ if (envAddr) {
127
+ CopyUTF8toUTF16 (mozilla::Span (envAddr, strlen (envAddr)), addr);
128
+ return NS_OK;
129
+ }
130
+ return Preferences::GetString (" devtools.recordreplay.cloudServer" , addr);
131
+ }
132
+
122
133
void PreallocatedProcessManagerImpl::Init () {
123
134
Preferences::AddStrongObserver (this , " dom.ipc.processPrelaunch.enabled" );
124
135
// We have to respect processCount at all time. This is especially important
You can’t perform that action at this time.
0 commit comments