merge mozilla-central to autoland. r=merge a=merge

This commit is contained in:
Sebastian Hengst 2017-09-18 11:36:27 +02:00
Родитель ecf86690e7 7dba57e6b9
Коммит 6b897a9aab
13 изменённых файлов: 52 добавлений и 42 удалений

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

@ -130,15 +130,15 @@ var gTests = [
{
desc: "getUserMedia audio+video: reloading a frame updates the sharing UI",
run: async function checkUpdateWhenReloading() {
// We'll share only the mic in the first frame, then share both in the
// We'll share only the cam in the first frame, then share both in the
// second frame, then reload the second frame. After each step, we'll check
// the UI is in the correct state.
let promise = promisePopupNotificationShown("webRTC-shareDevices");
await promiseRequestDevice(true, false, "frame1");
await promiseRequestDevice(false, true, "frame1");
await promise;
await expectObserverCalled("getUserMedia:request");
checkDeviceSelectors(true, false);
checkDeviceSelectors(false, true);
let indicator = promiseIndicatorWindow();
await promiseMessage("ok", () => {
@ -146,11 +146,11 @@ var gTests = [
});
await expectObserverCalled("getUserMedia:response:allow");
await expectObserverCalled("recording-device-events");
Assert.deepEqual((await getMediaCaptureState()), {audio: true},
"expected microphone to be shared");
Assert.deepEqual((await getMediaCaptureState()), {video: true},
"expected camera to be shared");
await indicator;
await checkSharingUI({video: false, audio: true});
await checkSharingUI({video: true, audio: false});
await expectNoObserverCalled();
promise = promisePopupNotificationShown("webRTC-shareDevices");
@ -176,7 +176,7 @@ var gTests = [
await promise;
await expectObserverCalled("recording-window-ended");
await checkSharingUI({video: false, audio: true});
await checkSharingUI({video: true, audio: false});
await expectNoObserverCalled();
await closeStream(false, "frame1");

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

@ -164,7 +164,7 @@ TabParent::TabParent(nsIContentParent* aManager,
, mInitedByParent(false)
, mTabId(aTabId)
, mCreatingWindow(false)
, mCursor(nsCursor(-1))
, mCursor(eCursorInvalid)
, mTabSetsCursor(false)
, mHasContentOpener(false)
#ifdef DEBUG
@ -1131,7 +1131,7 @@ TabParent::SendRealMouseEvent(WidgetMouseEvent& aEvent)
if (mCustomCursor) {
widget->SetCursor(mCustomCursor,
mCustomCursorHotspotX, mCustomCursorHotspotY);
} else if (mCursor != nsCursor(-1)) {
} else if (mCursor != eCursorInvalid) {
widget->SetCursor(mCursor);
}
} else if (eMouseExitFromWidget == aEvent.mMessage) {
@ -1787,7 +1787,7 @@ TabParent::RecvSetCustomCursor(const nsCString& aCursorData,
const uint32_t& aHotspotY,
const bool& aForce)
{
mCursor = nsCursor(-1);
mCursor = eCursorInvalid;
nsCOMPtr<nsIWidget> widget = GetWidget();
if (widget) {

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

@ -1232,8 +1232,13 @@ public:
self->mSourceListener->GetPrincipalHandle());
if (NS_FAILED(rv)) {
nsString log;
log.AssignASCII("Starting audio failed");
error = new MediaMgrError(NS_LITERAL_STRING("InternalError"), log);
if (rv == NS_ERROR_NOT_AVAILABLE) {
log.AssignASCII("Concurrent mic process limit.");
error = new MediaMgrError(NS_LITERAL_STRING("NotReadableError"), log);
} else {
log.AssignASCII("Starting audio failed");
error = new MediaMgrError(NS_LITERAL_STRING("InternalError"), log);
}
}
}

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

@ -474,6 +474,13 @@ MediaEngineWebRTCMicrophoneSource::Start(SourceMediaStream *aStream,
return NS_ERROR_FAILURE;
}
// Until we fix bug 1400488 we need to block a second tab (OuterWindow)
// from opening an already-open device. If it's the same tab, they
// will share a Graph(), and we can allow it.
if (!mSources.IsEmpty() && aStream->Graph() != mSources[0]->Graph()) {
return NS_ERROR_NOT_AVAILABLE;
}
{
MonitorAutoLock lock(mMonitor);
mSources.AppendElement(aStream);

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

@ -885,9 +885,9 @@ InitJSContextForWorker(WorkerPrivate* aWorkerPrivate, JSContext* aWorkerCx)
// This is the real place where we set the max memory for the runtime.
for (uint32_t index = 0; index < ArrayLength(gcSettings); index++) {
const JSSettings::JSGCSetting& setting = gcSettings[index];
if (setting.IsSet()) {
if (setting.key.isSome()) {
NS_ASSERTION(setting.value, "Can't handle 0 values!");
JS_SetGCParameter(aWorkerCx, setting.key, setting.value);
JS_SetGCParameter(aWorkerCx, *setting.key, setting.value);
}
}
@ -1935,7 +1935,7 @@ RuntimeService::Init()
}
// Initialize JSSettings.
if (!sDefaultJSSettings.gcSettings[0].IsSet()) {
if (sDefaultJSSettings.gcSettings[0].key.isNothing()) {
sDefaultJSSettings.contextOptions = JS::ContextOptions();
sDefaultJSSettings.chrome.maxScriptRuntime = -1;
sDefaultJSSettings.chrome.compartmentOptions.behaviors().setVersion(JSVERSION_DEFAULT);

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

@ -9,6 +9,7 @@
#include "jsapi.h"
#include "mozilla/Attributes.h"
#include "mozilla/Maybe.h"
#include "mozilla/Mutex.h"
#include <stdint.h>
#include "nsAutoPtr.h"
@ -102,25 +103,12 @@ struct JSSettings
struct JSGCSetting
{
JSGCParamKey key;
mozilla::Maybe<JSGCParamKey> key;
uint32_t value;
JSGCSetting()
: key(static_cast<JSGCParamKey>(-1)), value(0)
: key(), value(0)
{ }
bool
IsSet() const
{
return key != static_cast<JSGCParamKey>(-1);
}
void
Unset()
{
key = static_cast<JSGCParamKey>(-1);
value = 0;
}
};
// There are several settings that we know we need so it makes sense to
@ -166,11 +154,11 @@ struct JSSettings
for (uint32_t index = 0; index < ArrayLength(gcSettings); index++) {
JSSettings::JSGCSetting& setting = gcSettings[index];
if (setting.key == aKey) {
if (setting.key.isSome() && *setting.key == aKey) {
foundSetting = &setting;
break;
}
if (!firstEmptySetting && !setting.IsSet()) {
if (!firstEmptySetting && setting.key.isNothing()) {
firstEmptySetting = &setting;
}
}
@ -183,13 +171,13 @@ struct JSSettings
return false;
}
}
foundSetting->key = aKey;
foundSetting->key = mozilla::Some(aKey);
foundSetting->value = aValue;
return true;
}
if (foundSetting) {
foundSetting->Unset();
foundSetting->key.reset();
return true;
}

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

@ -5,4 +5,4 @@ Makefile.in build files for the Mozilla build system.
The cubeb git repository is: git://github.com/kinetiknz/cubeb.git
The git commit ID used was 09a90a7817bc3d76723065fdc6b53c542fbed402 (2017-09-13 18:39:50 +0200)
The git commit ID used was ac532ad4f0defaf7a397db64c2c42d2665cd06e9 (2017-09-17 08:23:45 +1200)

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

@ -733,7 +733,12 @@ audiounit_property_listener_callback(AudioObjectID id, UInt32 address_count,
break;
case kAudioDevicePropertyDataSource: {
LOG("Event[%u] - mSelector == kAudioHardwarePropertyDataSource for id=%d", (unsigned int) i, id);
switch_side |= DEV_INPUT;
if (stm->input_unit) {
switch_side |= DEV_INPUT;
}
if (stm->output_unit) {
switch_side |= DEV_OUTPUT;
}
}
break;
default:

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

@ -72,6 +72,7 @@ class ChecksumsGenerator(BaseScript, VirtualenvMixin, SigningMixin, VCSMixin, Bu
require_config_file=False,
config={
"virtualenv_modules": [
"pip==1.5.5",
"boto",
],
"virtualenv_path": "venv",

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

@ -1012,7 +1012,7 @@ PuppetWidget::SetCursor(imgIContainer* aCursor,
return NS_ERROR_FAILURE;
}
mCursor = nsCursor(-1);
mCursor = eCursorInvalid;
mCustomCursor = aCursor;
mCursorHotspotX = aHotspotX;
mCursorHotspotY = aHotspotY;

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

@ -1623,7 +1623,7 @@ nsWindow::SetCursor(imgIContainer* aCursor,
return window->SetCursor(aCursor, aHotspotX, aHotspotY);
}
mCursor = nsCursor(-1);
mCursor = eCursorInvalid;
// Get the image's current frame
GdkPixbuf* pixbuf = nsImageToPixbuf::ImageToPixbuf(aCursor);

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

@ -211,8 +211,12 @@ enum nsCursor { ///(normal cursor, usually rendered as an arrow)
eCursor_ns_resize,
eCursor_ew_resize,
eCursor_none,
// This one better be the last one in this list.
eCursorCount
// This one is used for array sizing, and so better be the last
// one in this list...
eCursorCount,
// ...except for this one.
eCursorInvalid = eCursorCount + 1
};
enum nsTopLevelWidgetZPlacement { // for PlaceBehind()

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

@ -3020,7 +3020,7 @@ nsWindow::SetCursor(imgIContainer* aCursor,
rv = nsWindowGfx::CreateIcon(aCursor, true, aHotspotX, aHotspotY, size, &cursor);
NS_ENSURE_SUCCESS(rv, rv);
mCursor = nsCursor(-1);
mCursor = eCursorInvalid;
::SetCursor(cursor);
NS_IF_RELEASE(sCursorImgContainer);
@ -7179,7 +7179,7 @@ void nsWindow::OnDestroy()
}
// Destroy any custom cursor resources.
if (mCursor == -1)
if (mCursor == eCursorInvalid)
SetCursor(eCursor_standard);
if (mCompositorWidgetDelegate) {