зеркало из https://github.com/mozilla/gecko-dev.git
Backed out changeset f7fb3affa4fb (bug 1598377
) for causing failures in wasm-testharness.js CLOSED TREE
This commit is contained in:
Родитель
be122e52af
Коммит
a500b741f0
|
@ -578,9 +578,11 @@ static const unsigned MaxElemSegments = 10000000;
|
|||
static const unsigned MaxTableLength = 10000000;
|
||||
static const unsigned MaxLocals = 50000;
|
||||
static const unsigned MaxParams = 1000;
|
||||
// The actual maximum results may be `1` if multi-value is not enabled. Check
|
||||
// `env->funcMaxResults()` to get the correct value for a module.
|
||||
#ifdef ENABLE_WASM_MULTI_VALUE
|
||||
static const unsigned MaxResults = 1000;
|
||||
#else
|
||||
static const unsigned MaxResults = 1;
|
||||
#endif
|
||||
static const unsigned MaxStructFields = 1000;
|
||||
static const unsigned MaxMemoryMaximumPages = 65536;
|
||||
static const unsigned MaxStringBytes = 100000;
|
||||
|
|
|
@ -1328,7 +1328,7 @@ static bool DecodeFuncType(Decoder& d, ModuleEnvironment* env,
|
|||
if (!d.readVarU32(&numResults)) {
|
||||
return d.fail("bad number of function returns");
|
||||
}
|
||||
if (numResults > env->funcMaxResults()) {
|
||||
if (numResults > MaxResults) {
|
||||
return d.fail("too many returns in signature");
|
||||
}
|
||||
ValTypeVector results;
|
||||
|
|
|
@ -224,9 +224,6 @@ struct ModuleEnvironment {
|
|||
bool hugeMemoryEnabled() const {
|
||||
return !isAsmJS() && compilerEnv->hugeMemory();
|
||||
}
|
||||
uint32_t funcMaxResults() const {
|
||||
return multiValuesEnabled() ? MaxResults : 1;
|
||||
}
|
||||
bool funcIsImport(uint32_t funcIndex) const {
|
||||
return funcIndex < funcImportGlobalDataOffsets.length();
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче