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 <mat@mmarchini.me>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
  • Loading branch information
addaleax authored and targos committed May 13, 2020
1 parent 1c010b4 commit 3dafc14
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tools/code_cache/mkcodecache.cc
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 3dafc14

Please sign in to comment.