Skip to content

Commit bfcf5b0

Browse files
committed
src: remove tick_info->has_thrown
This is no longer necessary in the only place it was used (timers). PR-URL: #20894 Fixes: #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>
1 parent 2930bd1 commit bfcf5b0

File tree

3 files changed

+0
-16
lines changed

3 files changed

+0
-16
lines changed

src/callback_scope.cc

-5
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,6 @@ InternalCallbackScope::InternalCallbackScope(Environment* env,
5959
AsyncWrap::EmitBefore(env, asyncContext.async_id);
6060
}
6161

62-
if (!IsInnerMakeCallback()) {
63-
env->tick_info()->set_has_thrown(false);
64-
}
65-
6662
env->async_hooks()->push_async_ids(async_context_.async_id,
6763
async_context_.trigger_async_id);
6864
pushed_ids_ = true;
@@ -118,7 +114,6 @@ void InternalCallbackScope::Close() {
118114
if (!env_->can_call_into_js()) return;
119115

120116
if (env_->tick_callback_function()->Call(process, 0, nullptr).IsEmpty()) {
121-
env_->tick_info()->set_has_thrown(true);
122117
failed_ = true;
123118
}
124119
}

src/env-inl.h

-8
Original file line numberDiff line numberDiff line change
@@ -269,10 +269,6 @@ inline bool Environment::TickInfo::has_scheduled() const {
269269
return fields_[kHasScheduled] == 1;
270270
}
271271

272-
inline bool Environment::TickInfo::has_thrown() const {
273-
return fields_[kHasThrown] == 1;
274-
}
275-
276272
inline bool Environment::TickInfo::has_promise_rejections() const {
277273
return fields_[kHasPromiseRejections] == 1;
278274
}
@@ -281,10 +277,6 @@ inline void Environment::TickInfo::promise_rejections_toggle_on() {
281277
fields_[kHasPromiseRejections] = 1;
282278
}
283279

284-
inline void Environment::TickInfo::set_has_thrown(bool state) {
285-
fields_[kHasThrown] = state ? 1 : 0;
286-
}
287-
288280
inline void Environment::AssignToContext(v8::Local<v8::Context> context,
289281
const ContextInfo& info) {
290282
context->SetAlignedPointerInEmbedderData(

src/env.h

-3
Original file line numberDiff line numberDiff line change
@@ -551,10 +551,8 @@ class Environment {
551551
inline AliasedBuffer<uint8_t, v8::Uint8Array>& fields();
552552
inline bool has_scheduled() const;
553553
inline bool has_promise_rejections() const;
554-
inline bool has_thrown() const;
555554

556555
inline void promise_rejections_toggle_on();
557-
inline void set_has_thrown(bool state);
558556

559557
private:
560558
friend class Environment; // So we can call the constructor.
@@ -563,7 +561,6 @@ class Environment {
563561
enum Fields {
564562
kHasScheduled,
565563
kHasPromiseRejections,
566-
kHasThrown,
567564
kFieldsCount
568565
};
569566

0 commit comments

Comments
 (0)