Reviewers: Yang,

Message:
TBR: yang

Description:
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.

Please review this at http://codereview.chromium.org/7850011/

SVN Base: http://v8.googlecode.com/svn/branches/bleeding_edge/

Affected files:
  M     src/runtime.cc


Index: src/runtime.cc
===================================================================
--- src/runtime.cc      (revision 9183)
+++ src/runtime.cc      (working copy)
@@ -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