Commit 2d3d66ab authored by hpayer's avatar hpayer Committed by Commit bot

[heap] Use safe way to obtain page in PagedSpace::Contains(Address addr).

Review-Url: https://codereview.chromium.org/2531873003
Cr-Commit-Position: refs/heads/master@{#41290}
parent ecea1d19
......@@ -249,9 +249,7 @@ void MemoryChunk::IncrementLiveBytes(int by) {
}
bool PagedSpace::Contains(Address addr) {
Page* p = Page::FromAddress(addr);
if (!Page::IsValid(p)) return false;
return p->owner() == this;
return MemoryChunk::FromAnyPointerAddress(heap(), addr)->owner() == this;
}
bool PagedSpace::Contains(Object* o) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment