Revision: 9184
Author:   [email protected]
Date:     Wed Sep  7 23:23:05 2011
Log:      Fix wrong assert from 9180

There is an optional parameter to the function, with default value being a null handle. We then check that this is a flat string.
Review URL: http://codereview.chromium.org/7850011
http://code.google.com/p/v8/source/detail?r=9184

Modified:
 /branches/bleeding_edge/src/runtime.cc

=======================================
--- /branches/bleeding_edge/src/runtime.cc      Wed Sep  7 23:06:13 2011
+++ /branches/bleeding_edge/src/runtime.cc      Wed Sep  7 23:23:05 2011
@@ -2881,7 +2881,7 @@
     Handle<JSRegExp> pattern_regexp,
     Handle<String> replacement = Handle<String>::null()) {
   ASSERT(subject->IsFlat());
-  ASSERT(replacement->IsFlat());
+  ASSERT(replacement.is_null() || replacement->IsFlat());

   ZoneScope zone_space(isolate, DELETE_ON_EXIT);
   ZoneList<int> indices(8);

--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to