diff options
author | Anatoli Papirovski <apapirovski@mac.com> | 2018-05-13 19:33:22 +0200 |
---|---|---|
committer | Anatoli Papirovski <apapirovski@mac.com> | 2018-06-24 21:35:11 -0700 |
commit | bfcf5b01bb4112b833a936a8266879b58ed391db (patch) | |
tree | 9f49f205ce9bf0d2a9a6e1eaa79ab45f3c4ee135 /src | |
parent | 2930bd1317d15d12738a4896c0a6c05700411b47 (diff) | |
download | android-node-v8-bfcf5b01bb4112b833a936a8266879b58ed391db.tar.gz android-node-v8-bfcf5b01bb4112b833a936a8266879b58ed391db.tar.bz2 android-node-v8-bfcf5b01bb4112b833a936a8266879b58ed391db.zip |
src: remove tick_info->has_thrown
This is no longer necessary in the only place it was used (timers).
PR-URL: https://github.com/nodejs/node/pull/20894
Fixes: https://github.com/nodejs/node/issues/10154
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Diffstat (limited to 'src')
-rw-r--r-- | src/callback_scope.cc | 5 | ||||
-rw-r--r-- | src/env-inl.h | 8 | ||||
-rw-r--r-- | src/env.h | 3 |
3 files changed, 0 insertions, 16 deletions
diff --git a/src/callback_scope.cc b/src/callback_scope.cc index feb7e23b6e..7929fd67d7 100644 --- a/src/callback_scope.cc +++ b/src/callback_scope.cc @@ -59,10 +59,6 @@ InternalCallbackScope::InternalCallbackScope(Environment* env, AsyncWrap::EmitBefore(env, asyncContext.async_id); } - if (!IsInnerMakeCallback()) { - env->tick_info()->set_has_thrown(false); - } - env->async_hooks()->push_async_ids(async_context_.async_id, async_context_.trigger_async_id); pushed_ids_ = true; @@ -118,7 +114,6 @@ void InternalCallbackScope::Close() { if (!env_->can_call_into_js()) return; if (env_->tick_callback_function()->Call(process, 0, nullptr).IsEmpty()) { - env_->tick_info()->set_has_thrown(true); failed_ = true; } } diff --git a/src/env-inl.h b/src/env-inl.h index 40fa5dfa68..8086103b1d 100644 --- a/src/env-inl.h +++ b/src/env-inl.h @@ -269,10 +269,6 @@ inline bool Environment::TickInfo::has_scheduled() const { return fields_[kHasScheduled] == 1; } -inline bool Environment::TickInfo::has_thrown() const { - return fields_[kHasThrown] == 1; -} - inline bool Environment::TickInfo::has_promise_rejections() const { return fields_[kHasPromiseRejections] == 1; } @@ -281,10 +277,6 @@ inline void Environment::TickInfo::promise_rejections_toggle_on() { fields_[kHasPromiseRejections] = 1; } -inline void Environment::TickInfo::set_has_thrown(bool state) { - fields_[kHasThrown] = state ? 1 : 0; -} - inline void Environment::AssignToContext(v8::Local<v8::Context> context, const ContextInfo& info) { context->SetAlignedPointerInEmbedderData( @@ -551,10 +551,8 @@ class Environment { inline AliasedBuffer<uint8_t, v8::Uint8Array>& fields(); inline bool has_scheduled() const; inline bool has_promise_rejections() const; - inline bool has_thrown() const; inline void promise_rejections_toggle_on(); - inline void set_has_thrown(bool state); private: friend class Environment; // So we can call the constructor. @@ -563,7 +561,6 @@ class Environment { enum Fields { kHasScheduled, kHasPromiseRejections, - kHasThrown, kFieldsCount }; |