mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Fix test fallout from bug 883358 so we can stop having a CLOSED TREE. No review.
This commit is contained in:
parent
3b99845dd9
commit
0e37bdf3dc
@ -829,8 +829,8 @@ XrayResolveAttribute(JSContext* cx, JS::Handle<JSObject*> wrapper,
|
||||
// They all have getters, so we can just make it.
|
||||
JS::Rooted<JSObject*> global(cx, JS_GetGlobalForObject(cx, wrapper));
|
||||
JS::Rooted<JSFunction*> fun(cx,
|
||||
JS_NewFunction(cx, (JSNative)attrSpec.getter.op,
|
||||
0, 0, global, nullptr));
|
||||
JS_NewFunctionById(cx, (JSNative)attrSpec.getter.op,
|
||||
0, 0, global, id));
|
||||
if (!fun)
|
||||
return false;
|
||||
SET_JITINFO(fun, attrSpec.getter.info);
|
||||
@ -839,8 +839,8 @@ XrayResolveAttribute(JSContext* cx, JS::Handle<JSObject*> wrapper,
|
||||
desc->attrs |= JSPROP_GETTER;
|
||||
if (attrSpec.setter.op) {
|
||||
// We have a setter! Make it.
|
||||
fun = JS_NewFunction(cx, (JSNative)attrSpec.setter.op, 1, 0,
|
||||
global, nullptr);
|
||||
fun = JS_NewFunctionById(cx, (JSNative)attrSpec.setter.op, 1, 0,
|
||||
global, id);
|
||||
if (!fun)
|
||||
return false;
|
||||
SET_JITINFO(fun, attrSpec.setter.info);
|
||||
|
@ -47,9 +47,6 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=882653
|
||||
[ '(new TextEncoder).encode("", new RegExp())',
|
||||
"Argument 2 of TextEncoder.encode can't be converted to a dictionary.",
|
||||
"regexp passed for a dictionary" ],
|
||||
[ 'document.createElement("canvas").getContext("webgl").uniform1fv(null, new RegExp())',
|
||||
"Argument 2 is not valid for any of the 2-argument overloads of WebGLRenderingContext.uniform1fv.",
|
||||
"regexp passed for a sequence" ],
|
||||
[ 'document.createElement("select").add({})',
|
||||
"Argument 1 of HTMLSelectElement.add could not be converted to any of: HTMLOptionElement, HTMLOptGroupElement.",
|
||||
"invalid value passed for union" ],
|
||||
@ -58,6 +55,19 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=882653
|
||||
"invalid float" ]
|
||||
];
|
||||
|
||||
try {
|
||||
document.createElement("canvas").getContext("webgl");
|
||||
// If that didn't throw, our WebGL-using test should be safe
|
||||
tests.push(
|
||||
[ 'document.createElement("canvas").getContext("webgl").uniform1fv(null, new RegExp())',
|
||||
"Argument 2 is not valid for any of the 2-argument overloads of WebGLRenderingContext.uniform1fv.",
|
||||
"regexp passed for a sequence" ]
|
||||
);
|
||||
} catch (e) {
|
||||
// No WebGL in some cases, apparently
|
||||
todo(false, "No WebGL here?");
|
||||
}
|
||||
|
||||
for (var i = 0; i < tests.length; ++i) {
|
||||
msg = "Correct exception should be thrown for " + tests[i][2];
|
||||
try {
|
||||
|
Loading…
Reference in New Issue
Block a user