mirror of
https://github.com/zebrajr/node.git
synced 2026-01-15 12:15:26 +00:00
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>
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user