Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(109)

Side by Side Diff: src/objects-debug.cc

Issue 905473003: Fix Code::VerifyEmbeddedObjects. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698