Correctly check for AllowHeapAllocation::IsAllowed().
authormstarzinger@chromium.org <mstarzinger@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Tue, 24 Sep 2013 11:19:37 +0000 (11:19 +0000)
committermstarzinger@chromium.org <mstarzinger@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Tue, 24 Sep 2013 11:19:37 +0000 (11:19 +0000)
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
src/heap.cc
test/cctest/cctest.status

index e99ebd8..a0762a3 100644 (file)
@@ -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 ||
index 3c24f49..38a5dee 100644 (file)
@@ -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.
index 8566109..db04d58 100644 (file)
@@ -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