summaryrefslogtreecommitdiffstats
path: root/dom/ipc/jsactor
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:13:33 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:13:33 +0000
commit086c044dc34dfc0f74fbe41f4ecb402b2cd34884 (patch)
treea4f824bd33cb075dd5aa3eb5a0a94af221bbe83a /dom/ipc/jsactor
parentAdding debian version 124.0.1-1. (diff)
downloadfirefox-086c044dc34dfc0f74fbe41f4ecb402b2cd34884.tar.xz
firefox-086c044dc34dfc0f74fbe41f4ecb402b2cd34884.zip
Merging upstream version 125.0.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'dom/ipc/jsactor')
-rw-r--r--dom/ipc/jsactor/JSActorManager.cpp14
-rw-r--r--dom/ipc/jsactor/JSActorService.cpp8
2 files changed, 12 insertions, 10 deletions
diff --git a/dom/ipc/jsactor/JSActorManager.cpp b/dom/ipc/jsactor/JSActorManager.cpp
index b8791570d6..c6be8488b5 100644
--- a/dom/ipc/jsactor/JSActorManager.cpp
+++ b/dom/ipc/jsactor/JSActorManager.cpp
@@ -63,19 +63,21 @@ already_AddRefed<JSActor> JSActorManager::GetActor(JSContext* aCx,
// If the JSActor uses `loadInDevToolsLoader`, force loading in the DevTools
// specific's loader.
RefPtr loader = protocol->mLoadInDevToolsLoader
- ? mozJSModuleLoader::GetOrCreateDevToolsLoader()
+ ? mozJSModuleLoader::GetOrCreateDevToolsLoader(aCx)
: mozJSModuleLoader::Get();
MOZ_ASSERT(loader);
// We're about to construct the actor, so make sure we're in the loader realm
// while importing etc.
- JSAutoRealm ar(aCx, loader->GetSharedGlobal(aCx));
+ JSAutoRealm ar(aCx, loader->GetSharedGlobal());
// If a module URI was provided, use it to construct an instance of the actor.
JS::Rooted<JSObject*> actorObj(aCx);
if (side.mModuleURI || side.mESModuleURI) {
JS::Rooted<JSObject*> exports(aCx);
if (side.mModuleURI) {
+ // TODO: Remove this once m-c, c-c, and out-of-tree code migrations finish
+ // (bug 1866732).
JS::Rooted<JSObject*> global(aCx);
aRv = loader->Import(aCx, side.mModuleURI.ref(), &global, &exports);
if (aRv.Failed()) {
@@ -143,9 +145,9 @@ void JSActorManager::ReceiveRawMessage(
Maybe<ipc::StructuredCloneData>&& aStack) {
MOZ_ASSERT(nsContentUtils::IsSafeToRunScript());
- CrashReporter::AutoAnnotateCrashReport autoActorName(
+ CrashReporter::AutoRecordAnnotation autoActorName(
CrashReporter::Annotation::JSActorName, aMetadata.actorName());
- CrashReporter::AutoAnnotateCrashReport autoMessageName(
+ CrashReporter::AutoRecordAnnotation autoMessageName(
CrashReporter::Annotation::JSActorMessage,
NS_LossyConvertUTF16toASCII(aMetadata.messageName()));
@@ -237,7 +239,7 @@ void JSActorManager::JSActorWillDestroy() {
void JSActorManager::JSActorDidDestroy() {
MOZ_ASSERT(nsContentUtils::IsSafeToRunScript());
- CrashReporter::AutoAnnotateCrashReport autoMessageName(
+ CrashReporter::AutoRecordAnnotation autoMessageName(
CrashReporter::Annotation::JSActorMessage, "<DidDestroy>"_ns);
// Swap the table with `mJSActors` so that we don't invalidate it while
@@ -245,7 +247,7 @@ void JSActorManager::JSActorDidDestroy() {
const nsRefPtrHashtable<nsCStringHashKey, JSActor> actors =
std::move(mJSActors);
for (const auto& entry : actors.Values()) {
- CrashReporter::AutoAnnotateCrashReport autoActorName(
+ CrashReporter::AutoRecordAnnotation autoActorName(
CrashReporter::Annotation::JSActorName, entry->Name());
// Do not risk to run script very late in shutdown
if (!AppShutdown::IsInOrBeyond(ShutdownPhase::XPCOMShutdownFinal)) {
diff --git a/dom/ipc/jsactor/JSActorService.cpp b/dom/ipc/jsactor/JSActorService.cpp
index 3fde76a206..5b6c63d2a4 100644
--- a/dom/ipc/jsactor/JSActorService.cpp
+++ b/dom/ipc/jsactor/JSActorService.cpp
@@ -106,9 +106,9 @@ void JSActorService::RegisterWindowActor(const nsACString& aName,
void JSActorService::UnregisterWindowActor(const nsACString& aName) {
MOZ_ASSERT(nsContentUtils::IsSafeToRunScript());
- CrashReporter::AutoAnnotateCrashReport autoActorName(
+ CrashReporter::AutoRecordAnnotation autoActorName(
CrashReporter::Annotation::JSActorName, aName);
- CrashReporter::AutoAnnotateCrashReport autoMessageName(
+ CrashReporter::AutoRecordAnnotation autoMessageName(
CrashReporter::Annotation::JSActorMessage, "<Unregister>"_ns);
nsAutoCString name(aName);
@@ -268,9 +268,9 @@ void JSActorService::RegisterProcessActor(const nsACString& aName,
void JSActorService::UnregisterProcessActor(const nsACString& aName) {
MOZ_ASSERT(nsContentUtils::IsSafeToRunScript());
- CrashReporter::AutoAnnotateCrashReport autoActorName(
+ CrashReporter::AutoRecordAnnotation autoActorName(
CrashReporter::Annotation::JSActorName, aName);
- CrashReporter::AutoAnnotateCrashReport autoMessageName(
+ CrashReporter::AutoRecordAnnotation autoMessageName(
CrashReporter::Annotation::JSActorMessage, "<Unregister>"_ns);
nsAutoCString name(aName);