summaryrefslogtreecommitdiffstats
path: root/dom/ipc/jsactor/JSActorManager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'dom/ipc/jsactor/JSActorManager.cpp')
-rw-r--r--dom/ipc/jsactor/JSActorManager.cpp14
1 files changed, 8 insertions, 6 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)) {