Bug 1676901 - Remove duplicated check for i64 in WasmGlobalObject::construct; r=lth

Differential Revision: https://phabricator.services.mozilla.com/D96843
This commit is contained in:
Ms2ger 2020-11-13 07:34:45 +00:00
Родитель 99fe7a41c3
Коммит 7c037206af
1 изменённых файлов: 1 добавлений и 5 удалений

Просмотреть файл

@ -3264,16 +3264,12 @@ bool WasmGlobalObject::construct(JSContext* cx, unsigned argc, Value* vp) {
ValType globalType;
if (StringEqualsLiteral(typeLinearStr, "i32")) {
globalType = ValType::I32;
} else if (args.length() == 1 && StringEqualsLiteral(typeLinearStr, "i64")) {
// For the time being, i64 is allowed only if there is not an
// initializing value.
} else if (StringEqualsLiteral(typeLinearStr, "i64")) {
globalType = ValType::I64;
} else if (StringEqualsLiteral(typeLinearStr, "f32")) {
globalType = ValType::F32;
} else if (StringEqualsLiteral(typeLinearStr, "f64")) {
globalType = ValType::F64;
} else if (StringEqualsLiteral(typeLinearStr, "i64")) {
globalType = ValType::I64;
#ifdef ENABLE_WASM_SIMD
} else if (SimdAvailable(cx) && StringEqualsLiteral(typeLinearStr, "v128")) {
globalType = ValType::V128;