Bug 1239269 - as lastIndex cannot be negative change it's storage class from int32_t to uint32_t, r=Waldo

This commit is contained in:
Bogdan Postelnicu 2016-02-08 13:51:47 +02:00
parent ecd9fe75cd
commit e9c6094a9f
3 changed files with 6 additions and 6 deletions

View File

@ -928,7 +928,7 @@ js::RegExpMatcher(JSContext* cx, unsigned argc, Value* vp)
* This code cannot re-enter Ion code. */
bool
js::RegExpMatcherRaw(JSContext* cx, HandleObject regexp, HandleString input,
int32_t lastIndex, bool sticky,
uint32_t lastIndex, bool sticky,
MatchPairs* maybeMatches, MutableHandleValue output)
{
MOZ_ASSERT(lastIndex <= INT32_MAX);
@ -998,7 +998,7 @@ js::RegExpTester(JSContext* cx, unsigned argc, Value* vp)
* This code cannot re-enter Ion code. */
bool
js::RegExpTesterRaw(JSContext* cx, HandleObject regexp, HandleString input,
int32_t lastIndex, bool sticky, int32_t* endIndex)
uint32_t lastIndex, bool sticky, int32_t* endIndex)
{
MOZ_ASSERT(lastIndex <= INT32_MAX);

View File

@ -48,7 +48,7 @@ RegExpMatcher(JSContext* cx, unsigned argc, Value* vp);
extern bool
RegExpMatcherRaw(JSContext* cx, HandleObject regexp, HandleString input,
int32_t lastIndex, bool sticky,
uint32_t lastIndex, bool sticky,
MatchPairs* maybeMatches, MutableHandleValue output);
extern bool
@ -56,7 +56,7 @@ RegExpTester(JSContext* cx, unsigned argc, Value* vp);
extern bool
RegExpTesterRaw(JSContext* cx, HandleObject regexp, HandleString input,
int32_t lastIndex, bool sticky, int32_t* endIndex);
uint32_t lastIndex, bool sticky, int32_t* endIndex);
/*
* The following functions are for use by self-hosted code.

View File

@ -1751,7 +1751,7 @@ class OutOfLineRegExpMatcher : public OutOfLineCodeBase<CodeGenerator>
};
typedef bool (*RegExpMatcherRawFn)(JSContext* cx, HandleObject regexp, HandleString input,
int32_t lastIndex, bool sticky,
uint32_t lastIndex, bool sticky,
MatchPairs* pairs, MutableHandleValue output);
static const VMFunction RegExpMatcherRawInfo = FunctionInfo<RegExpMatcherRawFn>(RegExpMatcherRaw);
@ -1916,7 +1916,7 @@ class OutOfLineRegExpTester : public OutOfLineCodeBase<CodeGenerator>
};
typedef bool (*RegExpTesterRawFn)(JSContext* cx, HandleObject regexp, HandleString input,
int32_t lastIndex, bool sticky, int32_t* result);
uint32_t lastIndex, bool sticky, int32_t* result);
static const VMFunction RegExpTesterRawInfo = FunctionInfo<RegExpTesterRawFn>(RegExpTesterRaw);
void