Fix for issue 3071: A zombie AlloctionSite must clear pointer fields.
authormvstanton@chromium.org <mvstanton@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Tue, 7 Jan 2014 14:27:31 +0000 (14:27 +0000)
committermvstanton@chromium.org <mvstanton@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Tue, 7 Jan 2014 14:27:31 +0000 (14:27 +0000)
BUG=v8:3071
R=yangguo@chromium.org
LOG=N

Review URL: https://codereview.chromium.org/125873002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18469 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

src/objects-inl.h

index dbf21d2..d5ffe17 100644 (file)
@@ -1314,11 +1314,8 @@ void AllocationSite::Initialize() {
 
 void AllocationSite::MarkZombie() {
   ASSERT(!IsZombie());
+  Initialize();
   set_pretenure_decision(Smi::FromInt(kZombie));
-  // Clear all non-smi fields
-  set_transition_info(Smi::FromInt(0));
-  set_dependent_code(DependentCode::cast(GetHeap()->empty_fixed_array()),
-                     SKIP_WRITE_BARRIER);
 }