Index: src/jsregexp.cc |
diff --git a/src/jsregexp.cc b/src/jsregexp.cc |
index c1a9e067c9374163d5fe54ed46081fac781df963..18ff2570e6ef3124f6e4ee07856872c5e431b53c 100644 |
--- a/src/jsregexp.cc |
+++ b/src/jsregexp.cc |
@@ -509,14 +509,16 @@ RegExpImpl::IrregexpResult RegExpImpl::IrregexpExecOnce( |
} |
Handle<ByteArray> byte_codes(IrregexpByteCode(*irregexp, is_ascii), isolate); |
- if (IrregexpInterpreter::Match(isolate, |
- byte_codes, |
- subject, |
- register_vector, |
- index)) { |
- return RE_SUCCESS; |
- } |
- return RE_FAILURE; |
+ IrregexpResult result = IrregexpInterpreter::Match(isolate, |
+ byte_codes, |
+ subject, |
+ register_vector, |
+ index); |
+ if (result == RE_EXCEPTION) { |
+ ASSERT(!isolate->has_pending_exception()); |
+ isolate->StackOverflow(); |
Erik Corry
2011/10/25 12:58:41
Do we do this for compiled regexps?
Lasse Reichstein
2011/10/25 13:27:10
Yes. It's handled a little further up the call-cha
|
+ } |
+ return result; |
#endif // V8_INTERPRETED_REGEXP |
} |