mirror of https://github.com/nodejs/node.git
deps: V8: cherry-pick 9868b2aefa1a
Original commit message:
Fix SmartOS compilation errors
This commit resolves compilation errors on SmartOS that
were found while upgrading Node.js.
See: https://github.com/nodejs/node/pull/32831
Change-Id: Ia2a2e028ba4f5bfd69c050cab4fb4e13af5eefd9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2191054
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67793}
Refs: 9868b2aefa
PR-URL: https://github.com/nodejs/node/pull/33579
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Shelley Vohr <codebytere@gmail.com>
pull/34338/head
parent
edaa56bb60
commit
32eb50aeec
|
@ -36,7 +36,7 @@
|
|||
|
||||
# Reset this number to 0 on major V8 upgrades.
|
||||
# Increment by one for each non-official patch applied to deps/v8.
|
||||
'v8_embedder_string': '-node.7',
|
||||
'v8_embedder_string': '-node.8',
|
||||
|
||||
##### V8 defaults for Node.js #####
|
||||
|
||||
|
|
|
@ -970,7 +970,8 @@ void Thread::SetThreadLocal(LocalStorageKey key, void* value) {
|
|||
// pthread_getattr_np used below is non portable (hence the _np suffix). We
|
||||
// keep this version in POSIX as most Linux-compatible derivatives will
|
||||
// support it. MacOS and FreeBSD are different here.
|
||||
#if !defined(V8_OS_FREEBSD) && !defined(V8_OS_MACOSX) && !defined(_AIX)
|
||||
#if !defined(V8_OS_FREEBSD) && !defined(V8_OS_MACOSX) && !defined(_AIX) && \
|
||||
!defined(V8_OS_SOLARIS)
|
||||
|
||||
// static
|
||||
void* Stack::GetStackStart() {
|
||||
|
@ -996,7 +997,8 @@ void* Stack::GetStackStart() {
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
#endif // !defined(V8_OS_FREEBSD) && !defined(V8_OS_MACOSX) && !defined(_AIX)
|
||||
#endif // !defined(V8_OS_FREEBSD) && !defined(V8_OS_MACOSX) &&
|
||||
// !defined(_AIX) && !defined(V8_OS_SOLARIS)
|
||||
|
||||
// static
|
||||
void* Stack::GetCurrentStackPosition() { return __builtin_frame_address(0); }
|
||||
|
|
|
@ -65,5 +65,23 @@ void OS::SignalCodeMovingGC() {}
|
|||
|
||||
void OS::AdjustSchedulingParams() {}
|
||||
|
||||
// static
|
||||
void* Stack::GetStackStart() {
|
||||
pthread_attr_t attr;
|
||||
int error;
|
||||
pthread_attr_init(&attr);
|
||||
error = pthread_attr_get_np(pthread_self(), &attr);
|
||||
if (!error) {
|
||||
void* base;
|
||||
size_t size;
|
||||
error = pthread_attr_getstack(&attr, &base, &size);
|
||||
CHECK(!error);
|
||||
pthread_attr_destroy(&attr);
|
||||
return reinterpret_cast<uint8_t*>(base) + size;
|
||||
}
|
||||
pthread_attr_destroy(&attr);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
} // namespace base
|
||||
} // namespace v8
|
||||
|
|
Loading…
Reference in New Issue