Author: [EMAIL PROTECTED]
Date: Thu Nov 13 22:23:53 2008
New Revision: 750
Modified:
branches/experimental/regexp2000/src/jsregexp.cc
branches/experimental/regexp2000/src/runtime.cc
Log:
Fixed test failures in debug mode caused by merging in Mads' changes
that disallowed handles containing failures.
Modified: branches/experimental/regexp2000/src/jsregexp.cc
==============================================================================
--- branches/experimental/regexp2000/src/jsregexp.cc (original)
+++ branches/experimental/regexp2000/src/jsregexp.cc Thu Nov 13 22:23:53
2008
@@ -184,15 +184,15 @@
}
-static inline Handle<Object> CreateRegExpException(Handle<JSRegExp> re,
- Handle<String> pattern,
- Handle<String>
error_text,
- const char* message) {
+static inline void ThrowRegExpException(Handle<JSRegExp> re,
+ Handle<String> pattern,
+ Handle<String> error_text,
+ const char* message) {
Handle<JSArray> array = Factory::NewJSArray(2);
SetElement(array, 0, pattern);
SetElement(array, 1, error_text);
Handle<Object> regexp_err = Factory::NewSyntaxError(message, array);
- return Handle<Object>(Top::Throw(*regexp_err));
+ Top::Throw(*regexp_err);
}
@@ -212,10 +212,11 @@
RegExpParseResult parse_result;
if (!ParseRegExp(&buffer, &parse_result)) {
// Throw an exception if we fail to parse the pattern.
- return CreateRegExpException(re,
- pattern,
- parse_result.error,
- "malformed_regexp");
+ ThrowRegExpException(re,
+ pattern,
+ parse_result.error,
+ "malformed_regexp");
+ return Handle<Object>();
}
RegExpAtom* atom = parse_result.tree->AsAtom();
if (atom != NULL && !flags.is_ignore_case()) {
Modified: branches/experimental/regexp2000/src/runtime.cc
==============================================================================
--- branches/experimental/regexp2000/src/runtime.cc (original)
+++ branches/experimental/regexp2000/src/runtime.cc Thu Nov 13 22:23:53 2008
@@ -288,7 +288,7 @@
static Object* Runtime_RegExpCompile(Arguments args) {
- HandleScope scope; // create a new handle scope
+ HandleScope scope;
ASSERT(args.length() == 3);
CONVERT_CHECKED(JSRegExp, raw_re, args[0]);
Handle<JSRegExp> re(raw_re);
--~--~---------~--~----~------------~-------~--~----~
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
-~----------~----~----~----~------~----~------~--~---