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

Side by Side Diff: test/cctest/test-microtask-delivery.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, 7 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 unified diff | Download patch
« no previous file with comments | « test/cctest/test-mark-compact.cc ('k') | test/cctest/test-random-number-generator.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 18 matching lines...) Expand all
29 29
30 #include "test/cctest/cctest.h" 30 #include "test/cctest/cctest.h"
31 31
32 using namespace v8; 32 using namespace v8;
33 namespace i = v8::internal; 33 namespace i = v8::internal;
34 34
35 namespace { 35 namespace {
36 class HarmonyIsolate { 36 class HarmonyIsolate {
37 public: 37 public:
38 HarmonyIsolate() { 38 HarmonyIsolate() {
39 isolate_ = Isolate::New(); 39 v8::Isolate::CreateParams create_params;
40 create_params.array_buffer_allocator = CcTest::array_buffer_allocator();
41 isolate_ = Isolate::New(create_params);
40 isolate_->Enter(); 42 isolate_->Enter();
41 } 43 }
42 44
43 ~HarmonyIsolate() { 45 ~HarmonyIsolate() {
44 isolate_->Exit(); 46 isolate_->Exit();
45 isolate_->Dispose(); 47 isolate_->Dispose();
46 } 48 }
47 49
48 Isolate* GetIsolate() const { return isolate_; } 50 Isolate* GetIsolate() const { return isolate_; }
49 51
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 "foo.id++;"); 128 "foo.id++;");
127 } 129 }
128 { 130 {
129 LocalContext context4(isolate.GetIsolate()); 131 LocalContext context4(isolate.GetIsolate());
130 context4->Global()->Set(String::NewFromUtf8(isolate.GetIsolate(), "obj"), 132 context4->Global()->Set(String::NewFromUtf8(isolate.GetIsolate(), "obj"),
131 obj); 133 obj);
132 isolate.GetIsolate()->RunMicrotasks(); 134 isolate.GetIsolate()->RunMicrotasks();
133 CHECK_EQ(2, CompileRun("obj.calls")->Int32Value()); 135 CHECK_EQ(2, CompileRun("obj.calls")->Int32Value());
134 } 136 }
135 } 137 }
OLDNEW
« no previous file with comments | « test/cctest/test-mark-compact.cc ('k') | test/cctest/test-random-number-generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698