You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

64 lines
2.5 KiB

  1. diff --git a/deps/v8/src/heap/incremental-marking.cc b/deps/v8/src/heap/incremental-marking.cc
  2. index 58eb0aa..b2b796f 100644
  3. --- a/deps/v8/src/heap/incremental-marking.cc
  4. +++ b/deps/v8/src/heap/incremental-marking.cc
  5. @@ -364,7 +364,7 @@ void IncrementalMarking::DeactivateIncrementalWriteBarrier() {
  6. DeactivateIncrementalWriteBarrierForSpace(heap_->new_space());
  7. LargePage* lop = heap_->lo_space()->first_page();
  8. - while (lop->is_valid()) {
  9. + while (LargePage::IsValid(lop)) {
  10. SetOldSpacePageFlags(lop, false, false);
  11. lop = lop->next_page();
  12. }
  13. @@ -396,7 +396,7 @@ void IncrementalMarking::ActivateIncrementalWriteBarrier() {
  14. ActivateIncrementalWriteBarrier(heap_->new_space());
  15. LargePage* lop = heap_->lo_space()->first_page();
  16. - while (lop->is_valid()) {
  17. + while (LargePage::IsValid(lop)) {
  18. SetOldSpacePageFlags(lop, true, is_compacting_);
  19. lop = lop->next_page();
  20. }
  21. diff --git a/deps/v8/src/heap/spaces-inl.h b/deps/v8/src/heap/spaces-inl.h
  22. index c2c4d12..d63ee63 100644
  23. --- a/deps/v8/src/heap/spaces-inl.h
  24. +++ b/deps/v8/src/heap/spaces-inl.h
  25. @@ -155,7 +155,7 @@ Page* Page::Initialize(Heap* heap, MemoryChunk* chunk, Executability executable,
  26. bool PagedSpace::Contains(Address addr) {
  27. Page* p = Page::FromAddress(addr);
  28. - if (!p->is_valid()) return false;
  29. + if (!Page::IsValid(p)) return false;
  30. return p->owner() == this;
  31. }
  32. diff --git a/deps/v8/src/heap/spaces.cc b/deps/v8/src/heap/spaces.cc
  33. index 0806b25..c0e109b 100644
  34. --- a/deps/v8/src/heap/spaces.cc
  35. +++ b/deps/v8/src/heap/spaces.cc
  36. @@ -2953,7 +2953,7 @@ LargePage* LargeObjectSpace::FindPage(Address a) {
  37. if (e != NULL) {
  38. DCHECK(e->value != NULL);
  39. LargePage* page = reinterpret_cast<LargePage*>(e->value);
  40. - DCHECK(page->is_valid());
  41. + DCHECK(LargePage::IsValid(page));
  42. if (page->Contains(a)) {
  43. return page;
  44. }
  45. diff --git a/deps/v8/src/heap/spaces.h b/deps/v8/src/heap/spaces.h
  46. index 3461de3..e35c057 100644
  47. --- a/deps/v8/src/heap/spaces.h
  48. +++ b/deps/v8/src/heap/spaces.h
  49. @@ -278,9 +278,9 @@ class MemoryChunk {
  50. // Only works for addresses in pointer spaces, not data or code spaces.
  51. static inline MemoryChunk* FromAnyPointerAddress(Heap* heap, Address addr);
  52. - Address address() { return reinterpret_cast<Address>(this); }
  53. + static bool IsValid(MemoryChunk* chunk) { return chunk != nullptr; }
  54. - bool is_valid() { return address() != NULL; }
  55. + Address address() { return reinterpret_cast<Address>(this); }
  56. MemoryChunk* next_chunk() const {
  57. return reinterpret_cast<MemoryChunk*>(base::Acquire_Load(&next_chunk_));