Skip to content

Commit

Permalink
Fix crash on async-rentry.js test
Browse files Browse the repository at this point in the history
  • Loading branch information
orgads committed Jan 16, 2024
1 parent b44f7d0 commit 1d4ce9a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/external_copy/string.cc
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@ class ExternalStringOneByte final : public v8::String::ExternalOneByteStringReso
ExternalStringOneByte(const ExternalStringOneByte&) = delete;

~ExternalStringOneByte() final {
IsolateEnvironment::GetCurrent()->AdjustExtraAllocatedMemory(-static_cast<int>(this->value->size()));
if (IsolateEnvironment *env = IsolateEnvironment::GetCurrent()) {
env->AdjustExtraAllocatedMemory(-static_cast<int>(this->value->size()));
}
}

auto operator= (const ExternalStringOneByte&) = delete;
Expand Down

0 comments on commit 1d4ce9a

Please sign in to comment.