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

Unified Diff: src/base/platform/platform.h

Issue 1349723005: [base] Fix check that makes sure we commit in the virtual memory range. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/base/platform/platform.h
diff --git a/src/base/platform/platform.h b/src/base/platform/platform.h
index aa30519506d691b8df57969aec2a8bddfe981831..2d08ecbd7f6979ebfd31888ea4c7c3f9acebf8f1 100644
--- a/src/base/platform/platform.h
+++ b/src/base/platform/platform.h
@@ -363,10 +363,10 @@ class VirtualMemory {
private:
bool InVM(void* address, size_t size) {
- return (reinterpret_cast<intptr_t>(address_) <=
- reinterpret_cast<intptr_t>(address)) &&
- (reinterpret_cast<intptr_t>(address_) + size_ >=
- reinterpret_cast<intptr_t>(address) + size);
+ return (reinterpret_cast<uintptr_t>(address_) <=
+ reinterpret_cast<uintptr_t>(address)) &&
+ ((reinterpret_cast<uintptr_t>(address_) + size_) >=
+ (reinterpret_cast<uintptr_t>(address) + size));
}
void* address_; // Start address of the virtual memory.
« 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