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

Unified Diff: src/objects.cc

Issue 247953003: Tiny cleanup. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressing review comments Created 6 years, 8 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 | « src/api.cc ('k') | test/cctest/test-strings.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.cc
diff --git a/src/objects.cc b/src/objects.cc
index 95b2b062866bf71c34a0a3d416e77cdfed8d5b41..6daadf93accee473c516f9dee6721778d3bdffb7 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -10412,7 +10412,7 @@ void Oddball::Initialize(Isolate* isolate,
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);
@@ -15596,7 +15596,6 @@ Handle<String> StringTable::LookupString(Isolate* isolate,
}
-// TODO(ishell): Maybehandlify callers.
Handle<String> StringTable::LookupKey(Isolate* isolate, HashTableKey* key) {
Handle<StringTable> table = isolate->factory()->string_table();
int entry = table->FindEntry(key);
@@ -15611,8 +15610,9 @@ Handle<String> StringTable::LookupKey(Isolate* isolate, HashTableKey* key) {
// 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());
« no previous file with comments | « src/api.cc ('k') | test/cctest/test-strings.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698