Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(151)

Unified Diff: src/factory.cc

Issue 1347603002: Make all ExternalStrings bail out JIT code when accessing the sting contents Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/objects.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/factory.cc
diff --git a/src/factory.cc b/src/factory.cc
index 9104d60a099574cf768ac86fe7ad2b35e21aa0f5..664bcf828b36700dde7d3fb8a76b5396c1ea0f98 100644
--- a/src/factory.cc
+++ b/src/factory.cc
@@ -647,7 +647,7 @@ MaybeHandle<String> Factory::NewExternalStringFromOneByte(
THROW_NEW_ERROR(isolate(), NewInvalidStringLengthError(), String);
}
- Handle<Map> map = external_one_byte_string_map();
+ Handle<Map> map = short_external_one_byte_string_map();
Handle<ExternalOneByteString> external_string =
New<ExternalOneByteString>(map, NEW_SPACE);
external_string->set_length(static_cast<int>(length));
@@ -671,7 +671,8 @@ MaybeHandle<String> Factory::NewExternalStringFromTwoByte(
bool is_one_byte = length <= kOneByteCheckLengthLimit &&
String::IsOneByte(resource->data(), static_cast<int>(length));
Handle<Map> map = is_one_byte ?
- external_string_with_one_byte_data_map() : external_string_map();
+ short_external_string_with_one_byte_data_map()
+ : short_external_string_map();
Handle<ExternalTwoByteString> external_string =
New<ExternalTwoByteString>(map, NEW_SPACE);
external_string->set_length(static_cast<int>(length));
« no previous file with comments | « no previous file | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698