Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(906)

Unified Diff: src/extensions/free-buffer-extension.cc

Issue 1116633002: Pass ArrayBuffer::Allocator via Isolate::CreateParams (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/d8.cc ('k') | src/isolate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/extensions/free-buffer-extension.cc
diff --git a/src/extensions/free-buffer-extension.cc b/src/extensions/free-buffer-extension.cc
index e8c7732b66f08f8fb8e3796477fc3e02e03ac9c3..c880d75d0b32733a84c4b031c07bed876357621a 100644
--- a/src/extensions/free-buffer-extension.cc
+++ b/src/extensions/free-buffer-extension.cc
@@ -22,7 +22,9 @@ void FreeBufferExtension::FreeBuffer(
const v8::FunctionCallbackInfo<v8::Value>& args) {
v8::Handle<v8::ArrayBuffer> arrayBuffer = args[0].As<v8::ArrayBuffer>();
v8::ArrayBuffer::Contents contents = arrayBuffer->Externalize();
- V8::ArrayBufferAllocator()->Free(contents.Data(), contents.ByteLength());
+ Isolate* isolate = reinterpret_cast<Isolate*>(args.GetIsolate());
+ isolate->array_buffer_allocator()->Free(contents.Data(),
+ contents.ByteLength());
}
} } // namespace v8::internal
« no previous file with comments | « src/d8.cc ('k') | src/isolate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698