Backed out 5 changesets (bug 1599952) for failures at webaudio/the-audio-api/the-audioworklet-interface/audioworklet-messageport.https.html.ini

Backed out changeset 78adc22d922a (bug 1599952)
Backed out changeset b07c89cbc212 (bug 1599952)
Backed out changeset 7768d524d914 (bug 1599952)
Backed out changeset 7012927838fe (bug 1599952)
Backed out changeset dbf476d4eab6 (bug 1599952)
This commit is contained in:
Coroiu Cristina 2019-12-03 02:33:23 +02:00
Родитель ea4c4eb27f
Коммит 679f321343
27 изменённых файлов: 72 добавлений и 202 удалений

Просмотреть файл

@ -1054,7 +1054,7 @@ bool StructuredCloneHolder::CustomReadTransferHandler(
}
#endif
MOZ_ASSERT(aExtraData < mPortIdentifiers.Length());
UniqueMessagePortId portIdentifier(mPortIdentifiers[aExtraData]);
const MessagePortIdentifier& portIdentifier = mPortIdentifiers[aExtraData];
ErrorResult rv;
RefPtr<MessagePort> port = MessagePort::Create(mGlobal, portIdentifier, rv);
@ -1133,16 +1133,15 @@ bool StructuredCloneHolder::CustomWriteTransferHandler(
MessagePort* port = nullptr;
nsresult rv = UNWRAP_OBJECT(MessagePort, &obj, port);
if (NS_SUCCEEDED(rv)) {
// We use aExtraData to store the index of this new port identifier.
*aExtraData = mPortIdentifiers.Length();
MessagePortIdentifier* identifier = mPortIdentifiers.AppendElement();
if (!port->CanBeCloned()) {
return false;
}
UniqueMessagePortId identifier;
port->CloneAndDisentangle(identifier);
// We use aExtraData to store the index of this new port identifier.
*aExtraData = mPortIdentifiers.Length();
mPortIdentifiers.AppendElement(identifier.release());
port->CloneAndDisentangle(*identifier);
*aTag = SCTAG_DOM_MAP_MESSAGEPORT;
*aOwnership = JS::SCTAG_TMO_CUSTOM;

Просмотреть файл

@ -55,8 +55,6 @@ LOCAL_INCLUDES += [
'/js/xpconnect/wrappers',
]
include('/ipc/chromium/chromium-config.mozbuild')
if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
CXXFLAGS += ['-Wno-error=shadow']

Просмотреть файл

@ -12,7 +12,6 @@
#include "jsapi.h"
#include "mozilla/dom/AudioWorkletGlobalScopeBinding.h"
#include "mozilla/dom/AudioWorkletProcessor.h"
#include "mozilla/dom/MessagePort.h"
#include "mozilla/dom/StructuredCloneHolder.h"
#include "mozilla/dom/WorkletPrincipals.h"
#include "mozilla/dom/AudioParamDescriptorBinding.h"
@ -297,7 +296,6 @@ AudioParamDescriptorMap AudioWorkletGlobalScope::DescriptorsFromJS(
bool AudioWorkletGlobalScope::ConstructProcessor(
const nsAString& aName, NotNull<StructuredCloneHolder*> aSerializedOptions,
UniqueMessagePortId& aPortIdentifier,
JS::MutableHandle<JSObject*> aRetProcessor) {
/**
* See
@ -309,15 +307,10 @@ bool AudioWorkletGlobalScope::ConstructProcessor(
}
JSContext* cx = jsapi.cx();
ErrorResult rv;
/**
/** TODO https://bugzilla.mozilla.org/show_bug.cgi?id=1565956
* 4. Let deserializedPort be the result of
* StructuredDeserialize(serializedPort, the current Realm).
*/
RefPtr<MessagePort> deserializedPort =
MessagePort::Create(this, aPortIdentifier, rv);
if (NS_WARN_IF(rv.MaybeSetPendingException(cx))) {
return false;
}
/**
* 5. Let deserializedOptions be the result of
* StructuredDeserialize(serializedOptions, the current Realm).
@ -336,14 +329,11 @@ bool AudioWorkletGlobalScope::ConstructProcessor(
// AudioWorkletNode has already checked the definition exists.
// See also https://github.com/WebAudio/web-audio-api/issues/1854
MOZ_ASSERT(processorCtor);
/**
/** TODO https://bugzilla.mozilla.org/show_bug.cgi?id=1565956
* 7. Store nodeReference and deserializedPort to node reference and
* transferred port of this AudioWorkletGlobalScope's pending processor
* construction data respectively.
*/
// |nodeReference| is not required here because the "processorerror" event
// is thrown by WorkletNodeEngine::ConstructProcessor().
mPortForProcessor = std::move(deserializedPort);
/**
* 8. Construct a callback function from processorCtor with the argument
* of deserializedOptions.
@ -354,8 +344,6 @@ bool AudioWorkletGlobalScope::ConstructProcessor(
RefPtr<AudioWorkletProcessor> processor = processorCtor->Construct(
options, rv, "AudioWorkletProcessor construction",
CallbackFunction::eReportExceptions);
// https://github.com/WebAudio/web-audio-api/issues/2096
mPortForProcessor = nullptr;
if (rv.Failed()) {
rv.SuppressException(); // already reported
return false;

Просмотреть файл

@ -19,9 +19,7 @@ class AudioWorkletImpl;
namespace dom {
class AudioWorkletProcessorConstructor;
class MessagePort;
class StructuredCloneHolder;
class UniqueMessagePortId;
class AudioWorkletGlobalScope final : public WorkletGlobalScope {
public:
@ -51,7 +49,6 @@ class AudioWorkletGlobalScope final : public WorkletGlobalScope {
MOZ_CAN_RUN_SCRIPT
bool ConstructProcessor(const nsAString& aName,
NotNull<StructuredCloneHolder*> aSerializedOptions,
UniqueMessagePortId& aPortIdentifier,
JS::MutableHandle<JSObject*> aRetProcessor);
private:
@ -69,10 +66,6 @@ class AudioWorkletGlobalScope final : public WorkletGlobalScope {
typedef nsRefPtrHashtable<nsStringHashKey, AudioWorkletProcessorConstructor>
NodeNameToProcessorDefinitionMap;
NodeNameToProcessorDefinitionMap mNameToProcessorMap;
// https://webaudio.github.io/web-audio-api/#pending-processor-construction-data-transferred-port
// This does not need to be traversed during cycle-collection because it is
// only set while this AudioWorkletGlobalScope is on the stack.
RefPtr<MessagePort> mPortForProcessor;
};
} // namespace dom

Просмотреть файл

@ -8,14 +8,12 @@
#include "AudioParamMap.h"
#include "mozilla/dom/AudioWorkletNodeBinding.h"
#include "mozilla/dom/MessageChannel.h"
#include "mozilla/dom/MessagePort.h"
namespace mozilla {
namespace dom {
NS_IMPL_ISUPPORTS_CYCLE_COLLECTION_INHERITED_0(AudioWorkletNode, AudioNode)
NS_IMPL_CYCLE_COLLECTION_INHERITED(AudioWorkletNode, AudioNode, mPort)
class WorkletNodeEngine final : public AudioNodeEngine {
public:
@ -30,8 +28,7 @@ class WorkletNodeEngine final : public AudioNodeEngine {
MOZ_CAN_RUN_SCRIPT
void ConstructProcessor(AudioWorkletImpl* aWorkletImpl,
const nsAString& aName,
NotNull<StructuredCloneHolder*> aSerializedOptions,
UniqueMessagePortId& aPortIdentifier);
NotNull<StructuredCloneHolder*> aSerializedOptions);
void ProcessBlock(AudioNodeTrack* aTrack, GraphTime aFrom,
const AudioBlock& aInput, AudioBlock* aOutput,
@ -121,15 +118,13 @@ void WorkletNodeEngine::SendProcessorError() {
void WorkletNodeEngine::ConstructProcessor(
AudioWorkletImpl* aWorkletImpl, const nsAString& aName,
NotNull<StructuredCloneHolder*> aSerializedOptions,
UniqueMessagePortId& aPortIdentifier) {
NotNull<StructuredCloneHolder*> aSerializedOptions) {
MOZ_ASSERT(mInputs.mPorts.empty() && mOutputs.mPorts.empty());
RefPtr<AudioWorkletGlobalScope> global = aWorkletImpl->GetGlobalScope();
MOZ_ASSERT(global); // global has already been used to register processor
JS::RootingContext* cx = RootingCx();
mProcessor.init(cx);
if (!global->ConstructProcessor(aName, aSerializedOptions, aPortIdentifier,
&mProcessor) ||
if (!global->ConstructProcessor(aName, aSerializedOptions, &mProcessor) ||
// mInputs and mOutputs outer arrays are fixed length and so much of the
// initialization need only be performed once (i.e. here).
NS_WARN_IF(!mInputs.mPorts.growBy(InputCount())) ||
@ -437,23 +432,6 @@ already_AddRefed<AudioWorkletNode> AudioWorkletNode::Constructor(
return nullptr;
}
/**
* 4. Let messageChannel be a new MessageChannel.
*/
RefPtr<MessageChannel> messageChannel =
MessageChannel::Constructor(aGlobal, aRv);
if (NS_WARN_IF(aRv.Failed())) {
return nullptr;
}
/* 5. Let nodePort be the value of messageChannels port1 attribute.
* 6. Let processorPortOnThisSide be the value of messageChannels port2
* attribute.
* 7. Let serializedProcessorPort be the result of
* StructuredSerializeWithTransfer(processorPortOnThisSide,
* « processorPortOnThisSide »).
*/
UniqueMessagePortId processorPortId;
messageChannel->Port2()->CloneAndDisentangle(processorPortId);
/**
* 8. Convert options dictionary to optionsObject.
*/
@ -478,10 +456,6 @@ already_AddRefed<AudioWorkletNode> AudioWorkletNode::Constructor(
if (NS_WARN_IF(aRv.Failed())) {
return nullptr;
}
/**
* 10. Set nodes port to nodePort.
*/
audioWorkletNode->mPort = messageChannel->Port1();
auto engine =
new WorkletNodeEngine(audioWorkletNode, aOptions.mOutputChannelCount);
@ -504,12 +478,11 @@ already_AddRefed<AudioWorkletNode> AudioWorkletNode::Constructor(
// See bug 1535398.
[track = audioWorkletNode->mTrack,
workletImpl = RefPtr<AudioWorkletImpl>(workletImpl),
name = nsString(aName), options = std::move(serializedOptions),
portId = std::move(processorPortId)]()
MOZ_CAN_RUN_SCRIPT_BOUNDARY mutable {
name = nsString(aName), options = std::move(serializedOptions)]()
MOZ_CAN_RUN_SCRIPT_BOUNDARY {
auto engine = static_cast<WorkletNodeEngine*>(track->Engine());
engine->ConstructProcessor(workletImpl, name,
WrapNotNull(options.get()), portId);
WrapNotNull(options.get()));
}));
return audioWorkletNode.forget();
@ -520,6 +493,11 @@ AudioParamMap* AudioWorkletNode::GetParameters(ErrorResult& aRv) const {
return nullptr;
}
MessagePort* AudioWorkletNode::GetPort(ErrorResult& aRv) const {
aRv.Throw(NS_ERROR_NOT_IMPLEMENTED);
return nullptr;
}
JSObject* AudioWorkletNode::WrapObject(JSContext* aCx,
JS::Handle<JSObject*> aGivenProto) {
return AudioWorkletNode_Binding::Wrap(aCx, this, aGivenProto);

Просмотреть файл

@ -19,7 +19,6 @@ class MessagePort;
class AudioWorkletNode : public AudioNode {
public:
NS_DECL_ISUPPORTS_INHERITED
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(AudioWorkletNode, AudioNode)
IMPL_EVENT_HANDLER(processorerror)
@ -30,7 +29,7 @@ class AudioWorkletNode : public AudioNode {
AudioParamMap* GetParameters(ErrorResult& aRv) const;
MessagePort* Port() const { return mPort; };
MessagePort* GetPort(ErrorResult& aRv) const;
JSObject* WrapObject(JSContext* aCx,
JS::Handle<JSObject*> aGivenProto) override;
@ -49,7 +48,6 @@ class AudioWorkletNode : public AudioNode {
~AudioWorkletNode() = default;
nsString mNodeName;
RefPtr<MessagePort> mPort;
uint16_t mInputCount;
uint16_t mOutputCount;
};

Просмотреть файл

@ -44,13 +44,6 @@
namespace mozilla {
namespace dom {
void UniqueMessagePortId::ForceClose() {
if (!mIdentifier.neutered()) {
MessagePort::ForceClose(mIdentifier);
mIdentifier.neutered() = true;
}
}
class PostMessageRunnable final : public CancelableRunnable {
friend class MessagePort;
@ -228,14 +221,13 @@ already_AddRefed<MessagePort> MessagePort::Create(nsIGlobalObject* aGlobal,
/* static */
already_AddRefed<MessagePort> MessagePort::Create(
nsIGlobalObject* aGlobal, UniqueMessagePortId& aIdentifier,
nsIGlobalObject* aGlobal, const MessagePortIdentifier& aIdentifier,
ErrorResult& aRv) {
MOZ_ASSERT(aGlobal);
RefPtr<MessagePort> mp = new MessagePort(aGlobal, eStateEntangling);
mp->Initialize(aIdentifier.uuid(), aIdentifier.destinationUuid(),
aIdentifier.sequenceId(), aIdentifier.neutered(), aRv);
aIdentifier.neutered() = true;
return mp.forget();
}
@ -668,7 +660,7 @@ void MessagePort::Disentangle() {
UpdateMustKeepAlive();
}
void MessagePort::CloneAndDisentangle(UniqueMessagePortId& aIdentifier) {
void MessagePort::CloneAndDisentangle(MessagePortIdentifier& aIdentifier) {
MOZ_ASSERT(mIdentifier);
MOZ_ASSERT(!mHasBeenTransferredOrClosed);

Просмотреть файл

@ -9,7 +9,6 @@
#include "mozilla/Attributes.h"
#include "mozilla/DOMEventTargetHelper.h"
#include "mozilla/dom/DOMTypes.h"
#include "nsAutoPtr.h"
#include "nsTArray.h"
@ -22,52 +21,14 @@ class nsIGlobalObject;
namespace mozilla {
namespace dom {
class ClonedMessageData;
class MessagePortChild;
class MessagePortIdentifier;
struct PostMessageOptions;
class PostMessageRunnable;
class SharedMessagePortMessage;
class StrongWorkerRef;
// A class to hold a MessagePortIdentifier from
// MessagePort::CloneAndDistentangle() and close if neither passed to
// MessagePort::Create() nor release()ed to send via IPC.
// When the `neutered` field of the MessagePortIdentifier is false, a close is
// required.
// This does not derive from MessagePortIdentifier because
// MessagePortIdentifier is final and because use of UniqueMessagePortId as a
// MessagePortIdentifier is intentionally prevented without release of
// ownership.
class UniqueMessagePortId final {
public:
UniqueMessagePortId() { mIdentifier.neutered() = true; }
explicit UniqueMessagePortId(const MessagePortIdentifier& aIdentifier)
: mIdentifier(aIdentifier) {}
UniqueMessagePortId(UniqueMessagePortId&& aOther) noexcept
: mIdentifier(aOther.mIdentifier) {
aOther.mIdentifier.neutered() = true;
}
~UniqueMessagePortId() { ForceClose(); };
void ForceClose();
MOZ_MUST_USE MessagePortIdentifier release() {
MessagePortIdentifier id = mIdentifier;
mIdentifier.neutered() = true;
return id;
}
// const member accessors are not required because a const
// UniqueMessagePortId is not useful.
nsID& uuid() { return mIdentifier.uuid(); }
nsID& destinationUuid() { return mIdentifier.destinationUuid(); }
uint32_t& sequenceId() { return mIdentifier.sequenceId(); }
bool& neutered() { return mIdentifier.neutered(); }
UniqueMessagePortId(const UniqueMessagePortId& aOther) = delete;
void operator=(const UniqueMessagePortId& aOther) = delete;
private:
MessagePortIdentifier mIdentifier;
};
class MessagePort final : public DOMEventTargetHelper {
friend class PostMessageRunnable;
@ -80,9 +41,9 @@ class MessagePort final : public DOMEventTargetHelper {
const nsID& aDestinationUUID,
ErrorResult& aRv);
static already_AddRefed<MessagePort> Create(nsIGlobalObject* aGlobal,
UniqueMessagePortId& aIdentifier,
ErrorResult& aRv);
static already_AddRefed<MessagePort> Create(
nsIGlobalObject* aGlobal, const MessagePortIdentifier& aIdentifier,
ErrorResult& aRv);
// For IPC.
static void ForceClose(const MessagePortIdentifier& aIdentifier);
@ -112,7 +73,7 @@ class MessagePort final : public DOMEventTargetHelper {
bool CanBeCloned() const { return !mHasBeenTransferredOrClosed; }
void CloneAndDisentangle(UniqueMessagePortId& aIdentifier);
void CloneAndDisentangle(MessagePortIdentifier& aIdentifier);
void CloseForced();

Просмотреть файл

@ -28,6 +28,7 @@ interface AudioWorkletNode : AudioNode {
[Throws]
readonly attribute AudioParamMap parameters;
[Throws]
readonly attribute MessagePort port;
attribute EventHandler onprocessorerror;
};

Просмотреть файл

@ -4767,8 +4767,8 @@ void WorkerPrivate::EndCTypesCall() {
SetGCTimerMode(PeriodicTimer);
}
bool WorkerPrivate::ConnectMessagePort(JSContext* aCx,
UniqueMessagePortId& aIdentifier) {
bool WorkerPrivate::ConnectMessagePort(
JSContext* aCx, const MessagePortIdentifier& aIdentifier) {
AssertIsOnWorkerThread();
WorkerGlobalScope* globalScope = GlobalScope();
@ -4776,7 +4776,7 @@ bool WorkerPrivate::ConnectMessagePort(JSContext* aCx,
JS::Rooted<JSObject*> jsGlobal(aCx, globalScope->GetWrapper());
MOZ_ASSERT(jsGlobal);
// This UniqueMessagePortId is used to create a new port, still connected
// This MessagePortIdentifier is used to create a new port, still connected
// with the other one, but in the worker thread.
ErrorResult rv;
RefPtr<MessagePort> port = MessagePort::Create(globalScope, aIdentifier, rv);

Просмотреть файл

@ -44,7 +44,7 @@ class ClientInfo;
class ClientSource;
class Function;
class MessagePort;
class UniqueMessagePortId;
class MessagePortIdentifier;
class PerformanceStorage;
class TimeoutHandler;
class WorkerControlRunnable;
@ -365,7 +365,8 @@ class WorkerPrivate : public RelativeTimeline {
BeginCTypesCall();
}
bool ConnectMessagePort(JSContext* aCx, UniqueMessagePortId& aIdentifier);
bool ConnectMessagePort(JSContext* aCx,
const MessagePortIdentifier& aIdentifier);
WorkerGlobalScope* GetOrCreateGlobalScope(JSContext* aCx);

Просмотреть файл

@ -149,6 +149,11 @@ class MessagePortIdentifierRunnable final : public WorkerRunnable {
return true;
}
nsresult Cancel() override {
MessagePort::ForceClose(mPortIdentifier);
return WorkerRunnable::Cancel();
}
virtual bool PreDispatch(WorkerPrivate* aWorkerPrivate) override {
// Silence bad assertions.
return true;
@ -171,7 +176,7 @@ class MessagePortIdentifierRunnable final : public WorkerRunnable {
}
SelfHolder mActor;
UniqueMessagePortId mPortIdentifier;
MessagePortIdentifier mPortIdentifier;
};
class ReleaseWorkerRunnable final : public WorkerRunnable {
@ -913,7 +918,7 @@ class RemoteWorkerChild::SharedWorkerOp : public RemoteWorkerChild::Op {
void RemoteWorkerChild::AddPortIdentifier(
JSContext* aCx, WorkerPrivate* aWorkerPrivate,
UniqueMessagePortId& aPortIdentifier) {
const MessagePortIdentifier& aPortIdentifier) {
if (NS_WARN_IF(!aWorkerPrivate->ConnectMessagePort(aCx, aPortIdentifier))) {
ErrorPropagationDispatch(NS_ERROR_FAILURE);
}

Просмотреть файл

@ -29,7 +29,6 @@ class ErrorValue;
class FetchEventOpProxyChild;
class RemoteWorkerData;
class ServiceWorkerOp;
class UniqueMessagePortId;
class WeakWorkerRef;
class WorkerErrorReport;
class WorkerPrivate;
@ -60,7 +59,7 @@ class RemoteWorkerChild final
void FlushReportsOnMainThread(nsIConsoleReportCollector* aReporter);
void AddPortIdentifier(JSContext* aCx, WorkerPrivate* aWorkerPrivate,
UniqueMessagePortId& aPortIdentifier);
const MessagePortIdentifier& aPortIdentifier);
RefPtr<GenericNonExclusivePromise> GetTerminationPromise();

Просмотреть файл

@ -171,7 +171,7 @@ already_AddRefed<SharedWorker> SharedWorker::Constructor(
return nullptr;
}
UniqueMessagePortId portIdentifier;
MessagePortIdentifier portIdentifier;
channel->Port1()->CloneAndDisentangle(portIdentifier);
URIParams resolvedScriptURL;
@ -200,7 +200,7 @@ already_AddRefed<SharedWorker> SharedWorker::Constructor(
storageAllowed, void_t() /* OptionalServiceWorkerData */, agentClusterId);
PSharedWorkerChild* pActor = actorChild->SendPSharedWorkerConstructor(
remoteWorkerData, loadInfo.mWindowID, portIdentifier.release());
remoteWorkerData, loadInfo.mWindowID, portIdentifier);
RefPtr<SharedWorkerChild> actor = static_cast<SharedWorkerChild*>(pActor);
MOZ_ASSERT(actor);

Просмотреть файл

@ -64,7 +64,7 @@ SharedWorkerManager::~SharedWorkerManager() {
bool SharedWorkerManager::MaybeCreateRemoteWorker(
const RemoteWorkerData& aData, uint64_t aWindowID,
UniqueMessagePortId& aPortIdentifier, base::ProcessId aProcessId) {
const MessagePortIdentifier& aPortIdentifier, base::ProcessId aProcessId) {
AssertIsOnBackgroundThread();
if (!mRemoteWorkerController) {
@ -79,7 +79,7 @@ bool SharedWorkerManager::MaybeCreateRemoteWorker(
mRemoteWorkerController->AddWindowID(aWindowID);
}
mRemoteWorkerController->AddPortIdentifier(aPortIdentifier.release());
mRemoteWorkerController->AddPortIdentifier(aPortIdentifier);
return true;
}

Просмотреть файл

@ -16,7 +16,7 @@ class nsIPrincipal;
namespace mozilla {
namespace dom {
class UniqueMessagePortId;
class MessagePortIdentifier;
class RemoteWorkerData;
class SharedWorkerManager;
class SharedWorkerService;
@ -92,7 +92,7 @@ class SharedWorkerManager final : public RemoteWorkerObserver {
bool MaybeCreateRemoteWorker(const RemoteWorkerData& aData,
uint64_t aWindowID,
UniqueMessagePortId& aPortIdentifier,
const MessagePortIdentifier& aPortIdentifier,
base::ProcessId aProcessId);
void AddActor(SharedWorkerParent* aParent);

Просмотреть файл

@ -54,7 +54,7 @@ class GetOrCreateWorkerManagerRunnable final : public Runnable {
RefPtr<SharedWorkerParent> mActor;
RemoteWorkerData mData;
uint64_t mWindowID;
UniqueMessagePortId mPortIdentifier;
MessagePortIdentifier mPortIdentifier;
};
class WorkerManagerCreatedRunnable final : public Runnable {
@ -62,13 +62,13 @@ class WorkerManagerCreatedRunnable final : public Runnable {
WorkerManagerCreatedRunnable(
already_AddRefed<SharedWorkerManagerWrapper> aManagerWrapper,
SharedWorkerParent* aActor, const RemoteWorkerData& aData,
uint64_t aWindowID, UniqueMessagePortId& aPortIdentifier)
uint64_t aWindowID, const MessagePortIdentifier& aPortIdentifier)
: Runnable("WorkerManagerCreatedRunnable"),
mManagerWrapper(aManagerWrapper),
mActor(aActor),
mData(aData),
mWindowID(aWindowID),
mPortIdentifier(std::move(aPortIdentifier)) {}
mPortIdentifier(aPortIdentifier) {}
NS_IMETHOD
Run() {
@ -90,7 +90,7 @@ class WorkerManagerCreatedRunnable final : public Runnable {
RefPtr<SharedWorkerParent> mActor;
RemoteWorkerData mData;
uint64_t mWindowID;
UniqueMessagePortId mPortIdentifier;
MessagePortIdentifier mPortIdentifier;
};
class ErrorPropagationRunnable final : public Runnable {
@ -168,11 +168,14 @@ void SharedWorkerService::GetOrCreateWorkerManager(
void SharedWorkerService::GetOrCreateWorkerManagerOnMainThread(
nsIEventTarget* aBackgroundEventTarget, SharedWorkerParent* aActor,
const RemoteWorkerData& aData, uint64_t aWindowID,
UniqueMessagePortId& aPortIdentifier) {
const MessagePortIdentifier& aPortIdentifier) {
MOZ_ASSERT(NS_IsMainThread());
MOZ_ASSERT(aBackgroundEventTarget);
MOZ_ASSERT(aActor);
auto closeMessagePortIdentifier =
MakeScopeExit([&] { MessagePort::ForceClose(aPortIdentifier); });
nsresult rv = NS_OK;
nsCOMPtr<nsIPrincipal> storagePrincipal =
PrincipalInfoToPrincipal(aData.storagePrincipalInfo(), &rv);
@ -225,6 +228,8 @@ void SharedWorkerService::GetOrCreateWorkerManagerOnMainThread(
RefPtr<WorkerManagerCreatedRunnable> r = new WorkerManagerCreatedRunnable(
wrapper.forget(), aActor, aData, aWindowID, aPortIdentifier);
aBackgroundEventTarget->Dispatch(r.forget(), NS_DISPATCH_NORMAL);
closeMessagePortIdentifier.release();
}
void SharedWorkerService::ErrorPropagationOnMainThread(

Просмотреть файл

@ -22,7 +22,6 @@ class MessagePortIdentifier;
class RemoteWorkerData;
class SharedWorkerManager;
class SharedWorkerParent;
class UniqueMessagePortId;
class SharedWorkerService final {
public:
@ -44,7 +43,7 @@ class SharedWorkerService final {
void GetOrCreateWorkerManagerOnMainThread(
nsIEventTarget* aBackgroundEventTarget, SharedWorkerParent* aActor,
const RemoteWorkerData& aData, uint64_t aWindowID,
UniqueMessagePortId& aPortIdentifier);
const MessagePortIdentifier& aPortIdentifier);
void RemoveWorkerManagerOnMainThread(SharedWorkerManager* aManager);

Просмотреть файл

@ -2,20 +2,12 @@
bug: AudioWorklet not enabled on release_or_beta
expected:
if release_or_beta: ERROR
expected:
if release_or_beta: OK
TIMEOUT
[\n Test MessagePort in AudioWorkletNode and AudioWorkletProcessor\n ]
bug: AudioWorklet not enabled on release_or_beta
expected:
if release_or_beta: FAIL
expected: FAIL
[Executing "Test postMessage from AudioWorkletProcessor to AudioWorkletNode"]
expected: TIMEOUT
expected: FAIL
[Executing "Test postMessage from AudioWorkletNode to AudioWorkletProcessor"]
expected: NOTRUN
[Audit report]
expected: NOTRUN
expected: FAIL

Просмотреть файл

@ -2,17 +2,10 @@
bug: AudioWorklet not enabled on release_or_beta
expected:
if release_or_beta: ERROR
expected:
if release_or_beta: OK
TIMEOUT
[\n Test passing SharedArrayBuffer to an AudioWorklet\n ]
bug: AudioWorklet not enabled on release_or_beta
expected:
if release_or_beta: FAIL
[Executing "Test postMessage from AudioWorkletProcessor to AudioWorkletNode"]
expected: TIMEOUT
[Audit report]
expected: NOTRUN
expected: FAIL

Просмотреть файл

@ -1,7 +1,7 @@
[audioworkletnode-automatic-pull.https.html]
expected:
if release_or_beta: OK
TIMEOUT
ERROR
[Executing "setup-worklet"]
bug: AudioWorklet not enabled on release_or_beta
expected:

Просмотреть файл

@ -2,13 +2,9 @@
bug: AudioWorklet not enabled on release_or_beta
expected:
if release_or_beta: ERROR
TIMEOUT
[Executing "Dynamically change the channel count to if unspecified."]
expected: TIMEOUT
expected: FAIL
[Executing "Givien outputChannelCount must be honored."]
expected: NOTRUN
[Audit report]
expected: NOTRUN
expected: FAIL

Просмотреть файл

@ -1,7 +1,7 @@
[audioworkletprocessor-options.https.html]
expected:
if release_or_beta: OK
TIMEOUT
ERROR
[Executing "valid-processor-data"]
bug: AudioWorklet not enabled on release_or_beta
expected:

Просмотреть файл

@ -1,19 +1,9 @@
[active-processing.https.html]
expected:
if release_or_beta: OK
TIMEOUT
[Executing "initialize"]
bug: AudioWorklet not enabled on release_or_beta
expected:
if release_or_beta: FAIL
[Executing "test"]
expected:
if release_or_beta: FAIL
TIMEOUT
[Audit report]
expected:
if release_or_beta: PASS
NOTRUN
expected: FAIL

Просмотреть файл

@ -1,19 +1,9 @@
[active-processing.https.html]
expected:
if release_or_beta: OK
TIMEOUT
[Executing "initialize"]
bug: AudioWorklet not enabled on release_or_beta
expected:
if release_or_beta: FAIL
[Executing "test"]
expected:
if release_or_beta: FAIL
TIMEOUT
[Audit report]
expected:
if release_or_beta: PASS
NOTRUN
expected: FAIL

Просмотреть файл

@ -2,10 +2,6 @@
bug: AudioWorklet not enabled on release_or_beta
expected:
if release_or_beta: ERROR
TIMEOUT
[Executing "start-playback-and-capture"]
expected: TIMEOUT
[Audit report]
expected: NOTRUN
expected: FAIL

Просмотреть файл

@ -2,15 +2,11 @@
bug: AudioWorklet not enabled on release_or_beta
expected:
if release_or_beta: ERROR
TIMEOUT
disabled:
if (os == "android") and e10s: bug 1550895 (frequently fails on geckoview)
[Executing "start-playback-and-capture"]
bug: AudioWorkletNode::GetPort is not implemented
expected:
if release_or_beta: OK
TIMEOUT
[Audit report]
expected: NOTRUN
FAIL