mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 645792 - Replace throwing an exception by returning null on HTMLCanvasElement::GetContext. r=bjacob
CLOSED TREE
This commit is contained in:
parent
8f4379b006
commit
c981a4bb3a
@ -66,9 +66,8 @@
|
||||
|
||||
MochiKit.DOM.addLoadEvent(function () {
|
||||
var canvas = document.getElementById("canvas");
|
||||
try {
|
||||
gl = canvas.getContext("experimental-webgl");
|
||||
} catch (e) {
|
||||
gl = canvas.getContext("experimental-webgl");
|
||||
if (!gl) {
|
||||
todo(false, "Canvas WebGL not supported");
|
||||
SimpleTest.finish();
|
||||
return;
|
||||
|
@ -804,6 +804,7 @@ HTMLCanvasElement::GetContext(JSContext* aCx,
|
||||
|
||||
rv = UpdateContext(aCx, aContextOptions);
|
||||
if (rv.Failed()) {
|
||||
rv = NS_OK; // See bug 645792
|
||||
return nullptr;
|
||||
}
|
||||
mCurrentContextId.Assign(aContextId);
|
||||
|
@ -16,9 +16,8 @@
|
||||
function testInt64NonFinite(arg) {
|
||||
// We can use a WebGLRenderingContext to test conversion to 64-bit signed
|
||||
// ints edge cases.
|
||||
try {
|
||||
var gl = $("c").getContext("experimental-webgl");
|
||||
} catch (ex) {
|
||||
var gl = $("c").getContext("experimental-webgl");
|
||||
if (!gl) {
|
||||
// No WebGL support on MacOS 10.5. Just skip this test
|
||||
todo(false, "WebGL not supported");
|
||||
return;
|
||||
|
@ -20,9 +20,8 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=775852
|
||||
|
||||
/** Test for Bug 775852 **/
|
||||
function doTest() {
|
||||
try {
|
||||
var gl = $("c").getContext("experimental-webgl");
|
||||
} catch (e) {
|
||||
var gl = $("c").getContext("experimental-webgl");
|
||||
if (!gl) {
|
||||
// No WebGL support on MacOS 10.5. Just skip this test
|
||||
todo(false, "WebGL not supported");
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user