mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-22 01:35:35 +00:00
Bug 1254105 - Avoid passing magic values to the error reporter machinery in the ShortestPaths testing function; r=jimb
The error reporting machinery will try and stringify any value you pass it, and stringifying asserts that we don't pass magic values. Easiest solution is to just hard code the error message, since this is a testing-only function. --HG-- extra : rebase_source : d096a2cd2f697533279c5b33cbe5de3c5a2513a9
This commit is contained in:
parent
f179579502
commit
8cdfc57103
@ -2628,9 +2628,7 @@ ShortestPaths(JSContext* cx, unsigned argc, Value* vp)
|
||||
for (size_t i = 0; i < length; i++) {
|
||||
RootedValue el(cx, objs->getDenseElement(i));
|
||||
if (!el.isObject() && !el.isString() && !el.isSymbol()) {
|
||||
ReportValueErrorFlags(cx, JSREPORT_ERROR, JSMSG_UNEXPECTED_TYPE,
|
||||
JSDVG_SEARCH_STACK, el, nullptr,
|
||||
"not an object, string, or symbol", nullptr);
|
||||
JS_ReportError(cx, "Each target must be an object, string, or symbol");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
3
js/src/jit-test/tests/heap-analysis/bug-1254105.js
Normal file
3
js/src/jit-test/tests/heap-analysis/bug-1254105.js
Normal file
@ -0,0 +1,3 @@
|
||||
// |jit-test| error:Error: Each target must be an object, string, or symbol
|
||||
|
||||
shortestPaths(this, [, , , undefined], 5)
|
Loading…
Reference in New Issue
Block a user