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);