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

Unified Diff: src/platform-win32.cc

Issue 21173004: Version 3.20.11.1 (Closed) Base URL: https://v8.googlecode.com/svn/trunk
Patch Set: Created 7 years, 5 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 | « src/objects-printer.cc ('k') | src/profile-generator.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/platform-win32.cc
diff --git a/src/platform-win32.cc b/src/platform-win32.cc
index 292c24a3dace86c6500acbd6634536d0dea7ddb6..80bcaf92afdde9355cf2cbb554e375fd623b2a7d 100644
--- a/src/platform-win32.cc
+++ b/src/platform-win32.cc
@@ -892,7 +892,7 @@ size_t OS::AllocateAlignment() {
}
-void* OS::GetRandomMmapAddr() {
+static void* GetRandomAddr() {
Isolate* isolate = Isolate::UncheckedCurrent();
// Note that the current isolate isn't set up in a call path via
// CpuFeatures::Probe. We don't care about randomization in this case because
@@ -925,7 +925,7 @@ static void* RandomizedVirtualAlloc(size_t size, int action, int protection) {
if (protection == PAGE_EXECUTE_READWRITE || protection == PAGE_NOACCESS) {
// For exectutable pages try and randomize the allocation address
for (size_t attempts = 0; base == NULL && attempts < 3; ++attempts) {
- base = VirtualAlloc(OS::GetRandomMmapAddr(), size, action, protection);
+ base = VirtualAlloc(GetRandomAddr(), size, action, protection);
}
}
« no previous file with comments | « src/objects-printer.cc ('k') | src/profile-generator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698