From 6bcf1628538d2f90a1d3c668d4f37feaeea97cf8 Mon Sep 17 00:00:00 2001 From: "ricow@chromium.org" Date: Thu, 8 Sep 2011 06:23:05 +0000 Subject: [PATCH] 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 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9184 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- src/runtime.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/runtime.cc b/src/runtime.cc index a28cb5996f..b1cbaf28ba 100644 --- a/src/runtime.cc +++ b/src/runtime.cc @@ -2881,7 +2881,7 @@ MUST_USE_RESULT static MaybeObject* StringReplaceStringWithString( Handle pattern_regexp, Handle replacement = Handle::null()) { ASSERT(subject->IsFlat()); - ASSERT(replacement->IsFlat()); + ASSERT(replacement.is_null() || replacement->IsFlat()); ZoneScope zone_space(isolate, DELETE_ON_EXIT); ZoneList indices(8);