Skip to content

Commit

Permalink
Backed out 6 changesets (bug 1880192) for causing build bustages on M…
Browse files Browse the repository at this point in the history
…ozPromise.h. CLOSED TREE

Backed out changeset b73f06a9fdb1 (bug 1880192)
Backed out changeset ee04f994bad8 (bug 1880192)
Backed out changeset 8c7a686c8691 (bug 1880192)
Backed out changeset 15e93c260557 (bug 1880192)
Backed out changeset b5f62ac62087 (bug 1880192)
Backed out changeset ff2d8eae2a68 (bug 1880192)
  • Loading branch information
Iulian Moraru committed Feb 27, 2024
1 parent 8cc4443 commit 0783fb0
Show file tree
Hide file tree
Showing 9 changed files with 589 additions and 276 deletions.
2 changes: 1 addition & 1 deletion dom/media/AudioSegment.h
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ struct AudioChunk {
* A list of audio samples consisting of a sequence of slices of SharedBuffers.
* The audio rate is determined by the track, not stored in this class.
*/
class AudioSegment final : public MediaSegmentBase<AudioSegment, AudioChunk> {
class AudioSegment : public MediaSegmentBase<AudioSegment, AudioChunk> {
// The channel count that MaxChannelCount() returned last time it was called.
uint32_t mMemoizedMaxChannelCount = 0;

Expand Down
17 changes: 9 additions & 8 deletions dom/media/VideoFrameConverter.h
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,8 @@ class VideoFrameConverter {
// for processing so it can be immediately sent.
mLastFrameQueuedForProcessing.mTime = time;

MOZ_ALWAYS_SUCCEEDS(
mTaskQueue->Dispatch(NewRunnableMethod<FrameToProcess>(
MOZ_ALWAYS_SUCCEEDS(mTaskQueue->Dispatch(
NewRunnableMethod<StoreCopyPassByLRef<FrameToProcess>>(
"VideoFrameConverter::ProcessVideoFrame", this,
&VideoFrameConverter::ProcessVideoFrame,
mLastFrameQueuedForProcessing)));
Expand Down Expand Up @@ -138,8 +138,8 @@ class VideoFrameConverter {
mLastFrameQueuedForProcessing.mForceBlack = true;
mLastFrameQueuedForProcessing.mImage = nullptr;

MOZ_ALWAYS_SUCCEEDS(
mTaskQueue->Dispatch(NewRunnableMethod<FrameToProcess>(
MOZ_ALWAYS_SUCCEEDS(mTaskQueue->Dispatch(
NewRunnableMethod<StoreCopyPassByLRef<FrameToProcess>>(
"VideoFrameConverter::ProcessVideoFrame", this,
&VideoFrameConverter::ProcessVideoFrame,
mLastFrameQueuedForProcessing)));
Expand Down Expand Up @@ -293,10 +293,11 @@ class VideoFrameConverter {
return;
}

MOZ_ALWAYS_SUCCEEDS(mTaskQueue->Dispatch(NewRunnableMethod<FrameToProcess>(
"VideoFrameConverter::ProcessVideoFrame", this,
&VideoFrameConverter::ProcessVideoFrame,
mLastFrameQueuedForProcessing)));
MOZ_ALWAYS_SUCCEEDS(mTaskQueue->Dispatch(
NewRunnableMethod<StoreCopyPassByLRef<FrameToProcess>>(
"VideoFrameConverter::ProcessVideoFrame", this,
&VideoFrameConverter::ProcessVideoFrame,
mLastFrameQueuedForProcessing)));
}

void ProcessVideoFrame(const FrameToProcess& aFrame) {
Expand Down
13 changes: 6 additions & 7 deletions dom/media/webspeech/recognition/SpeechRecognition.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -437,13 +437,12 @@ uint32_t SpeechRecognition::ProcessAudioSegment(AudioSegment* aSegment,
// we need to call the nsISpeechRecognitionService::ProcessAudioSegment
// in a separate thread so that any eventual encoding or pre-processing
// of the audio does not block the main thread
nsresult rv = mEncodeTaskQueue->Dispatch(NS_NewRunnableFunction(
"nsISpeechRecognitionService::ProcessAudioSegment",
[=, service = mRecognitionService,
segment = std::move(*aSegment)]() mutable {
service->ProcessAudioSegment(&segment, aTrackRate);
}));

nsresult rv = mEncodeTaskQueue->Dispatch(
NewRunnableMethod<StoreCopyPassByPtr<AudioSegment>, TrackRate>(
"nsISpeechRecognitionService::ProcessAudioSegment",
mRecognitionService,
&nsISpeechRecognitionService::ProcessAudioSegment,
std::move(*aSegment), aTrackRate));
MOZ_DIAGNOSTIC_ASSERT(NS_SUCCEEDED(rv));
Unused << rv;
return samples;
Expand Down
3 changes: 2 additions & 1 deletion gfx/layers/apz/src/APZCTreeManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,8 @@ void APZCTreeManager::SetAllowedTouchBehavior(
uint64_t aInputBlockId, const nsTArray<TouchBehaviorFlags>& aValues) {
if (!APZThreadUtils::IsControllerThread()) {
APZThreadUtils::RunOnControllerThread(
NewRunnableMethod<uint64_t, nsTArray<TouchBehaviorFlags>>(
NewRunnableMethod<uint64_t,
StoreCopyPassByLRef<nsTArray<TouchBehaviorFlags>>>(
"layers::APZCTreeManager::SetAllowedTouchBehavior", this,
&APZCTreeManager::SetAllowedTouchBehavior, aInputBlockId,
aValues.Clone()));
Expand Down
4 changes: 2 additions & 2 deletions netwerk/wifi/nsWifiMonitor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -364,13 +364,13 @@ nsresult nsWifiMonitor::DoScan() {
}

return NS_DispatchToMainThread(
NewRunnableMethod<nsTArray<RefPtr<nsIWifiAccessPoint>>, bool>(
NewRunnableMethod<const nsTArray<RefPtr<nsIWifiAccessPoint>>&&, bool>(
"CallWifiListeners", this, &nsWifiMonitor::CallWifiListeners,
mLastAccessPoints.Clone(), accessPointsChanged));
}

nsresult nsWifiMonitor::CallWifiListeners(
const nsTArray<RefPtr<nsIWifiAccessPoint>>& aAccessPoints,
nsTArray<RefPtr<nsIWifiAccessPoint>>&& aAccessPoints,
bool aAccessPointsChanged) {
MOZ_ASSERT(NS_IsMainThread());
LOG(("Sending wifi access points to the listeners"));
Expand Down
2 changes: 1 addition & 1 deletion netwerk/wifi/nsWifiMonitor.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ class nsWifiMonitor final : public nsIWifiMonitor, public nsIObserver {
nsresult DoScan();

nsresult CallWifiListeners(
const nsTArray<RefPtr<nsIWifiAccessPoint>>& aAccessPoints,
nsTArray<RefPtr<nsIWifiAccessPoint>>&& aAccessPoints,
bool aAccessPointsChanged);

nsresult PassErrorToWifiListeners(nsresult rv);
Expand Down
Loading

0 comments on commit 0783fb0

Please sign in to comment.