Commit 723f5c88 authored by Marja Hölttä's avatar Marja Hölttä Committed by Commit Bot

[heap] Remove fragile test.

test-heap/TransitionsArraySimpleToFull was relying on an allocation
happening (and GC being triggered) right at the start of
TransitionsAccessor::Insert. That allocation would put the TransitionsAccessor
back to the kUninitialized state. If there's no allocation at that point of the
program logic, the test will fail, since the TransitionsAccessor will be go to
the kFullTransitionArray state.

(Needed for the in-place weak ref work, which will remove the allocation at that point.)

BUG=v8:7308

Change-Id: Id3985e107d86440fe05daf5f3f29c84d028df929
Reviewed-on: https://chromium-review.googlesource.com/995476Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
Reviewed-by: 's avatarMichael Stanton <mvstanton@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52374}
parent 71018812
......@@ -2844,39 +2844,6 @@ TEST(TransitionArrayShrinksDuringAllocToOnePropertyFound) {
Map::cast(root->map()->GetBackPointer()));
CHECK_EQ(1, transitions_after);
}
TEST(TransitionArraySimpleToFull) {
FLAG_stress_compaction = false;
FLAG_stress_incremental_marking = false;
FLAG_allow_natives_syntax = true;
CcTest::InitializeVM();
v8::HandleScope scope(CcTest::isolate());
static const int transitions_count = 1;
CompileRun("function F() {}");
AddTransitions(transitions_count);
CompileRun("var root = new F;");
Handle<JSObject> root = GetByName("root");
// Count number of live transitions before marking.
int transitions_before = CountMapTransitions(root->map());
CHECK_EQ(transitions_count, transitions_before);
CompileRun("o = new F;"
"root = new F");
root = GetByName("root");
{
DisallowHeapAllocation no_gc;
CHECK(TestTransitionsAccessor(root->map(), &no_gc).IsWeakCellEncoding());
}
AddPropertyTo(2, root, "happy");
// Count number of live transitions after marking. Note that one transition
// is left, because 'root' still holds an instance of one transition target.
int transitions_after = CountMapTransitions(
Map::cast(root->map()->GetBackPointer()));
CHECK_EQ(1, transitions_after);
}
#endif // DEBUG
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment