We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 80912a6 commit ad3dfb3Copy full SHA for ad3dfb3
src/transform-sdk/js/js_vm.cc
@@ -69,11 +69,9 @@ value& value::operator=(const value& other) noexcept {
69
}
70
71
value::~value() noexcept {
72
- // There is a bug with clang tidy where thinks that it's possible for _ctx
73
- // to be uninitialized when destructed inside of std::expected
74
-
75
- // NOLINTNEXTLINE
76
- JS_FreeValue(_ctx, _underlying);
+ if (_ctx != nullptr) {
+ JS_FreeValue(_ctx, _underlying);
+ }
77
78
79
value value::undefined(JSContext* ctx) { return {ctx, JS_UNDEFINED}; }
0 commit comments