OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #include "src/disasm.h" | 7 #include "src/disasm.h" |
8 #include "src/disassembler.h" | 8 #include "src/disassembler.h" |
9 #include "src/heap/objects-visiting.h" | 9 #include "src/heap/objects-visiting.h" |
10 #include "src/jsregexp.h" | 10 #include "src/jsregexp.h" |
(...skipping 1252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1263 } | 1263 } |
1264 | 1264 |
1265 | 1265 |
1266 void Code::VerifyEmbeddedObjects(VerifyMode mode) { | 1266 void Code::VerifyEmbeddedObjects(VerifyMode mode) { |
1267 if (kind() == OPTIMIZED_FUNCTION) return; | 1267 if (kind() == OPTIMIZED_FUNCTION) return; |
1268 Heap* heap = GetIsolate()->heap(); | 1268 Heap* heap = GetIsolate()->heap(); |
1269 int mask = RelocInfo::ModeMask(RelocInfo::EMBEDDED_OBJECT) | | 1269 int mask = RelocInfo::ModeMask(RelocInfo::EMBEDDED_OBJECT) | |
1270 RelocInfo::ModeMask(RelocInfo::CELL); | 1270 RelocInfo::ModeMask(RelocInfo::CELL); |
1271 bool skip_weak_cell = (mode == kNoContextSpecificPointers) ? false : true; | 1271 bool skip_weak_cell = (mode == kNoContextSpecificPointers) ? false : true; |
1272 for (RelocIterator it(this, mask); !it.done(); it.next()) { | 1272 for (RelocIterator it(this, mask); !it.done(); it.next()) { |
1273 CHECK(!CanLeak(it.rinfo()->target_object(), heap, skip_weak_cell)); | 1273 Object* target = it.rinfo()->rmode() == RelocInfo::CELL |
| 1274 ? it.rinfo()->target_cell() |
| 1275 : it.rinfo()->target_object(); |
| 1276 CHECK(!CanLeak(target, heap, skip_weak_cell)); |
1274 } | 1277 } |
1275 } | 1278 } |
1276 | 1279 |
1277 | 1280 |
1278 #endif // DEBUG | 1281 #endif // DEBUG |
1279 | 1282 |
1280 } } // namespace v8::internal | 1283 } } // namespace v8::internal |
OLD | NEW |