src: use non-deprecated versions of `->To*()` utils
Squashed from multiple commits: - src: replace ->To*(isolate) with ->To*(context).ToLocalChecked() - test: use .As<Object> on Exception::Error > Exception::Error always returns an object, so e.As<Object>() should also work fine See https://github.com/nodejs/node/pull/17343#discussion_r153232027 - test: use .As<Object> instead of ->ToObject we already checked that its a buffer - src: use FromMaybe instead of ToLocalChecked It fixed this test case: 19a1b2e414 - src: pass context to Get() Dont pass Local<Context> is deprecated soon. So we migrate to maybe version. - src: return if Get or ToObject return an empty before call ToLocalChecked Refs: https://github.com/nodejs/node/issues/17244 PR-URL: https://github.com/nodejs/node/pull/17343 Reviewed-By:Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By:
Michaël Zasso <targos@protonmail.com> Reviewed-By:
Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By:
Yuta Hiroto <hello@about-hiroppy.com> Reviewed-By:
Anna Henningsen <anna@addaleax.net> Reviewed-By:
Daijiro Wachi <daijiro.wachi@gmail.com>
parent
e9e9863c
Please register or sign in to comment