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

Unified Diff: tools/lexer-shell.cc

Issue 239243018: Heap::AllocateStringFromOneByte() and major part of its callers handlified. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressing comment + some cleanup 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 | « test/cctest/test-strings.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/lexer-shell.cc
diff --git a/tools/lexer-shell.cc b/tools/lexer-shell.cc
index e2e4a9c2521f55a4074214afe82492c2096d4031..273cdd9f4d7a49d6cffa9b5b7788ddad4f4ccd77 100644
--- a/tools/lexer-shell.cc
+++ b/tools/lexer-shell.cc
@@ -67,16 +67,14 @@ class BaselineScanner {
Handle<String> result = isolate->factory()->NewStringFromTwoByte(
Vector<const uint16_t>(
reinterpret_cast<const uint16_t*>(source_),
- length / 2));
- CHECK_NOT_EMPTY_HANDLE(isolate, result);
+ length / 2)).ToHandleChecked();
stream_ =
new GenericStringUtf16CharacterStream(result, 0, result->length());
break;
}
case LATIN1: {
Handle<String> result = isolate->factory()->NewStringFromOneByte(
- Vector<const uint8_t>(source_, length));
- CHECK_NOT_EMPTY_HANDLE(isolate, result);
+ Vector<const uint8_t>(source_, length)).ToHandleChecked();
stream_ =
new GenericStringUtf16CharacterStream(result, 0, result->length());
break;
« no previous file with comments | « test/cctest/test-strings.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698