summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAnatoli Papirovski <apapirovski@mac.com>2018-05-13 19:33:22 +0200
committerAnatoli Papirovski <apapirovski@mac.com>2018-06-24 21:35:11 -0700
commitbfcf5b01bb4112b833a936a8266879b58ed391db (patch)
tree9f49f205ce9bf0d2a9a6e1eaa79ab45f3c4ee135 /src
parent2930bd1317d15d12738a4896c0a6c05700411b47 (diff)
downloadandroid-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.cc5
-rw-r--r--src/env-inl.h8
-rw-r--r--src/env.h3
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(
diff --git a/src/env.h b/src/env.h
index 8f4c5ea1a6..3d047166b2 100644
--- a/src/env.h
+++ b/src/env.h
@@ -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
};