import changes from `dev' branch of rmottola/Arctic-Fox:

- Bug 1173051 - Minor optimizations for device storage enumerate on parent and child. r=dhylands (31037e471a)
- Bug 1020179 followup: Mark DeviceStorageRequest::GetRequester as override (and use NS_IMETHOD instead of NS_IMETHODIMP inside of class definition). rs=ehsan (b2a0808c21)
- Bug 1171170 - Consolidate/cache access to permissions, cycle collected objects in device storage. r=dhylands (8eddc30aed)
- Bug 1204618 - Add a field to the DeviceStorage object holding the low-disk-space status. r=dhylands, r=bzbarsky (52257b821f)
- Bug 1128505 - Preload Webapps.js for faster mozApps instantiation. r=fabrice (d540be89af)
- Bug 1166207 - Load preload.js in the Nuwa process. r=khuey (1310da32df)
- MOZ_FINAL -> final (887f351669)
- Bug 1200922: Add the ability to shut down a thread asynchronously. r=froydnj (b09ea156b6)
- Bug 1195767 - part 1 - remove nsCOMPtr temporary from nsEventQueue::PtEvent; r=gerald (fed354ffb7)
- Bug 1195767 - part 2 - create an nsEventQueueBase templated over the monitor type; r=gerald (ede20ac6f4)
- Bug 1202497 - part 1 - switch nsEventQueue to use a non-reentrant Monitor; r=gerald (cd043d1267)
- Bug 1195767 - part 3 - modify nsThreadPool to use a non-reentrant monitor; r=gerald (52eec3d125)
- Bug 1202497 - part 2 - remove ReentrantMonitor specializations for nsEventQueueBase; r=gerald (ceb1a9e63e)
- Bug 1202497 - part 3 - remove nsThread::GetEvent; r=gerald (ef9a5924fe)
- Bug 1202828 - use nsEventQueue::HasPendingEvent in nsThread.cpp; r=mccr8 nsEventQueue's HasPending event is defined to simply: (2e7a6ebcd2)
- Bug 1202497 - part 4 - lock around call to nsChainedEventQueue::HasPendingEvent; r=gerald (bc69bb30db)
- Bug 1202497 - part 5 - make the locking requirements of nsChainedEventQueue explicit; r=gerald (fbd73f2b0c)
- Bug 1195767 - part 4 - remove nsEventQueue::GetReentrantMonitor; r=gerald (1dfa6b186a)
- Bug 1195767 - part 5 - use signaling instead of broadcast when work items are placed in nsEventQueue; r=gerald (1f01f6198a)
- Bug 1202497 - part 6 - make the locking requirements of nsEventQueue explicit; r=gerald (7aaf4eb9cd)
- Bug 1202497 - part 7 - make nsEventQueue use external locking; r=gerald (2b31ff22f0)
- Bug 1202497 - follow-up - fix static analysis bustage; r=me (b7997e75f5)
- Bug 1197672 - s/_sendPromise/createPromiseWithId/ in mozInputMethod.addInput(). r=kchen (fb8e91e67e)
- Bug 1132349 - Test for focus removal after pagehide/submit/beforeload. r=janjongboom (a9adc87bb5)
- Bug 1137557 - Part 3: Allow content to pass a dict representing the property of the keyboard event to send. r=masayuki, sr=smaug (4e27b2bfc9)
- Bug 895274 part.18 Rename NS_PLUGIN_ACTIVATE to ePluginActivate r=smaug (6ad79fee12)
- Bug 1167069 - Watch out for deletion of current frame. r=jmathies (2868b2689d)
- Bug 895274 part.19 Rename NS_PLUGIN_FOCUS to ePluginFocus r=smaug (792d1d41d8)
- Bug 895274 part.20 Rename NS_OFFLINE to eOffline r=smaug (6eab162432)
- Bug 895274 part.21 Rename NS_ONLINE to eOnline r=smaug (91fb9aea87)
- Bug 895274 part.22 Get rid of NS_MOZ_USER_* since nobody is using them r=smaug (a46848bfc5)
- Bug 895274 part.23 Rename NS_LANGUAGECHANGE to eLanguageChange r=smaug (11ee7a6511)
- Bug 895274 part.24 Rename NS_MOUSE_MESSAGE_START to eMouseEventFirst r=smaug (52168d3374)
This commit is contained in:
2022-04-18 11:22:17 +08:00
parent 058eb0d0e1
commit c554d461ab
19 changed files with 2240 additions and 1810 deletions
+20
View File
@@ -16,6 +16,10 @@
#include "mozilla/dom/PContent.h"
#include "mozilla/dom/PNuwa.h"
#include "mozilla/hal_sandbox/PHal.h"
#if defined(DEBUG) || defined(ENABLE_TESTS)
#include "jsprf.h"
extern "C" char* PrintJSStack();
#endif
#endif
#include "mozilla/Assertions.h"
@@ -75,6 +79,7 @@ ProcessLink::ProcessLink(MessageChannel *aChan)
, mExistingListener(nullptr)
#ifdef MOZ_NUWA_PROCESS
, mIsToNuwaProcess(false)
, mIsBlocked(false)
#endif
{
}
@@ -175,6 +180,8 @@ ProcessLink::SendMessage(Message *msg)
mChan->mMonitor->AssertCurrentThreadOwns();
#ifdef MOZ_NUWA_PROCESS
// Parent to child: check whether we are sending some unexpected message to
// the Nuwa process.
if (mIsToNuwaProcess && mozilla::dom::ContentParent::IsNuwaReady()) {
switch (msg->type()) {
case mozilla::dom::PNuwa::Msg_Fork__ID:
@@ -194,6 +201,19 @@ ProcessLink::SendMessage(Message *msg)
#endif
}
}
// Nuwa to parent: check whether we are currently blocked.
if (IsNuwaProcess() && mIsBlocked) {
#if defined(ENABLE_TESTS) || defined(DEBUG)
char* jsstack = PrintJSStack();
printf_stderr("Fatal error: sending a message to the chrome process"
"with a blocked IPC channel from \n%s",
jsstack ? jsstack : "<no JS stack>");
JS_smprintf_free(jsstack);
MOZ_CRASH();
#endif
}
#endif
mIOLoop->PostTask(