mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 898734 - Fix segfault in error handling. r=nmatsakis
--HG-- extra : rebase_source : dfecbc3c3150deb19e352a3d885e35f24983e2e9
This commit is contained in:
parent
144876393b
commit
c06504457b
@ -410,10 +410,8 @@ NumericType<T>::call(JSContext *cx, unsigned argc, Value *vp)
|
||||
{
|
||||
CallArgs args = CallArgsFromVp(argc, vp);
|
||||
if (args.length() < 1) {
|
||||
char *fnName = JS_EncodeString(cx, args.callee().as<JSFunction>().atom());
|
||||
JS_ReportErrorNumber(cx, js_GetErrorMessage, NULL, JSMSG_MORE_ARGS_NEEDED,
|
||||
fnName, "0", "s");
|
||||
JS_free(cx, (void *) fnName);
|
||||
args.callee().getClass()->name, "0", "s");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -85,6 +85,7 @@ function runTests()
|
||||
check(function() type(/abcd/) == 0);
|
||||
|
||||
checkThrows(function() new type());
|
||||
checkThrows(function() type());
|
||||
}
|
||||
|
||||
var floatTypes = [float32, float64];
|
||||
@ -105,6 +106,7 @@ function runTests()
|
||||
check(function() Number.isNaN(type(/abcd/)));
|
||||
|
||||
checkThrows(function() new type());
|
||||
checkThrows(function() type());
|
||||
}
|
||||
|
||||
///// test ranges and creation
|
||||
|
Loading…
Reference in New Issue
Block a user