Index: test/cctest/test-strings.cc |
diff --git a/test/cctest/test-strings.cc b/test/cctest/test-strings.cc |
index f4b3719ba0dcaa84429f1735643d60e75863e8b3..6ff52003b8412ca1c8fc694df847f6ac475e3a38 100644 |
--- a/test/cctest/test-strings.cc |
+++ b/test/cctest/test-strings.cc |
@@ -447,7 +447,7 @@ static Handle<String> ConstructRandomString(ConsStringGenerationData* data, |
left = ConstructRandomString(data, max_recursion - 1); |
} |
// Build the cons string. |
- Handle<String> root = factory->NewConsString(left, right).ToHandleChecked(); |
+ Handle<String> root = factory->NewConsString(left, right); |
CHECK(root->IsConsString() && !root->IsFlat()); |
// Special work needed for flat string. |
if (flat) { |
@@ -467,8 +467,7 @@ static Handle<String> ConstructLeft( |
data->stats_.leaves_++; |
for (int i = 0; i < depth; i++) { |
Handle<String> block = data->block(i); |
- Handle<String> next = |
- factory->NewConsString(answer, block).ToHandleChecked(); |
+ Handle<String> next = factory->NewConsString(answer, block); |
if (next->IsConsString()) data->stats_.leaves_++; |
data->stats_.chars_ += block->length(); |
answer = next; |
@@ -486,8 +485,7 @@ static Handle<String> ConstructRight( |
data->stats_.leaves_++; |
for (int i = depth - 1; i >= 0; i--) { |
Handle<String> block = data->block(i); |
- Handle<String> next = |
- factory->NewConsString(block, answer).ToHandleChecked(); |
+ Handle<String> next = factory->NewConsString(block, answer); |
if (next->IsConsString()) data->stats_.leaves_++; |
data->stats_.chars_ += block->length(); |
answer = next; |
@@ -510,8 +508,7 @@ static Handle<String> ConstructBalancedHelper( |
if (to - from == 2) { |
data->stats_.chars_ += data->block(from)->length(); |
data->stats_.chars_ += data->block(from+1)->length(); |
- return factory->NewConsString(data->block(from), data->block(from+1)) |
- .ToHandleChecked(); |
+ return factory->NewConsString(data->block(from), data->block(from+1)); |
} |
Handle<String> part1 = |
ConstructBalancedHelper(data, from, from + ((to - from) / 2)); |
@@ -519,7 +516,7 @@ static Handle<String> ConstructBalancedHelper( |
ConstructBalancedHelper(data, from + ((to - from) / 2), to); |
if (part1->IsConsString()) data->stats_.left_traversals_++; |
if (part2->IsConsString()) data->stats_.right_traversals_++; |
- return factory->NewConsString(part1, part2).ToHandleChecked(); |
+ return factory->NewConsString(part1, part2); |
} |
@@ -713,8 +710,7 @@ static Handle<String> BuildEdgeCaseConsString( |
data->stats_.chars_ += data->block(0)->length(); |
data->stats_.chars_ += data->block(1)->length(); |
data->stats_.leaves_ += 2; |
- return factory->NewConsString(data->block(0), data->block(1)) |
- .ToHandleChecked(); |
+ return factory->NewConsString(data->block(0), data->block(1)); |
case 6: |
// Simple flattened tree. |
data->stats_.chars_ += data->block(0)->length(); |
@@ -723,8 +719,7 @@ static Handle<String> BuildEdgeCaseConsString( |
data->stats_.empty_leaves_ += 1; |
{ |
Handle<String> string = |
- factory->NewConsString(data->block(0), data->block(1)) |
- .ToHandleChecked(); |
+ factory->NewConsString(data->block(0), data->block(1)); |
FlattenString(string); |
return string; |
} |
@@ -738,10 +733,9 @@ static Handle<String> BuildEdgeCaseConsString( |
data->stats_.left_traversals_ += 1; |
{ |
Handle<String> left = |
- factory->NewConsString(data->block(0), data->block(1)) |
- .ToHandleChecked(); |
+ factory->NewConsString(data->block(0), data->block(1)); |
FlattenString(left); |
- return factory->NewConsString(left, data->block(2)).ToHandleChecked(); |
+ return factory->NewConsString(left, data->block(2)); |
} |
case 8: |
// Left node and right node flattened. |
@@ -755,14 +749,12 @@ static Handle<String> BuildEdgeCaseConsString( |
data->stats_.right_traversals_ += 1; |
{ |
Handle<String> left = |
- factory->NewConsString(data->block(0), data->block(1)) |
- .ToHandleChecked(); |
+ factory->NewConsString(data->block(0), data->block(1)); |
FlattenString(left); |
Handle<String> right = |
- factory->NewConsString(data->block(2), data->block(2)) |
- .ToHandleChecked(); |
+ factory->NewConsString(data->block(2), data->block(2)); |
FlattenString(right); |
- return factory->NewConsString(left, right).ToHandleChecked(); |
+ return factory->NewConsString(left, right); |
} |
} |
UNREACHABLE(); |
@@ -874,10 +866,9 @@ TEST(DeepAscii) { |
factory->NewStringFromAscii(Vector<const char>(foo, DEEP_ASCII_DEPTH)); |
Handle<String> foo_string = factory->NewStringFromAscii(CStrVector("foo")); |
for (int i = 0; i < DEEP_ASCII_DEPTH; i += 10) { |
- string = factory->NewConsString(string, foo_string).ToHandleChecked(); |
+ string = factory->NewConsString(string, foo_string); |
} |
- Handle<String> flat_string = |
- factory->NewConsString(string, foo_string).ToHandleChecked(); |
+ Handle<String> flat_string = factory->NewConsString(string, foo_string); |
FlattenString(flat_string); |
for (int i = 0; i < 500; i++) { |
@@ -1101,8 +1092,7 @@ TEST(SliceFromCons) { |
v8::HandleScope scope(CcTest::isolate()); |
Handle<String> string = |
factory->NewStringFromAscii(CStrVector("parentparentparent")); |
- Handle<String> parent = |
- factory->NewConsString(string, string).ToHandleChecked(); |
+ Handle<String> parent = factory->NewConsString(string, string); |
CHECK(parent->IsConsString()); |
CHECK(!parent->IsFlat()); |
Handle<String> slice = factory->NewSubString(parent, 1, 25); |