Merge mozilla-central to autoland. a=merge CLOSED TREE

This commit is contained in:
Noemi Erli 2019-01-11 23:59:12 +02:00
commit 7cd3732360
9 changed files with 30 additions and 24 deletions

View File

@ -187,9 +187,7 @@ nsresult AudioSink::InitializeAudioStream(const PlaybackParams& aParams) {
// Set playback params before calling Start() so they can take effect
// as soon as the 1st DataCallback of the AudioStream fires.
if (aParams.mVolume) {
mAudioStream->SetVolume(*aParams.mVolume);
}
mAudioStream->SetVolume(aParams.mVolume);
mAudioStream->SetPlaybackRate(aParams.mPlaybackRate);
mAudioStream->SetPreservesPitch(aParams.mPreservesPitch);
return mAudioStream->Start();

View File

@ -29,9 +29,7 @@ const MediaSink::PlaybackParams& AudioSinkWrapper::GetPlaybackParams() const {
void AudioSinkWrapper::SetPlaybackParams(const PlaybackParams& aParams) {
AssertOwnerThread();
if (mAudioSink) {
if (aParams.mVolume) {
mAudioSink->SetVolume(*aParams.mVolume);
}
mAudioSink->SetVolume(aParams.mVolume);
mAudioSink->SetPlaybackRate(aParams.mPlaybackRate);
mAudioSink->SetPreservesPitch(aParams.mPreservesPitch);
}
@ -98,7 +96,7 @@ bool AudioSinkWrapper::HasUnplayedFrames(TrackType aType) const {
void AudioSinkWrapper::SetVolume(double aVolume) {
AssertOwnerThread();
mParams.mVolume = Some(aVolume);
mParams.mVolume = aVolume;
if (mAudioSink) {
mAudioSink->SetVolume(aVolume);
}
@ -198,10 +196,6 @@ void AudioSinkWrapper::Stop() {
if (mAudioSink) {
mAudioSinkEndedPromise.DisconnectIfExists();
// Reset volume to signal that it should
// not be updated, in case the volume
// has been changed outside MediaElement.
mParams.mVolume.reset();
mAudioSink->Shutdown();
mAudioSink = nullptr;
mEndedPromise = nullptr;

View File

@ -479,7 +479,7 @@ void DecodedStream::SetPlaying(bool aPlaying) {
void DecodedStream::SetVolume(double aVolume) {
AssertOwnerThread();
mParams.mVolume = Some(aVolume);
mParams.mVolume = aVolume;
}
void DecodedStream::SetPlaybackRate(double aPlaybackRate) {
@ -730,8 +730,7 @@ void DecodedStream::SendData() {
return;
}
MOZ_ASSERT(mParams.mVolume.isSome(), "Volume should exist at that point");
SendAudio(mParams.mVolume.value(), mSameOrigin, mPrincipalHandle);
SendAudio(mParams.mVolume, mSameOrigin, mPrincipalHandle);
SendVideo(mSameOrigin, mPrincipalHandle);
}

View File

@ -39,8 +39,8 @@ class MediaSink {
struct PlaybackParams {
PlaybackParams()
: mVolume(Some(1.0)), mPlaybackRate(1.0), mPreservesPitch(true) {}
Maybe<double> mVolume;
: mVolume(1.0), mPlaybackRate(1.0), mPreservesPitch(true) {}
double mVolume;
double mPlaybackRate;
bool mPreservesPitch;
RefPtr<AudioDeviceInfo> mSink;

View File

@ -1574,7 +1574,7 @@ function TypedArrayToStringTag() {
var O = this;
// Steps 2-3.
if (!IsObject(O) || !IsTypedArray(O))
if (!IsObject(O) || !IsPossiblyWrappedTypedArray(O))
return undefined;
// Steps 4-6.

View File

@ -0,0 +1,12 @@
const TypedArrayPrototype = Object.getPrototypeOf(Int8Array.prototype);
const {get: toStringTag} = Object.getOwnPropertyDescriptor(TypedArrayPrototype, Symbol.toStringTag);
const otherGlobal = newGlobal();
for (let constructor of anyTypedArrayConstructors) {
let ta = new otherGlobal[constructor.name](0);
assertEq(toStringTag.call(ta), constructor.name);
}
if (typeof reportCompare === "function")
reportCompare(true, true);

View File

@ -2140,8 +2140,10 @@ static bool intrinsic_NameForTypedArray(JSContext* cx, unsigned argc,
MOZ_ASSERT(args.length() == 1);
MOZ_ASSERT(args[0].isObject());
RootedObject object(cx, &args[0].toObject());
MOZ_ASSERT(object->is<TypedArrayObject>());
auto* object = UnwrapAndDowncastValue<TypedArrayObject>(cx, args[0]);
if (!object) {
return false;
}
JSProtoKey protoKey = StandardProtoKeyOrNull(object);
MOZ_ASSERT(protoKey);

View File

@ -14202,22 +14202,22 @@
"GFX_OMTP_PAINT_TIME": {
"record_in_processes": ["content"],
"alert_emails": ["gfx-telemetry-alerts@mozilla.com", "rhunt@mozilla.com"],
"expires_in_version": "70",
"expires_in_version": "never",
"kind": "exponential",
"high": 10000,
"n_buckets": 50,
"description": "Amount of time in tenths of a millisecond from the beginning of the first async paint until all async paints are finished.",
"bug_numbers": [1483245]
"bug_numbers": [1483245, 1518669]
},
"GFX_OMTP_PAINT_WAIT_TIME": {
"record_in_processes": ["content"],
"alert_emails": ["gfx-telemetry-alerts@mozilla.com", "rhunt@mozilla.com"],
"expires_in_version": "66",
"expires_in_version": "never",
"kind": "exponential",
"high": 200,
"n_buckets": 50,
"description": "Amount of time in milliseconds the main thread spends waiting for the paint thread to complete, if the time was greater than 200us.",
"bug_numbers": [1386968]
"bug_numbers": [1386968, 1518669]
},
"GFX_OMTP_PAINT_TASK_COUNT": {
"record_in_processes": ["content"],

View File

@ -1833,12 +1833,13 @@ gfx.omtp:
paint_wait_ratio:
bug_numbers:
- 1386968
- 1518669
description: >
Ratio (in units of 1/100th of a percent) of how many times OMTP waited
for a paint for more than 200us, versus the total number of paints.
keyed: false
kind: uint
expires: "66"
expires: "never"
notification_emails:
- gfx-telemetry-alerts@mozilla.com
- rhunt@mozilla.com