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

Unified Diff: src/platform-openbsd.cc

Issue 328993003: Drop dependency on Isolate* from platform.h (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: updates Created 6 years, 6 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/platform-macos.cc ('k') | src/platform-qnx.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/platform-openbsd.cc
diff --git a/src/platform-openbsd.cc b/src/platform-openbsd.cc
index c0b5aae6d4539aab02ff8e42eab6f41c8da7e521..1f8e239cd534474591095d006156874dc9656c74 100644
--- a/src/platform-openbsd.cc
+++ b/src/platform-openbsd.cc
@@ -113,12 +113,13 @@ PosixMemoryMappedFile::~PosixMemoryMappedFile() {
}
-void OS::LogSharedLibraryAddresses(Isolate* isolate) {
+std::vector<OS::SharedLibraryAddress> OS::GetSharedLibraryAddresses() {
+ std::vector<SharedLibraryAddress> result;
// This function assumes that the layout of the file is as follows:
// hex_start_addr-hex_end_addr rwxp <unused data> [binary_file_name]
// If we encounter an unexpected situation we abort scanning further entries.
FILE* fp = fopen("/proc/self/maps", "r");
- if (fp == NULL) return;
+ if (fp == NULL) return result;
// Allocate enough room to be able to store a full file name.
const int kLibNameLen = FILENAME_MAX + 1;
@@ -157,7 +158,7 @@ void OS::LogSharedLibraryAddresses(Isolate* isolate) {
snprintf(lib_name, kLibNameLen,
"%08" V8PRIxPTR "-%08" V8PRIxPTR, start, end);
}
- LOG(isolate, SharedLibraryEvent(lib_name, start, end));
+ result.push_back(SharedLibraryAddress(lib_name, start, end));
} else {
// Entry not describing executable data. Skip to end of line to set up
// reading the next entry.
@@ -169,6 +170,7 @@ void OS::LogSharedLibraryAddresses(Isolate* isolate) {
}
free(lib_name);
fclose(fp);
+ return result;
}
« no previous file with comments | « src/platform-macos.cc ('k') | src/platform-qnx.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698