forked from mirrors/gecko-dev
Backed out changeset 95eda02f60c4 (bug 1887081) for causing mochitests failures in test_serviceworker_interfaces.html. CLOSED TREE
This commit is contained in:
parent
d76e7b6344
commit
6121b33709
4 changed files with 2 additions and 63 deletions
|
|
@ -382,56 +382,3 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// WebAssembly.JSTag property is read-only and enumerable
|
|
||||||
WebAssembly.JSTag = null;
|
|
||||||
assertEq(WebAssembly.JSTag !== null, true);
|
|
||||||
assertEq(WebAssembly.propertyIsEnumerable('JSTag'), true);
|
|
||||||
|
|
||||||
// Test try_table catching JS exceptions and unpacking them using JSTag
|
|
||||||
{
|
|
||||||
let tag = WebAssembly.JSTag;
|
|
||||||
let values = [...WasmExternrefValues];
|
|
||||||
function throwJS(value) {
|
|
||||||
throw value;
|
|
||||||
}
|
|
||||||
let {test} = wasmEvalText(`(module
|
|
||||||
(import "" "tag" (tag $tag (param externref)))
|
|
||||||
(import "" "throwJS" (func $throwJS (param externref)))
|
|
||||||
(func (export "test") (param externref) (result externref)
|
|
||||||
try_table (catch $tag 0)
|
|
||||||
local.get 0
|
|
||||||
call $throwJS
|
|
||||||
end
|
|
||||||
unreachable
|
|
||||||
)
|
|
||||||
)`, {"": {tag, throwJS}}).exports;
|
|
||||||
|
|
||||||
for (let value of values) {
|
|
||||||
assertEq(value, test(value));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Test try_table catching JS exceptions using JSTag and unpacking them using JSTag
|
|
||||||
{
|
|
||||||
let tag = WebAssembly.JSTag;
|
|
||||||
let values = [...WasmExternrefValues];
|
|
||||||
function throwJS(value) {
|
|
||||||
throw new WebAssembly.Exception(tag, [value]);
|
|
||||||
}
|
|
||||||
let {test} = wasmEvalText(`(module
|
|
||||||
(import "" "tag" (tag $tag (param externref)))
|
|
||||||
(import "" "throwJS" (func $throwJS (param externref)))
|
|
||||||
(func (export "test") (param externref) (result externref)
|
|
||||||
try_table (catch $tag 0)
|
|
||||||
local.get 0
|
|
||||||
call $throwJS
|
|
||||||
end
|
|
||||||
unreachable
|
|
||||||
)
|
|
||||||
)`, {"": {tag, throwJS}}).exports;
|
|
||||||
|
|
||||||
for (let value of values) {
|
|
||||||
assertEq(value, test(value));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -335,7 +335,6 @@
|
||||||
MACRO_(iterate, "iterate") \
|
MACRO_(iterate, "iterate") \
|
||||||
MACRO_(join, "join") \
|
MACRO_(join, "join") \
|
||||||
MACRO2(js, "js") \
|
MACRO2(js, "js") \
|
||||||
MACRO_(jsTag, "JSTag") \
|
|
||||||
MACRO_(jsStringModule, "js-string") \
|
MACRO_(jsStringModule, "js-string") \
|
||||||
MACRO_(json, "json") \
|
MACRO_(json, "json") \
|
||||||
MACRO_(keys, "keys") \
|
MACRO_(keys, "keys") \
|
||||||
|
|
|
||||||
|
|
@ -5410,15 +5410,6 @@ static bool WebAssemblyClassFinish(JSContext* cx, HandleObject object,
|
||||||
|
|
||||||
wasm->setWrappedJSValueTag(wrappedJSValueTagObject);
|
wasm->setWrappedJSValueTag(wrappedJSValueTagObject);
|
||||||
|
|
||||||
if (ExnRefAvailable(cx)) {
|
|
||||||
RootedId jsTagName(cx, NameToId(cx->names().jsTag));
|
|
||||||
RootedValue jsTagValue(cx, ObjectValue(*wrappedJSValueTagObject));
|
|
||||||
if (!DefineDataProperty(cx, wasm, jsTagName, jsTagValue,
|
|
||||||
JSPROP_READONLY | JSPROP_ENUMERATE)) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef ENABLE_WASM_MOZ_INTGEMM
|
#ifdef ENABLE_WASM_MOZ_INTGEMM
|
||||||
if (MozIntGemmAvailable(cx) &&
|
if (MozIntGemmAvailable(cx) &&
|
||||||
!JS_DefineFunctions(cx, wasm, WebAssembly_mozIntGemm_methods)) {
|
!JS_DefineFunctions(cx, wasm, WebAssembly_mozIntGemm_methods)) {
|
||||||
|
|
|
||||||
|
|
@ -94,12 +94,14 @@ static bool ToRefType(JSContext* cx, JSLinearString* typeLinearStr,
|
||||||
*out = RefType::extern_();
|
*out = RefType::extern_();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
#ifdef ENABLE_WASM_EXNREF
|
||||||
if (ExnRefAvailable(cx)) {
|
if (ExnRefAvailable(cx)) {
|
||||||
if (StringEqualsLiteral(typeLinearStr, "exnref")) {
|
if (StringEqualsLiteral(typeLinearStr, "exnref")) {
|
||||||
*out = RefType::exn();
|
*out = RefType::exn();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
#ifdef ENABLE_WASM_GC
|
#ifdef ENABLE_WASM_GC
|
||||||
if (GcAvailable(cx)) {
|
if (GcAvailable(cx)) {
|
||||||
if (StringEqualsLiteral(typeLinearStr, "anyref")) {
|
if (StringEqualsLiteral(typeLinearStr, "anyref")) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue