Index: src/objects.cc |
diff --git a/src/objects.cc b/src/objects.cc |
index 732477cd81ff9852091de87e7a262a58e2bcecfc..db7c09138c43967e9ce9fb78d2bb52156482a1b4 100644 |
--- a/src/objects.cc |
+++ b/src/objects.cc |
@@ -1687,7 +1687,7 @@ bool String::MakeExternal(v8::String::ExternalStringResource* resource) { |
// the field caching the address of the backing store. When we encounter |
// short external strings in generated code, we need to bailout to runtime. |
Map* new_map; |
- if (size < ExternalString::kSize) { |
+ if (size < ExternalString::kSize || resource->isCompressible()) { |
Yang
2015/12/17 11:41:53
Is this necessary? For source strings, we always c
hajimehoshi
2016/01/05 08:07:44
I meant compressible string should use short_*_map
|
new_map = is_internalized |
? (is_one_byte |
? heap->short_external_internalized_string_with_one_byte_data_map() |
@@ -1753,7 +1753,7 @@ bool String::MakeExternal(v8::String::ExternalOneByteStringResource* resource) { |
// the field caching the address of the backing store. When we encounter |
// short external strings in generated code, we need to bailout to runtime. |
Map* new_map; |
- if (size < ExternalString::kSize) { |
+ if (size < ExternalString::kSize || resource->isCompressible()) { |
new_map = is_internalized |
? heap->short_external_one_byte_internalized_string_map() |
: heap->short_external_one_byte_string_map(); |