mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-03 02:25:34 +00:00
Bug 1574915 - Fix useless try-catch issues in dom/. r=hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D42509 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
ca74b508b7
commit
c1ab51f11c
@ -62,11 +62,7 @@
|
||||
.then(
|
||||
result => step(gen.next(result)),
|
||||
error => {
|
||||
try {
|
||||
step(gen.throw(error));
|
||||
} catch (err) {
|
||||
throw err;
|
||||
}
|
||||
step(gen.throw(error));
|
||||
}
|
||||
)
|
||||
.catch(err => reject(err));
|
||||
|
@ -60,8 +60,8 @@ function runTests() {
|
||||
try {
|
||||
test_2d_canvaspattern_setTransform();
|
||||
} catch(e) {
|
||||
throw e;
|
||||
ok(false, "unexpected exception thrown in: test_2d_canvaspattern_setTransform");
|
||||
throw e;
|
||||
}
|
||||
SimpleTest.finish();
|
||||
}
|
||||
@ -75,4 +75,3 @@ document.all;
|
||||
window.p = new Path2D();
|
||||
|
||||
</script>
|
||||
|
||||
|
@ -25606,14 +25606,14 @@ function runTests() {
|
||||
try {
|
||||
test_getImageData_after_zero_canvas();
|
||||
} catch(e) {
|
||||
throw e;
|
||||
ok(false, "unexpected exception thrown in: test_getImageData_after_zero_canvas");
|
||||
throw e;
|
||||
}
|
||||
try {
|
||||
test_opaque();
|
||||
} catch(e) {
|
||||
throw e;
|
||||
ok(false, "unexpected exception thrown in: test_opaque");
|
||||
throw e;
|
||||
}
|
||||
try {
|
||||
test_2d_transformation_reset_transform();
|
||||
@ -25764,8 +25764,8 @@ function runTests() {
|
||||
try {
|
||||
test_2d_clearRect_testdoubleprecision();
|
||||
} catch(e) {
|
||||
throw e;
|
||||
ok(false, "unexpected exception thrown in: test_2d_clearRect_testdoubleprecision");
|
||||
throw e;
|
||||
}
|
||||
|
||||
//run the asynchronous tests
|
||||
|
@ -60,8 +60,8 @@ function runTests() {
|
||||
try {
|
||||
test_drawFocusIfNeeded_canvas();
|
||||
} catch(e) {
|
||||
throw e;
|
||||
ok(false, "unexpected exception thrown in: test_drawFocusIfNeeded_canvas");
|
||||
throw e;
|
||||
}
|
||||
|
||||
SpecialPowers.setBoolPref("canvas.focusring.enabled", false);
|
||||
|
@ -72,8 +72,8 @@ function runTests() {
|
||||
try {
|
||||
test_hitregions();
|
||||
} catch(e) {
|
||||
throw e;
|
||||
ok(false, "unexpected exception thrown in: test_hitregions");
|
||||
throw e;
|
||||
}
|
||||
SimpleTest.finish();
|
||||
}
|
||||
|
@ -28,23 +28,19 @@ function ignoreError(e) {}
|
||||
function CreateTestWS(ws_location, ws_protocol) {
|
||||
var ws;
|
||||
|
||||
try {
|
||||
if (ws_protocol == undefined) {
|
||||
ws = new WebSocket(ws_location);
|
||||
} else {
|
||||
ws = new WebSocket(ws_location, ws_protocol);
|
||||
}
|
||||
|
||||
ws._testNumber = current_test;
|
||||
ok(true, "Created websocket for test " + ws._testNumber + "\n");
|
||||
|
||||
ws.onerror = function(e) {
|
||||
ok(false, "onerror called on test " + e.target._testNumber + "!");
|
||||
};
|
||||
} catch (e) {
|
||||
throw e;
|
||||
if (ws_protocol == undefined) {
|
||||
ws = new WebSocket(ws_location);
|
||||
} else {
|
||||
ws = new WebSocket(ws_location, ws_protocol);
|
||||
}
|
||||
|
||||
ws._testNumber = current_test;
|
||||
ok(true, "Created websocket for test " + ws._testNumber + "\n");
|
||||
|
||||
ws.onerror = function(e) {
|
||||
ok(false, "onerror called on test " + e.target._testNumber + "!");
|
||||
};
|
||||
|
||||
return ws;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user