| Index: test/cctest/test-heap.cc
|
| diff --git a/test/cctest/test-heap.cc b/test/cctest/test-heap.cc
|
| index c9e5d50add4e63269f675adcb7acfe404754b5b4..dfc1ab5c4f7ee3b162607e4ea6dd48134b28a367 100644
|
| --- a/test/cctest/test-heap.cc
|
| +++ b/test/cctest/test-heap.cc
|
| @@ -595,13 +595,20 @@ static const char* not_so_random_string_table[] = {
|
|
|
|
|
| static void CheckInternalizedStrings(const char** strings) {
|
| - Factory* factory = CcTest::i_isolate()->factory();
|
| + Isolate* isolate = CcTest::i_isolate();
|
| + Factory* factory = isolate->factory();
|
| for (const char* string = *strings; *strings != 0; string = *strings++) {
|
| - Handle<String> a = factory->InternalizeUtf8String(string);
|
| + HandleScope scope(isolate);
|
| + Handle<String> a =
|
| + isolate->factory()->InternalizeUtf8String(CStrVector(string));
|
| + // InternalizeUtf8String may return a failure if a GC is needed.
|
| CHECK(a->IsInternalizedString());
|
| Handle<String> b = factory->InternalizeUtf8String(string);
|
| CHECK_EQ(*b, *a);
|
| - CHECK(String::cast(*b)->IsUtf8EqualTo(CStrVector(string)));
|
| + CHECK(b->IsUtf8EqualTo(CStrVector(string)));
|
| + b = isolate->factory()->InternalizeUtf8String(CStrVector(string));
|
| + CHECK_EQ(*b, *a);
|
| + CHECK(b->IsUtf8EqualTo(CStrVector(string)));
|
| }
|
| }
|
|
|
| @@ -977,7 +984,7 @@ TEST(Regression39128) {
|
| // Test case for crbug.com/39128.
|
| CcTest::InitializeVM();
|
| Isolate* isolate = CcTest::i_isolate();
|
| - Heap* heap = isolate->heap();
|
| + TestHeap* heap = CcTest::test_heap();
|
|
|
| // Increase the chance of 'bump-the-pointer' allocation in old space.
|
| heap->CollectAllGarbage(Heap::kAbortIncrementalMarkingMask);
|
|
|