mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 583126 - parseInt(string) traceable native ignores OOM. rs=jorendorff
--HG-- extra : rebase_source : b9244f62e7f4bc0e0db96a7b5fa21b43ffc1b7de
This commit is contained in:
parent
482da28f6d
commit
9bb90b0bc3
@ -68,6 +68,7 @@
|
||||
#include "jsprf.h"
|
||||
#include "jsscope.h"
|
||||
#include "jsstr.h"
|
||||
#include "jstracer.h"
|
||||
#include "jsvector.h"
|
||||
|
||||
#include "jsobjinlines.h"
|
||||
@ -469,8 +470,10 @@ ParseInt(JSContext* cx, JSString* str)
|
||||
str->getCharsAndEnd(start, end);
|
||||
|
||||
jsdouble d;
|
||||
if (!ParseIntStringHelper(cx, start, end, 0, true, &d))
|
||||
return js_NaN; // FIXME bug 583126: ignores OOM!
|
||||
if (!ParseIntStringHelper(cx, start, end, 0, true, &d)) {
|
||||
SetBuiltinError(cx);
|
||||
return js_NaN;
|
||||
}
|
||||
return d;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user