Revision: 20925
Author: [email protected]
Date: Thu Apr 24 08:35:04 2014 UTC
Log: Tiny cleanup.
[email protected]
Review URL: https://codereview.chromium.org/247953003
http://code.google.com/p/v8/source/detail?r=20925
Modified:
/branches/bleeding_edge/src/api.cc
/branches/bleeding_edge/src/objects.cc
/branches/bleeding_edge/test/cctest/test-strings.cc
=======================================
--- /branches/bleeding_edge/src/api.cc Tue Apr 22 10:45:43 2014 UTC
+++ /branches/bleeding_edge/src/api.cc Thu Apr 24 08:35:04 2014 UTC
@@ -5330,7 +5330,7 @@
inline i::MaybeHandle<i::String> NewString(i::Factory* factory,
String::NewStringType type,
i::Vector<const char> string) {
- if (type ==String::kInternalizedString) {
+ if (type == String::kInternalizedString) {
return factory->InternalizeUtf8String(string);
}
return factory->NewStringFromUtf8(string);
=======================================
--- /branches/bleeding_edge/src/objects.cc Thu Apr 24 08:07:14 2014 UTC
+++ /branches/bleeding_edge/src/objects.cc Thu Apr 24 08:35:04 2014 UTC
@@ -10416,7 +10416,7 @@
Handle<Object> to_number,
byte kind) {
Handle<String> internalized_to_string =
- isolate->factory()->InternalizeUtf8String(CStrVector(to_string));
+ isolate->factory()->InternalizeUtf8String(to_string);
oddball->set_to_string(*internalized_to_string);
oddball->set_to_number(*to_number);
oddball->set_kind(kind);
@@ -15600,7 +15600,6 @@
}
-// TODO(ishell): Maybehandlify callers.
Handle<String> StringTable::LookupKey(Isolate* isolate, HashTableKey* key)
{
Handle<StringTable> table = isolate->factory()->string_table();
int entry = table->FindEntry(key);
@@ -15615,8 +15614,9 @@
// Create string object.
Handle<Object> string = key->AsHandle(isolate);
- // TODO(ishell): Maybehandlify this.
- if (string.is_null()) return Handle<String>();
+ // There must be no attempts to internalize strings that could throw
+ // InvalidStringLength error.
+ CHECK(!string.is_null());
// Add the new string and return it along with the string table.
entry = table->FindInsertionEntry(key->Hash());
=======================================
--- /branches/bleeding_edge/test/cctest/test-strings.cc Thu Apr 17 13:27:02
2014 UTC
+++ /branches/bleeding_edge/test/cctest/test-strings.cc Thu Apr 24 08:35:04
2014 UTC
@@ -1418,7 +1418,5 @@
INVALID_STRING_TEST(NewStringFromAscii, char)
INVALID_STRING_TEST(NewStringFromUtf8, char)
INVALID_STRING_TEST(NewStringFromOneByte, uint8_t)
-INVALID_STRING_TEST(InternalizeOneByteString, uint8_t)
-INVALID_STRING_TEST(InternalizeUtf8String, char)
#undef INVALID_STRING_TEST
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.