Index: src/factory.cc |
diff --git a/src/factory.cc b/src/factory.cc |
index 92d287b88b4e420ca3b0035290275ebddf261aec..d892d5b994ae2fb469b48f6aad9e0359d6ba3d0f 100644 |
--- a/src/factory.cc |
+++ b/src/factory.cc |
@@ -795,6 +795,10 @@ Handle<String> Factory::NewProperSubString(Handle<String> str, |
str = Handle<String>(slice->parent(), isolate()); |
offset += slice->offset(); |
} |
+ if (str->IsThinString()) { |
+ Handle<ThinString> thin = Handle<ThinString>::cast(str); |
+ str = handle(thin->actual(), isolate()); |
+ } |
DCHECK(str->IsSeqString() || str->IsExternalString()); |
Handle<Map> map = str->IsOneByteRepresentation() |