diff options
author | Myles Borins <mylesborins@google.com> | 2019-09-24 11:56:38 -0400 |
---|---|---|
committer | Myles Borins <myles.borins@gmail.com> | 2019-10-07 03:19:23 -0400 |
commit | f7f6c928c1c9c136b7926f892b8a2fda11d8b4b2 (patch) | |
tree | f5edbccb3ffda2573d70a6e291e7157f290e0ae0 /deps/v8/src/execution/thread-local-top.h | |
parent | ffd22e81983056d09c064c59343a0e488236272d (diff) | |
download | android-node-v8-f7f6c928c1c9c136b7926f892b8a2fda11d8b4b2.tar.gz android-node-v8-f7f6c928c1c9c136b7926f892b8a2fda11d8b4b2.tar.bz2 android-node-v8-f7f6c928c1c9c136b7926f892b8a2fda11d8b4b2.zip |
deps: update V8 to 7.8.279.9
PR-URL: https://github.com/nodejs/node/pull/29694
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com>
Diffstat (limited to 'deps/v8/src/execution/thread-local-top.h')
-rw-r--r-- | deps/v8/src/execution/thread-local-top.h | 30 |
1 files changed, 29 insertions, 1 deletions
diff --git a/deps/v8/src/execution/thread-local-top.h b/deps/v8/src/execution/thread-local-top.h index 625fcc41dd..57166299c5 100644 --- a/deps/v8/src/execution/thread-local-top.h +++ b/deps/v8/src/execution/thread-local-top.h @@ -8,6 +8,7 @@ #include "src/common/globals.h" #include "src/execution/thread-id.h" #include "src/objects/contexts.h" +#include "src/utils/utils.h" namespace v8 { @@ -25,7 +26,7 @@ class ThreadLocalTop { // TODO(all): This is not particularly beautiful. We should probably // refactor this to really consist of just Addresses and 32-bit // integer fields. - static constexpr uint32_t kSizeInBytes = 23 * kSystemPointerSize; + static constexpr uint32_t kSizeInBytes = 24 * kSystemPointerSize; // Does early low-level initialization that does not depend on the // isolate being present. @@ -56,6 +57,31 @@ class ThreadLocalTop { v8::TryCatch::JSStackComparableAddress(try_catch_handler_)); } + // Call depth represents nested v8 api calls. Instead of storing the nesting + // level as an integer, we store the stack height of the last API entry. This + // additional information is used when we decide whether to trigger a debug + // break at a function entry. + template <typename Scope> + void IncrementCallDepth(Scope* stack_allocated_scope) { + stack_allocated_scope->previous_stack_height_ = last_api_entry_; +#if defined(USE_SIMULATOR) || defined(V8_USE_ADDRESS_SANITIZER) + StoreCurrentStackPosition(); +#else + last_api_entry_ = reinterpret_cast<i::Address>(stack_allocated_scope); +#endif + } + +#if defined(USE_SIMULATOR) || defined(V8_USE_ADDRESS_SANITIZER) + void StoreCurrentStackPosition(); +#endif + + template <typename Scope> + void DecrementCallDepth(Scope* stack_allocated_scope) { + last_api_entry_ = stack_allocated_scope->previous_stack_height_; + } + + bool CallDepthIsZero() const { return last_api_entry_ == kNullAddress; } + void Free(); Isolate* isolate_ = nullptr; @@ -77,6 +103,8 @@ class ThreadLocalTop { Address pending_handler_fp_ = kNullAddress; Address pending_handler_sp_ = kNullAddress; + Address last_api_entry_ = kNullAddress; + // Communication channel between Isolate::Throw and message consumers. Object pending_message_obj_; bool rethrowing_message_ = false; |