Revision: 21081
Author:   [email protected]
Date:     Wed Apr 30 09:13:21 2014 UTC
Log:      Handlification TODOs in scanner and string stream resolved.

[email protected]

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

Modified:
 /branches/bleeding_edge/src/scanner.cc
 /branches/bleeding_edge/src/string-stream.cc

=======================================
--- /branches/bleeding_edge/src/scanner.cc      Tue Apr 29 06:42:26 2014 UTC
+++ /branches/bleeding_edge/src/scanner.cc      Wed Apr 30 09:13:21 2014 UTC
@@ -1095,19 +1095,13 @@

 Handle<String> Scanner::AllocateNextLiteralString(Isolate* isolate,
                                                   PretenureFlag tenured) {
-  MaybeHandle<String> maybe_result;
   if (is_next_literal_one_byte()) {
-    maybe_result = isolate->factory()->NewStringFromOneByte(
-        next_literal_one_byte_string(), tenured);
+    return isolate->factory()->NewStringFromOneByte(
+        next_literal_one_byte_string(), tenured).ToHandleChecked();
   } else {
-    maybe_result = isolate->factory()->NewStringFromTwoByte(
-        next_literal_two_byte_string(), tenured);
+    return isolate->factory()->NewStringFromTwoByte(
+        next_literal_two_byte_string(), tenured).ToHandleChecked();
   }
- // TODO(ishell): Temporarily returning null handle from here. I will proceed
-  // with maybehandlification in next CLs.
-  Handle<String> result;
-  if (!maybe_result.ToHandle(&result)) return Handle<String>();
-  return result;
 }


=======================================
--- /branches/bleeding_edge/src/string-stream.cc Thu Apr 17 13:27:02 2014 UTC +++ /branches/bleeding_edge/src/string-stream.cc Wed Apr 30 09:13:21 2014 UTC
@@ -265,14 +265,8 @@


 Handle<String> StringStream::ToString(Isolate* isolate) {
-  MaybeHandle<String> maybe_result = isolate->factory()->NewStringFromUtf8(
-      Vector<const char>(buffer_, length_));
-
- // TODO(ishell): Temporarily returning null handle from here. I will proceed
-  // with maybehandlification in next CLs.
-  Handle<String> result;
-  if (!maybe_result.ToHandle(&result)) return Handle<String>();
-  return result;
+  return isolate->factory()->NewStringFromUtf8(
+      Vector<const char>(buffer_, length_)).ToHandleChecked();
 }


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