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

Unified Diff: samples/process.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 | « include/v8.h ('k') | samples/shell.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samples/process.cc
diff --git a/samples/process.cc b/samples/process.cc
index 5f74b44e0e27a455015282c0a26c25b89bf16100..8d1cebeab52c5f8e5180fec030c113f1578d87c9 100644
--- a/samples/process.cc
+++ b/samples/process.cc
@@ -662,8 +662,6 @@ int main(int argc, char* argv[]) {
v8::V8::InitializeICU();
v8::Platform* platform = v8::platform::CreateDefaultPlatform();
v8::V8::InitializePlatform(platform);
- ArrayBufferAllocator array_buffer_allocator;
- v8::V8::SetArrayBufferAllocator(&array_buffer_allocator);
v8::V8::Initialize();
map<string, string> options;
string file;
@@ -672,7 +670,10 @@ int main(int argc, char* argv[]) {
fprintf(stderr, "No script was specified.\n");
return 1;
}
- Isolate* isolate = Isolate::New();
+ ArrayBufferAllocator array_buffer_allocator;
+ Isolate::CreateParams create_params;
+ create_params.array_buffer_allocator = &array_buffer_allocator;
+ Isolate* isolate = Isolate::New(create_params);
Isolate::Scope isolate_scope(isolate);
HandleScope scope(isolate);
Handle<String> source = ReadFile(isolate, file);
« no previous file with comments | « include/v8.h ('k') | samples/shell.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698