Skip to content

Commit

Permalink
fix incorrect types of pointers (#465)
Browse files Browse the repository at this point in the history
* cast handle back to uv_async_t before deleting

* change unique_ptr type to const char[]
  • Loading branch information
ferjakub committed May 20, 2024
1 parent 3f13eca commit d00be92
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/isolate/scheduler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ UvScheduler::UvScheduler(IsolateEnvironment& env) :

UvScheduler::~UvScheduler() {
uv_close(reinterpret_cast<uv_handle_t*>(uv_async), [](uv_handle_t* handle) {
delete handle;
delete reinterpret_cast<uv_async_t*>(handle);
});
}

Expand Down
2 changes: 1 addition & 1 deletion src/module/isolate_handle.cc
Original file line number Diff line number Diff line change
Expand Up @@ -523,7 +523,7 @@ auto IsolateHandle::CreateSnapshot(ArrayRange script_handles, MaybeLocal<String>

// Create the snapshot
StartupData snapshot {};
unique_ptr<const char> snapshot_data_ptr;
unique_ptr<const char[]> snapshot_data_ptr;
shared_ptr<ExternalCopy> error;
{
Isolate* isolate;
Expand Down

0 comments on commit d00be92

Please sign in to comment.