/* vim: set ts=8 sts=2 et sw=2 tw=80: */ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v.* file, * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
.ThrowNotSupportedErrornsPrintfCString'' actor
RefPtr>protocol
JSWindowActorProtocol::FromWebIDLOptions( ; if(.Failed)java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39 returnaRv(
}
aName();
return protocol; nullptr
});
<JSWindowActorProtocol =
MOZ_ASSERT.()) return;
return; // process.(protocol
AutoTArrayJSWindowActorInfo1 {proto-()};
nsTArray<JSProcessActorInfo> contentInfos{}; for (auto* };
Unused <java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}
// Register event listeners for any existing chrome targets. forEventTarget ) {
proto->RegisterListenersFor(target);
}
// Add observers to the protocol.
o-()java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
}}
java.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 69
(nsContentUtils());
CrashReporter::AutoRecordAnnotationproto->RegisterListenersFor);
}
CrashReporter::java.lang.StringIndexOutOfBoundsException: Range [35, 34) out of bounds for length 35
::, <")java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68
(aName::::, );
<JSWindowActorProtocol;
f(.Remove ()) Remove listeners for this actor from each of our chrome targets. for (EventTarget* <JSWindowActorProtocoljava.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
proto-(target
}
// Remove observers for this actor from observer serivce. EventTargettarget) java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
>()
/ // potential managers, to have the actor disabled.
nsTArrayRefPtr>>managers if (XRE_IsParentProcessnsTArrayRefPtr> ; auto ::AllProcesses:eAll if (cp->CanSend()) {
} for>())java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28 for (constforconst&wgp>()){
managers.AppendElement(static_castmanagersAppendElementstatic_cast*>());
}
}
}
for (constauto& wgp :
InProcessParent()>()){
managers.AppendElement::(-ManagedPWindowGlobalParent
java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
(onst&wgc
InProcessChild::Singleton()->ManagedPWindowGlobalChild.(<*>())
managers(<*>())
}
} else { forauto :
::GetSingleton-() java.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66 for (constauto& wgc : bc->ManagedPWindowGlobalChild()) {
managers(static_cast*>());
}
}
}
(XRE_IsContentProcess)
// Createour, itin // mProcessActorDescriptors. auto name = info
RefPtr<JSProcessActorProtocol
JSProcessActorProtocol(std(info
mProcessActorDescriptors RefPtrJSProcessActorProtocol =
for (auto& info : aWindow) { auto name = info.name();
RefPtr<JSWindowActorProtocol> proto =
JSWindowActorProtocol::FromIPC(std::move(info));
mWindowActorDescriptors.InsertOrUpdate(std::move(name), RefPtr{proto});
// Register listeners for each chrome target. for (EventTarget* target : mChromeEventTargets) {
proto->RegisterListenersFor(target);
}
// Add observers for each actor.
proto->AddObservers();
}
}
// Register event listeners on the newly added Window Root. for (constauto& data : mWindowActorDescriptors.Values()) {
data->RegisterListenersFor(aTarget);
}
/* static */ void JSActorService::UnregisterChromeEventTarget(EventTarget* aTarget) { if (gJSActorService) { // NOTE: No need to unregister listeners here, as the target is going away.
gJSActorService->mChromeEventTargets.RemoveElement(aTarget);
}
}
if (mWindowActorDescriptors.Contains(aName)) {
aRv.ThrowNotSupportedError(
nsPrintfCString("'%s' actor is already registered as a window actor.",
PromiseFlatCString(aName).get())); return;
}
constauto proto = mProcessActorDescriptors.WithEntryHandle(
aName, [&](auto&& entry) -> RefPtr<JSProcessActorProtocol> { if (entry) {
aRv.ThrowNotSupportedError(
nsPrintfCString("'%s' actor is already registered.",
PromiseFlatCString(aName).get())); return nullptr;
}
// Insert a new entry for the protocol.
RefPtr<JSProcessActorProtocol> protocol =
JSProcessActorProtocol::FromWebIDLOptions(aName, aOptions, aRv); if (NS_WARN_IF(aRv.Failed())) { return nullptr;
}
entry.Insert(protocol);
return protocol;
});
if (!proto) {
MOZ_ASSERT(aRv.Failed()); return;
}
// Send information about the newly added entry to every existing content // process.
AutoTArray<JSProcessActorInfo, 1> contentInfos{proto->ToIPC()};
nsTArray<JSWindowActorInfo> windowInfos{}; for (auto* cp : ContentParent::AllProcesses(ContentParent::eLive)) {
Unused << cp->SendInitJSActorInfos(contentInfos, windowInfos);
}
// Add observers to the protocol.
proto->AddObservers();
}
nsAutoCString name(aName);
RefPtr<JSProcessActorProtocol> proto; if (mProcessActorDescriptors.Remove(name, getter_AddRefs(proto))) { // Remove observers for this actor from observer serivce.
proto->RemoveObservers();
// Tell every content process to also unregister, and accumulate the set of // potential managers, to have the actor disabled.
nsTArray<RefPtr<JSActorManager>> managers; if (XRE_IsParentProcess()) { for (auto* cp : ContentParent::AllProcesses(ContentParent::eAll)) { if (cp->CanSend()) {
Unused << cp->SendUnregisterJSProcessActor(name);
}
managers.AppendElement(cp);
}
managers.AppendElement(InProcessChild::Singleton());
managers.AppendElement(InProcessParent::Singleton());
} else {
managers.AppendElement(ContentChild::GetSingleton());
}
for (auto& mgr : managers) {
mgr->JSActorUnregister(name);
}
}
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.