Index: src/regexp/regexp-macro-assembler.cc |
diff --git a/src/regexp/regexp-macro-assembler.cc b/src/regexp/regexp-macro-assembler.cc |
index 73797e4416b8b198e3c13df50b56587bd6c04fa3..2e3a8a2f76877eb90bac9dd699ae03ba1e86a505 100644 |
--- a/src/regexp/regexp-macro-assembler.cc |
+++ b/src/regexp/regexp-macro-assembler.cc |
@@ -133,7 +133,8 @@ const byte* NativeRegExpMacroAssembler::StringCharacterPosition( |
} else if (subject->IsSlicedString()) { |
start_index += SlicedString::cast(subject)->offset(); |
subject = SlicedString::cast(subject)->parent(); |
- } else if (subject->IsThinString()) { |
+ } |
+ if (subject->IsThinString()) { |
subject = ThinString::cast(subject)->actual(); |
} |
DCHECK(start_index >= 0); |
@@ -148,6 +149,7 @@ const byte* NativeRegExpMacroAssembler::StringCharacterPosition( |
return reinterpret_cast<const byte*>( |
ExternalOneByteString::cast(subject)->GetChars() + start_index); |
} else { |
+ DCHECK(subject->IsExternalTwoByteString()); |
return reinterpret_cast<const byte*>( |
ExternalTwoByteString::cast(subject)->GetChars() + start_index); |
} |