Skip to content

Commit

Permalink
tools: fix mkcodecache when run with ASAN
Browse files Browse the repository at this point in the history
Fixes: #32835

PR-URL: #32850
Backport-PR-URL: #33128
Reviewed-By: Matheus Marchini <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Juan José Arboleda <[email protected]>
Reviewed-By: Jiawen Geng <[email protected]>
  • Loading branch information
addaleax authored and targos committed May 2, 2020
1 parent cbadd11 commit d072f08
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tools/code_cache/mkcodecache.cc
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,9 @@ int main(int argc, char* argv[]) {

// Create a new Isolate and make it the current one.
Isolate::CreateParams create_params;
create_params.array_buffer_allocator =
ArrayBuffer::Allocator::NewDefaultAllocator();
std::unique_ptr<ArrayBuffer::Allocator> array_buffer_allocator {
ArrayBuffer::Allocator::NewDefaultAllocator() };
create_params.array_buffer_allocator = array_buffer_allocator.get();
Isolate* isolate = Isolate::New(create_params);
{
Isolate::Scope isolate_scope(isolate);
Expand All @@ -65,6 +66,7 @@ int main(int argc, char* argv[]) {
out << cache;
out.close();
}
isolate->Dispose();

v8::V8::ShutdownPlatform();
return 0;
Expand Down

0 comments on commit d072f08

Please sign in to comment.