diff options
author | Michaël Zasso <targos@protonmail.com> | 2019-08-01 08:38:30 +0200 |
---|---|---|
committer | Michaël Zasso <targos@protonmail.com> | 2019-08-01 12:53:56 +0200 |
commit | 2dcc3665abf57c3607cebffdeeca062f5894885d (patch) | |
tree | 4f560748132edcfb4c22d6f967a7e80d23d7ea2c /deps/v8/src/base/platform | |
parent | 1ee47d550c6de132f06110aa13eceb7551d643b3 (diff) | |
download | node-new-2dcc3665abf57c3607cebffdeeca062f5894885d.tar.gz |
deps: update V8 to 7.6.303.28
PR-URL: https://github.com/nodejs/node/pull/28016
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Refael Ackermann (רפאל פלחי) <refack@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Diffstat (limited to 'deps/v8/src/base/platform')
-rw-r--r-- | deps/v8/src/base/platform/platform-fuchsia.cc | 7 | ||||
-rw-r--r-- | deps/v8/src/base/platform/platform-linux.cc | 18 | ||||
-rw-r--r-- | deps/v8/src/base/platform/platform-posix.cc | 5 | ||||
-rw-r--r-- | deps/v8/src/base/platform/platform-win32.cc | 5 | ||||
-rw-r--r-- | deps/v8/src/base/platform/platform.h | 1 |
5 files changed, 21 insertions, 15 deletions
diff --git a/deps/v8/src/base/platform/platform-fuchsia.cc b/deps/v8/src/base/platform/platform-fuchsia.cc index 5d878c91a6..11499f572c 100644 --- a/deps/v8/src/base/platform/platform-fuchsia.cc +++ b/deps/v8/src/base/platform/platform-fuchsia.cc @@ -150,7 +150,12 @@ void OS::SignalCodeMovingGC() { int OS::GetUserTime(uint32_t* secs, uint32_t* usecs) { const auto kNanosPerMicrosecond = 1000ULL; const auto kMicrosPerSecond = 1000000ULL; - const zx_time_t nanos_since_thread_started = zx_clock_get(ZX_CLOCK_THREAD); + zx_time_t nanos_since_thread_started; + zx_status_t status = + zx_clock_get_new(ZX_CLOCK_THREAD, &nanos_since_thread_started); + if (status != ZX_OK) { + return -1; + } // First convert to microseconds, rounding up. const uint64_t micros_since_thread_started = diff --git a/deps/v8/src/base/platform/platform-linux.cc b/deps/v8/src/base/platform/platform-linux.cc index 059f393eb6..3c22487058 100644 --- a/deps/v8/src/base/platform/platform-linux.cc +++ b/deps/v8/src/base/platform/platform-linux.cc @@ -106,9 +106,6 @@ std::vector<OS::SharedLibraryAddress> OS::GetSharedLibraryAddresses() { if (fscanf(fp, " %c%c%c%c", &attr_r, &attr_w, &attr_x, &attr_p) != 4) break; if (fscanf(fp, "%" V8PRIxPTR, &offset) != 1) break; - // Adjust {start} based on {offset}. - start -= offset; - int c; if (attr_r == 'r' && attr_w != 'w' && attr_x == 'x') { // Found a read-only executable entry. Skip characters until we reach @@ -135,6 +132,21 @@ std::vector<OS::SharedLibraryAddress> OS::GetSharedLibraryAddresses() { snprintf(lib_name, kLibNameLen, "%08" V8PRIxPTR "-%08" V8PRIxPTR, start, end); } + +#ifdef V8_OS_ANDROID + size_t lib_name_length = strlen(lib_name); + if (lib_name_length < 4 || + strncmp(&lib_name[lib_name_length - 4], ".apk", 4) != 0) { + // Only adjust {start} based on {offset} if the file isn't the APK, + // since we load the library directly from the APK and don't want to + // apply the offset of the .so in the APK as the libraries offset. + start -= offset; + } +#else + // Adjust {start} based on {offset}. + start -= offset; +#endif + result.push_back(SharedLibraryAddress(lib_name, start, end)); } else { // Entry not describing executable data. Skip to end of line to set up diff --git a/deps/v8/src/base/platform/platform-posix.cc b/deps/v8/src/base/platform/platform-posix.cc index 2301c26688..7f4ce192db 100644 --- a/deps/v8/src/base/platform/platform-posix.cc +++ b/deps/v8/src/base/platform/platform-posix.cc @@ -678,11 +678,6 @@ int OS::VSNPrintF(char* str, // POSIX string support. // -char* OS::StrChr(char* str, int c) { - return strchr(str, c); -} - - void OS::StrNCpy(char* dest, int length, const char* src, size_t n) { strncpy(dest, src, n); } diff --git a/deps/v8/src/base/platform/platform-win32.cc b/deps/v8/src/base/platform/platform-win32.cc index 6dc2053fcd..d01b1c07fe 100644 --- a/deps/v8/src/base/platform/platform-win32.cc +++ b/deps/v8/src/base/platform/platform-win32.cc @@ -670,11 +670,6 @@ int OS::VSNPrintF(char* str, int length, const char* format, va_list args) { } -char* OS::StrChr(char* str, int c) { - return const_cast<char*>(strchr(str, c)); -} - - void OS::StrNCpy(char* dest, int length, const char* src, size_t n) { // Use _TRUNCATE or strncpy_s crashes (by design) if buffer is too small. size_t buffer_size = static_cast<size_t>(length); diff --git a/deps/v8/src/base/platform/platform.h b/deps/v8/src/base/platform/platform.h index 78b1bcbaff..e073704b2c 100644 --- a/deps/v8/src/base/platform/platform.h +++ b/deps/v8/src/base/platform/platform.h @@ -207,7 +207,6 @@ class V8_BASE_EXPORT OS { static PRINTF_FORMAT(3, 0) int VSNPrintF(char* str, int length, const char* format, va_list args); - static char* StrChr(char* str, int c); static void StrNCpy(char* dest, int length, const char* src, size_t n); // Support for the profiler. Can do nothing, in which case ticks |