From 1e142f0e007115f54f0f4dcc004171195d974aae Mon Sep 17 00:00:00 2001 From: "mstarzinger@chromium.org" Date: Tue, 24 Sep 2013 11:19:37 +0000 Subject: [PATCH] Correctly check for AllowHeapAllocation::IsAllowed(). R=adamk@chromium.org, hpayer@chromium.org Review URL: https://codereview.chromium.org/24302009 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16915 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- src/heap-inl.h | 4 +++- src/heap.cc | 4 ---- test/cctest/cctest.status | 5 +++++ 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/heap-inl.h b/src/heap-inl.h index e99ebd8..a0762a3 100644 --- a/src/heap-inl.h +++ b/src/heap-inl.h @@ -209,7 +209,9 @@ MaybeObject* Heap::CopyFixedDoubleArray(FixedDoubleArray* src) { MaybeObject* Heap::AllocateRaw(int size_in_bytes, AllocationSpace space, AllocationSpace retry_space) { - ASSERT(AllowHandleAllocation::IsAllowed() && gc_state_ == NOT_IN_GC); + ASSERT(AllowHandleAllocation::IsAllowed()); + ASSERT(AllowHeapAllocation::IsAllowed()); + ASSERT(gc_state_ == NOT_IN_GC); ASSERT(space != NEW_SPACE || retry_space == OLD_POINTER_SPACE || retry_space == OLD_DATA_SPACE || diff --git a/src/heap.cc b/src/heap.cc index 3c24f49..38a5dee 100644 --- a/src/heap.cc +++ b/src/heap.cc @@ -4382,10 +4382,6 @@ MaybeObject* Heap::AllocateArgumentsObject(Object* callee, int length) { arguments_object_size = kArgumentsObjectSize; } - // This calls Copy directly rather than using Heap::AllocateRaw so we - // duplicate the check here. - ASSERT(AllowHeapAllocation::IsAllowed() && gc_state_ == NOT_IN_GC); - // Check that the size of the boilerplate matches our // expectations. The ArgumentsAccessStub::GenerateNewObject relies // on the size being a known constant. diff --git a/test/cctest/cctest.status b/test/cctest/cctest.status index 8566109..db04d58 100644 --- a/test/cctest/cctest.status +++ b/test/cctest/cctest.status @@ -34,6 +34,11 @@ test-api/Bug*: FAIL # BUG(382): Weird test. Can't guarantee that it never times out. test-api/ApplyInterruption: PASS || TIMEOUT +# BUG(2907): Allocation while in DisallowHeapAllocation scope. +test-object-observe/NamedAccessCheck: SKIP +test-object-observe/DisallowAllForAccessKeys: SKIP +test-object-observe/AccessCheckDisallowApiModifications: SKIP + # TODO(mstarzinger): Fail gracefully on multiple V8::Dispose calls. test-api/InitializeAndDisposeOnce: SKIP test-api/InitializeAndDisposeMultiple: SKIP -- 2.7.4