|
|
|
Lines 809-824
js::ExecuteRegExp(JSContext* cx, HandleO
|
Link Here
|
|---|
|
| 809 |
return RegExpRunStatus_Error; |
809 |
return RegExpRunStatus_Error; |
| 810 |
|
810 |
|
| 811 |
if (status == RegExpRunStatus_Success_NotFound) { |
811 |
if (status == RegExpRunStatus_Success_NotFound) { |
| 812 |
/* Steps 15.a.i-ii. */ |
812 |
/* Steps 15.a.i-ii. */ |
| 813 |
if (!SetLastIndex(cx, reobj, 0)) |
813 |
if (!SetLastIndex(cx, reobj, 0)) |
| 814 |
return RegExpRunStatus_Error; |
814 |
return RegExpRunStatus_Error; |
| 815 |
} else if (reobj->needUpdateLastIndex()) { |
815 |
} else if (reobj->needUpdateLastIndex()) { |
| 816 |
/* Steps 18.a-b. */ |
816 |
/* Steps 18.a-b. */ |
|
|
817 |
MOZ_ASSERT(matches && !matches->empty()); |
| 817 |
if (!SetLastIndex(cx, reobj, (*matches)[0].limit)) |
818 |
if (!SetLastIndex(cx, reobj, (*matches)[0].limit)) |
| 818 |
return RegExpRunStatus_Error; |
819 |
return RegExpRunStatus_Error; |
| 819 |
} |
820 |
} |
| 820 |
|
821 |
|
| 821 |
return status; |
822 |
return status; |
| 822 |
} |
823 |
} |
| 823 |
|
824 |
|
| 824 |
/* ES5 15.10.6.2 (and 15.10.6.3, which calls 15.10.6.2). */ |
825 |
/* ES5 15.10.6.2 (and 15.10.6.3, which calls 15.10.6.2). */ |