Reviewers: Yang,

Message:
PTAL

Description:
Tiny cleanup.

Please review this at https://codereview.chromium.org/247953003/

SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge

Affected files (+3, -5 lines):
  M src/api.cc
  M src/objects.cc


Index: src/api.cc
diff --git a/src/api.cc b/src/api.cc
index bd62d102d1599e19b0fd8a6361a1f6ba3f4ce1b9..705cae55b00b4afb3bec52ed087f8b2f493f9e32 100644
--- a/src/api.cc
+++ b/src/api.cc
@@ -5330,7 +5330,7 @@ MUST_USE_RESULT
 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);
Index: src/objects.cc
diff --git a/src/objects.cc b/src/objects.cc
index 95b2b062866bf71c34a0a3d416e77cdfed8d5b41..eae2758914a2d69604ed3abf3df493f93ee1ab82 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,7 @@ 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>();
+  CHECK(!string.is_null());

   // Add the new string and return it along with the string table.
   entry = table->FindInsertionEntry(key->Hash());


--
--
v8-dev mailing list
v8-dev@googlegroups.com
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 v8-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to