Index: src/compiler.cc |
diff --git a/src/compiler.cc b/src/compiler.cc |
index 997103f18f83c40c314f4cc8fc0abdd7873c8662..2a0eda0a551229eface54be75d02400b6c0be6ff 100644 |
--- a/src/compiler.cc |
+++ b/src/compiler.cc |
@@ -284,14 +284,9 @@ |
Handle<Code> code) { |
Handle<WeakCell> cell = Code::WeakCellFor(code); |
Heap* heap = isolate->heap(); |
- if (heap->InNewSpace(*object)) { |
- heap->AddWeakNewSpaceObjectToCodeDependency(object, cell); |
- } else { |
- Handle<DependentCode> dep(heap->LookupWeakObjectToCodeDependency(object)); |
- dep = |
- DependentCode::InsertWeakCode(dep, DependentCode::kWeakCodeGroup, cell); |
- heap->AddWeakObjectToCodeDependency(object, dep); |
- } |
+ Handle<DependentCode> dep(heap->LookupWeakObjectToCodeDependency(object)); |
+ dep = DependentCode::InsertWeakCode(dep, DependentCode::kWeakCodeGroup, cell); |
+ heap->AddWeakObjectToCodeDependency(object, dep); |
} |
} // namespace |