Merge inbound to mozilla-central r=merge a=merge

This commit is contained in:
Gurzau Raul 2017-11-18 22:48:47 +02:00
commit 79f64eb568
25 changed files with 159 additions and 50 deletions

View File

@ -57,7 +57,10 @@
var propBag = aEvent.detail.QueryInterface(Components.interfaces.nsIPropertyBag2);
try {
var startRow = propBag.getPropertyAsInt32("startrow");
} catch (e if e.name == 'NS_ERROR_NOT_AVAILABLE') {
} catch (e) {
if (e.name != 'NS_ERROR_NOT_AVAILABLE') {
throw e;
}
startRow = null;
}
is(startRow, aStartRow,
@ -65,7 +68,10 @@
try {
var endRow = propBag.getPropertyAsInt32("endrow");
} catch (e if e.name == 'NS_ERROR_NOT_AVAILABLE') {
} catch (e) {
if (e.name != 'NS_ERROR_NOT_AVAILABLE') {
throw e;
}
endRow = null;
}
is(endRow, aEndRow,
@ -73,7 +79,10 @@
try {
var startCol = propBag.getPropertyAsInt32("startcolumn");
} catch (e if e.name == 'NS_ERROR_NOT_AVAILABLE') {
} catch (e) {
if (e.name != 'NS_ERROR_NOT_AVAILABLE') {
throw e;
}
startCol = null;
}
is(startCol, aStartCol,
@ -81,7 +90,10 @@
try {
var endCol = propBag.getPropertyAsInt32("endcolumn");
} catch (e if e.name == 'NS_ERROR_NOT_AVAILABLE') {
} catch (e) {
if (e.name != 'NS_ERROR_NOT_AVAILABLE') {
throw e;
}
endCol = null;
}
is(endCol, aEndCol,

View File

@ -207,7 +207,7 @@ function cancelInstallDialog(installDialog) {
}
async function waitForSingleNotification(aCallback) {
while (PopupNotifications.panel.childNodes.length == 2) {
while (PopupNotifications.panel.childNodes.length != 1) {
await new Promise(resolve => executeSoon(resolve));
info("Waiting for single notification");
@ -673,6 +673,13 @@ async function test_tabNavigate() {
gBrowser.loadURI("about:blank");
await closePromise;
// At the point of closing notification, AddonManager hasn't yet removed
// pending installs. It removes them in onLocationChange listener, and
// the notification is also closed in another onLocationChange listener,
// before AddonManager's one. Wait for next tick to ensure all
// onLocationChange listeners are performed.
await waitForTick();
let installs = await getInstalls();
is(installs.length, 0, "Should be no pending install");

View File

@ -39,7 +39,6 @@ skip-if = artifact # bug 1315953
[browser_oneOffContextMenu.js]
[browser_oneOffContextMenu_setDefault.js]
[browser_oneOffHeader.js]
skip-if = os == "mac" # bug 1361276
[browser_private_search_perwindowpb.js]
[browser_yahoo.js]
[browser_abouthome_behavior.js]

View File

@ -38,14 +38,14 @@ function synthesizeNativeMouseMove(aElement) {
let x = win.mozInnerScreenX + (rect.left + rect.right) / 2;
let y = win.mozInnerScreenY + (rect.top + rect.bottom) / 2;
// Wait for the mouseup event to occur before continuing.
// Wait for the mousemove event to occur before continuing.
return new Promise((resolve, reject) => {
function eventOccurred(e) {
aElement.removeEventListener("mouseover", eventOccurred, true);
aElement.removeEventListener("mousemove", eventOccurred, true);
resolve();
}
aElement.addEventListener("mouseover", eventOccurred, true);
aElement.addEventListener("mousemove", eventOccurred, true);
utils.sendNativeMouseEvent(x * scale, y * scale, msg, 0, null);
});

View File

@ -75,7 +75,7 @@ function promiseHistoryEntryReplacedNonRemote(browser) {
let listener = {
OnHistoryReplaceEntry() {
shistory.removeSHistoryListener(this);
resolve();
executeSoon(resolve);
},
QueryInterface: XPCOMUtils.generateQI([

View File

@ -82,7 +82,10 @@ function testEnd()
try {
gTmpFile.remove(false);
}
catch (ex if (ex.name == "NS_ERROR_FILE_IS_LOCKED")) {
catch (ex) {
if (ex.name != "NS_ERROR_FILE_IS_LOCKED") {
throw ex;
}
// Sometimes remove() throws because the file is not unlocked soon
// enough.
}

View File

@ -368,7 +368,10 @@
let failed = false;
try {
msg.objects.f();
} catch (e if /cross-process JS call failed/.test(String(e))) {
} catch (e) {
if (!/cross-process JS call failed/.test(String(e))) {
throw e;
}
failed = true;
}
ok(failed, "CPOW should fail due to cancelation");
@ -383,7 +386,10 @@
let failed = false;
try {
msg.objects.f();
} catch (e if /cross-process JS call failed/.test(String(e))) {
} catch (e) {
if (!/cross-process JS call failed/.test(String(e))) {
throw e;
}
failed = true;
}
ok(failed, "CPOW should fail due to cancelation");
@ -397,7 +403,10 @@
opener.wrappedJSObject.SpecialPowers.setBoolPref(PREF_UNSAFE_FORBIDDEN, true);
try {
msg.objects.f();
} catch (e if /unsafe CPOW usage forbidden/.test(String(e))) {
} catch (e) {
if (!/unsafe CPOW usage forbidden/.test(String(e))) {
throw e;
}
failed = true;
}
opener.wrappedJSObject.SpecialPowers.clearUserPref(PREF_UNSAFE_FORBIDDEN);
@ -410,7 +419,10 @@
opener.wrappedJSObject.SpecialPowers.setBoolPref(PREF_UNSAFE_FORBIDDEN, true);
try {
msg.objects.f();
} catch (e if /unsafe CPOW usage forbidden/.test(String(e))) {
} catch (e) {
if (!/unsafe CPOW usage forbidden/.test(String(e))) {
throw e;
}
ok(false, "cpow failed");
}
opener.wrappedJSObject.SpecialPowers.clearUserPref(PREF_UNSAFE_FORBIDDEN);
@ -424,7 +436,10 @@
try {
msg.objects.thing.value;
ok(false, "Should have been a dead CPOW");
} catch(e if /dead CPOW/.test(String(e))) {
} catch (e) {
if (!/dead CPOW/.test(String(e))) {
throw e;
}
ok(true, "Got the expected dead CPOW");
ok(e.stack, "The exception has a stack");
}

View File

@ -19539,7 +19539,10 @@ function test_bug397524() {
try {
$("canvas2").toDataURL("image/png");
gotData = true;
} catch (ex if (ex.code == 18 && ex.name == "SecurityError")) {
} catch (ex) {
if (ex.code != 18 || ex.name != "SecurityError") {
throw ex;
}
}
is(gotData, false, "Shouldn't be able to read images cross-site!");
@ -19548,7 +19551,10 @@ function test_bug397524() {
try {
$("canvas3").toDataURL("image/png");
gotData = true;
} catch (ex if (ex.code == 18 && ex.name == "SecurityError")) {
} catch (ex) {
if (ex.code != 18 || ex.name != "SecurityError") {
throw ex;
}
}
is(gotData, false, "Shouldn't be able to read images redirected cross-site!");

View File

@ -66,7 +66,10 @@ function handleCmd(evt) {
} else {
win.childWin.document.write('<script>window.parent.opener.postMessage(window.parent.testNum + " - " + window.x, "http://mochi.test:8888/"); window.parent.close();<' + '/script>');
}
} catch (e if (e.name == "SecurityError" && e.code == 18)) {
} catch (e) {
if (e.name != "SecurityError" || e.code != 18) {
throw e;
}
// Security error on cross-site write() is fine
if (win.childWin.opener == win) {
win.childWin.close();

View File

@ -32,7 +32,10 @@ function test1() {
var exception = null;
try {
navigator.geolocation.getCurrentPosition();
} catch(ex if ex instanceof TypeError) {
} catch (ex) {
if (!(ex instanceof TypeError)) {
throw ex;
}
exception = ex;
}
ok(exception, "Should have got an exception");
@ -40,7 +43,10 @@ function test1() {
exception = null;
try {
navigator.geolocation.getCurrentPosition(function() {});
} catch(ex if ex instanceof TypeError) {
} catch (ex) {
if (!(ex instanceof TypeError)) {
throw ex;
}
exception = ex;
}
ok(!exception, exception);
@ -48,7 +54,10 @@ function test1() {
exception = null;
try {
navigator.geolocation.getCurrentPosition(function() {}, function() {});
} catch(ex if ex instanceof TypeError) {
} catch (ex) {
if (!(ex instanceof TypeError)) {
throw ex;
}
exception = ex;
}
ok(!exception, exception);
@ -56,7 +65,10 @@ function test1() {
exception = null;
try {
navigator.geolocation.getCurrentPosition(function() {}, function() {}, {});
} catch(ex if ex instanceof TypeError) {
} catch (ex) {
if (!(ex instanceof TypeError)) {
throw ex;
}
exception = ex;
}
ok(!exception, exception);
@ -64,7 +76,10 @@ function test1() {
exception = null;
try {
navigator.geolocation.watchPosition();
} catch(ex if ex instanceof TypeError) {
} catch (ex) {
if (!(ex instanceof TypeError)) {
throw ex;
}
exception = ex;
}
ok(exception, "Should have got an exception");
@ -72,7 +87,10 @@ function test1() {
exception = null;
try {
navigator.geolocation.watchPosition(function() {});
} catch(ex if ex instanceof TypeError) {
} catch (ex) {
if (!(ex instanceof TypeError)) {
throw ex;
}
exception = ex;
}
ok(!exception, exception);
@ -80,7 +98,10 @@ function test1() {
exception = null;
try {
navigator.geolocation.watchPosition(function() {}, function() {});
} catch(ex if ex instanceof TypeError) {
} catch (ex) {
if (!(ex instanceof TypeError)) {
throw ex;
}
exception = ex;
}
ok(!exception, exception);
@ -88,7 +109,10 @@ function test1() {
exception = null;
try {
navigator.geolocation.watchPosition(function() {}, function() {}, {});
} catch(ex if ex instanceof TypeError) {
} catch (ex) {
if (!(ex instanceof TypeError)) {
throw ex;
}
exception = ex;
}
ok(!exception, exception);

View File

@ -679,10 +679,14 @@ WebRenderBridgeParent::RecvEmptyTransaction(const FocusTarget& aFocusTarget,
mApi->UpdatePipelineResources(resourceUpdates, mPipelineId, wr::NewEpoch(wrEpoch));
HoldPendingTransactionId(wrEpoch, aTransactionId, aTxnStartTime, aFwdTime);
} else {
bool sendDidComposite = false;
if (mPendingTransactionIds.empty()) {
sendDidComposite = true;
}
HoldPendingTransactionId(mWrEpoch, aTransactionId, aTxnStartTime, aFwdTime);
// If WebRenderBridgeParent does not have pending DidComposites,
// send DidComposite now.
if (mPendingTransactionIds.empty()) {
if (sendDidComposite) {
TimeStamp now = TimeStamp::Now();
mCompositorBridge->DidComposite(wr::AsUint64(mPipelineId), now, now);
}
@ -1287,9 +1291,6 @@ WebRenderBridgeParent::FlushTransactionIdsForEpoch(const wr::Epoch& aEpoch, cons
#endif
id = mPendingTransactionIds.front().mId;
mPendingTransactionIds.pop();
if (diff == 0) {
break;
}
}
return id;
}

View File

@ -5575,6 +5575,28 @@ JS_GetLocaleCallbacks(JSRuntime* rt);
/*
* Error reporting.
*
* There are four encoding variants for the error reporting API:
* UTF-8
* JSAPI's default encoding for error handling. Use this when the encoding
* of the error message, format string, and arguments is UTF-8.
* ASCII
* Equivalent to UTF-8, but also asserts that the error message, format
* string, and arguments are all ASCII. Because ASCII is a subset of UTF-8,
* any use of this encoding variant *could* be replaced with use of the
* UTF-8 variant. This variant exists solely to double-check the
* developer's assumption that all these strings truly are ASCII, given that
* UTF-8 and ASCII strings regrettably have the same C++ type.
* UC = UTF-16
* Use this when arguments are UTF-16. The format string must be UTF-8.
* Latin1 (planned to be removed)
* In this variant, all strings are interpreted byte-for-byte as the
* corresponding Unicode codepoint. This encoding may *safely* be used on
* any null-terminated string, regardless of its encoding. (You shouldn't
* *actually* be uncertain, but in the real world, a string's encoding -- if
* promised at all -- may be more...aspirational...than reality.) This
* encoding variant will eventually be removed -- work to convert your uses
* to UTF-8 as you're able.
*/
namespace JS {

View File

@ -5,8 +5,11 @@ function run_test() {
try {
zipCache.getZip(null);
do_throw("Shouldn't get here!");
} catch (e if ((e instanceof Components.interfaces.nsIException) &&
(e.result == Components.results.NS_ERROR_INVALID_POINTER))) {
} catch (e) {
if (!(e instanceof Components.interfaces.nsIException &&
e.result == Components.results.NS_ERROR_INVALID_POINTER)) {
throw e;
}
// do nothing, this test passes
}
}

View File

@ -4,8 +4,11 @@ function run_test() {
try {
zReader.open(null);
do_throw("Shouldn't get here!");
} catch (e if (e instanceof Components.interfaces.nsIException &&
e.result == Components.results.NS_ERROR_NULL_POINTER)) {
} catch (e) {
if (!(e instanceof Components.interfaces.nsIException &&
e.result == Components.results.NS_ERROR_NULL_POINTER)) {
throw e;
}
// do nothing, this test passes
}
}

View File

@ -21,8 +21,11 @@ function run_test()
zipW.open(invalidFile, PR_RDWR);
do_throw("Should have thrown NS_ERROR_FILE_CORRUPTED on " +
invalidArchive + " !");
} catch (e if (e instanceof Ci.nsIException &&
e.result == Components.results.NS_ERROR_FILE_CORRUPTED)) {
} catch (e) {
if (!(e instanceof Ci.nsIException &&
e.result == Components.results.NS_ERROR_FILE_CORRUPTED)) {
throw e;
}
// do nothing
}
});

View File

@ -1821,7 +1821,7 @@ pref("network.http.enforce-framing.soft", true);
pref("network.http.max_response_header_size", 393216);
// If we should attempt to race the cache and network
pref("network.http.rcwn.enabled", false);
pref("network.http.rcwn.enabled", true);
pref("network.http.rcwn.cache_queue_normal_threshold", 8);
pref("network.http.rcwn.cache_queue_priority_threshold", 2);
// We might attempt to race the cache with the network only if a resource

View File

@ -40,7 +40,7 @@ function openClientAuthDialog(cert) {
TEST_PORT, certList, returnVals);
return new Promise((resolve, reject) => {
win.addEventListener("load", function() {
resolve([win, returnVals]);
executeSoon(() => resolve([win, returnVals]));
}, {once: true});
});
}

View File

@ -66,7 +66,7 @@ function openDeleteCertConfirmDialog(tabID) {
tabID, gCertArray, retVals);
return new Promise((resolve, reject) => {
win.addEventListener("load", function() {
resolve([win, retVals]);
executeSoon(() => resolve([win, retVals]));
}, {once: true});
});
}

View File

@ -50,7 +50,7 @@ function openCertDownloadDialog(cert) {
"", cert, returnVals);
return new Promise((resolve, reject) => {
win.addEventListener("load", function() {
resolve([win, returnVals]);
executeSoon(() => resolve([win, returnVals]));
}, {once: true});
});
}

View File

@ -27,7 +27,7 @@ function openEditCertTrustDialog() {
gCert);
return new Promise((resolve, reject) => {
win.addEventListener("load", function() {
resolve(win);
executeSoon(() => resolve(win));
}, {once: true});
});
}

View File

@ -70,7 +70,7 @@ function openSetP12PasswordDialog() {
"", returnVals);
return new Promise((resolve, reject) => {
win.addEventListener("load", function() {
resolve([win, returnVals]);
executeSoon(() => resolve([win, returnVals]));
}, {once: true});
});
}

View File

@ -122,7 +122,7 @@ function openLoadModuleDialog() {
let win = window.openDialog("chrome://pippki/content/load_device.xul", "", "");
return new Promise(resolve => {
win.addEventListener("load", function() {
resolve(win);
executeSoon(() => resolve(win));
}, {once: true});
});
}

View File

@ -1,7 +1,10 @@
job-defaults:
max-run-time: 3600
suite: talos
virtualization: hardware
virtualization:
by-test-platform:
windows10-64-ccov/.*: virtual
default: hardware
mozharness:
script: talos_script.py
no-read-buildbot-config: true
@ -11,6 +14,10 @@ job-defaults:
- talos/mac_config.py
windows.*:
- talos/windows_config.py
windows10-64-ccov/debug:
- talos/windows_vm_config.py
linux64-ccov/opt:
- talos/linux64_config_taskcluster.py
default:
- talos/linux_config.py

View File

@ -623,6 +623,7 @@ def handle_keyed_by(config, tests):
'mozharness.requires-signed-builds',
'mozharness.script',
'worker-type',
'virtualization',
]
for test in tests:
for field in fields:
@ -675,11 +676,10 @@ def enable_code_coverage(config, tests):
test['run-on-projects'] == 'built-projects':
test['run-on-projects'] = ['mozilla-central', 'try']
# TODO: Fix talos on Windows coverage build.
if test['test-name'].startswith('talos'):
if 'talos' in test['test-name']:
test['max-run-time'] = 7200
test['docker-image'] = {"in-tree": "desktop1604-test"}
test['mozharness']['config'] = ['talos/linux64_config_taskcluster.py']
if 'linux' in test['build-platform']:
test['docker-image'] = {"in-tree": "desktop1604-test"}
test['mozharness']['extra-options'].append('--add-option')
test['mozharness']['extra-options'].append('--cycles,1')
test['mozharness']['extra-options'].append('--add-option')
@ -886,7 +886,7 @@ def set_worker_type(config, tests):
win_worker_type_platform = WINDOWS_WORKER_TYPES[
test_platform.split('/')[0]
]
if test.get('suite', '') == 'talos':
if test.get('suite', '') == 'talos' and 'ccov' not in test['build-platform']:
if try_options.get('taskcluster_worker'):
test['worker-type'] = win_worker_type_platform['hardware']
else:

View File

@ -1,5 +1,6 @@
import os
import socket
import sys
PYTHON = sys.executable
PYTHON_DLL = 'c:/mozilla-build/python/python27.dll'