Revision: 20541
Author:   [email protected]
Date:     Mon Apr  7 11:36:33 2014 UTC
Log:      Handlify i18n.cc.

[email protected]

Review URL: https://codereview.chromium.org/226543003
http://code.google.com/p/v8/source/detail?r=20541

Modified:
 /branches/bleeding_edge/src/i18n.cc

=======================================
--- /branches/bleeding_edge/src/i18n.cc Fri Apr  4 12:06:11 2014 UTC
+++ /branches/bleeding_edge/src/i18n.cc Mon Apr  7 11:36:33 2014 UTC
@@ -58,11 +58,10 @@
                           const char* key,
                           icu::UnicodeString* setting) {
Handle<String> str = isolate->factory()->NewStringFromAscii(CStrVector(key));
-  MaybeObject* maybe_object = options->GetProperty(*str);
-  Object* object;
-  if (maybe_object->ToObject(&object) && object->IsString()) {
+  Handle<Object> object = Object::GetProperty(options, str);
+  if (object->IsString()) {
     v8::String::Utf8Value utf8_string(
-        v8::Utils::ToLocal(Handle<String>(String::cast(object))));
+        v8::Utils::ToLocal(Handle<String>::cast(object)));
     *setting = icu::UnicodeString::fromUTF8(*utf8_string);
     return true;
   }
@@ -75,9 +74,8 @@
                            const char* key,
                            int32_t* value) {
Handle<String> str = isolate->factory()->NewStringFromAscii(CStrVector(key));
-  MaybeObject* maybe_object = options->GetProperty(*str);
-  Object* object;
-  if (maybe_object->ToObject(&object) && object->IsNumber()) {
+  Handle<Object> object = Object::GetProperty(options, str);
+  if (object->IsNumber()) {
     object->ToInt32(value);
     return true;
   }
@@ -90,9 +88,8 @@
                            const char* key,
                            bool* value) {
Handle<String> str = isolate->factory()->NewStringFromAscii(CStrVector(key));
-  MaybeObject* maybe_object = options->GetProperty(*str);
-  Object* object;
-  if (maybe_object->ToObject(&object) && object->IsBoolean()) {
+  Handle<Object> object = Object::GetProperty(options, str);
+  if (object->IsBoolean()) {
     *value = object->BooleanValue();
     return true;
   }

--
--
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.

Reply via email to