Reviewers: Hannes Payer, adamk, rafaelw,

Message:
hpayer: PTAL.
adamk,rafaelw: I will open an issue for the failing Object.observe tests. Is it
OK if I assign the issue to one of you guys?

Description:
Correctly check for AllowHeapAllocation::IsAllowed().

[email protected]

Please review this at https://codereview.chromium.org/24302009/

SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge

Affected files (+8, -5 lines):
  M src/heap-inl.h
  M src/heap.cc
  M test/cctest/cctest.status


Index: src/heap-inl.h
diff --git a/src/heap-inl.h b/src/heap-inl.h
index e99ebd8caf1167115c3f6f970dc80cdbfa60fc2d..a0762a330658a864d75ffb4d2fd540439a0cc7d6 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 ||
Index: src/heap.cc
diff --git a/src/heap.cc b/src/heap.cc
index 3c24f495b20d276c1cc0052b07f9a20ef0a59fca..38a5dee04d104768e8c6ec26cb65287497884029 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.
Index: test/cctest/cctest.status
diff --git a/test/cctest/cctest.status b/test/cctest/cctest.status
index 85661098b2a285d35a1776ea2e1e6330c24f5c84..8adbd7029370095733ad2249ee26e9966f8c2712 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

+# TODO(rafaelw,adamk): 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


--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to