Reviewers: dcarney, Michael Starzinger,

Description:
Return i18n object holders directly.

BUG=none
[email protected],[email protected]

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

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

Affected files:
  M src/runtime.cc


Index: src/runtime.cc
diff --git a/src/runtime.cc b/src/runtime.cc
index 6213594155d909ff898f01daa5290065e1a6067c..56aa19ef0eec91a3b94a4c4e2691a4cd3baca6e4 100644
--- a/src/runtime.cc
+++ b/src/runtime.cc
@@ -13619,9 +13619,8 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_CreateDateTimeFormat) {
                                  v8::Utils::ToLocal(local_object));
// Make object handle weak so we can delete the data format once GC kicks in.
   wrapper.MakeWeak<void>(NULL, &DateFormat::DeleteDateFormat);
-  Handle<Object> result = Utils::OpenPersistent(wrapper);
   wrapper.ClearAndLeak();
-  return *result;
+  return *local_object;
 }


@@ -13724,9 +13723,8 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_CreateNumberFormat) { // Make object handle weak so we can delete the number format once GC kicks
   // in.
   wrapper.MakeWeak<void>(NULL, &NumberFormat::DeleteNumberFormat);
-  Handle<Object> result = Utils::OpenPersistent(wrapper);
   wrapper.ClearAndLeak();
-  return *result;
+  return *local_object;
 }


@@ -13837,9 +13835,8 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_CreateCollator) {
                                  v8::Utils::ToLocal(local_object));
// Make object handle weak so we can delete the collator once GC kicks in.
   wrapper.MakeWeak<void>(NULL, &Collator::DeleteCollator);
-  Handle<Object> result = Utils::OpenPersistent(wrapper);
   wrapper.ClearAndLeak();
-  return *result;
+  return *local_object;
 }




--
--
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/groups/opt_out.

Reply via email to