diff options
author | Anna Henningsen <anna@addaleax.net> | 2018-08-02 01:07:57 +0200 |
---|---|---|
committer | James M Snell <jasnell@gmail.com> | 2018-08-12 10:03:43 -0700 |
commit | 45d0b4a300cbc845727fee75c59427cc343b1559 (patch) | |
tree | 786149e23904e6b4d41bce9e4d787642eec51260 /src/env.h | |
parent | 801c490033d5a16c0995bb131398689407a74231 (diff) | |
download | android-node-v8-45d0b4a300cbc845727fee75c59427cc343b1559.tar.gz android-node-v8-45d0b4a300cbc845727fee75c59427cc343b1559.tar.bz2 android-node-v8-45d0b4a300cbc845727fee75c59427cc343b1559.zip |
src: yield empty maybes for failed AsyncWrap::MakeCallback calls
Use an empty `MaybeLocal<Value>` as the return value for
`AsyncWrap::MakeCallback()` if an exception occurred,
regardless of `MakeCallback` depth.
Unfortunately, the public API can not make this switch without
a breaking change (and possibly some kind of deprecation/renaming).
PR-URL: https://github.com/nodejs/node/pull/22078
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jon Moss <me@jonathanmoss.me>
Diffstat (limited to 'src/env.h')
-rw-r--r-- | src/env.h | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -499,7 +499,6 @@ class Environment { AsyncCallbackScope() = delete; explicit AsyncCallbackScope(Environment* env); ~AsyncCallbackScope(); - inline bool in_makecallback() const; private: Environment* env_; @@ -507,6 +506,8 @@ class Environment { DISALLOW_COPY_AND_ASSIGN(AsyncCallbackScope); }; + inline size_t makecallback_depth() const; + class ImmediateInfo { public: inline AliasedBuffer<uint32_t, v8::Uint32Array>& fields(); |