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

Unified Diff: test/cctest/cctest.cc

Issue 1069883002: WIP SharedArrayBuffer implementation (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
« src/objects.h ('K') | « src/v8.cc ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/cctest.cc
diff --git a/test/cctest/cctest.cc b/test/cctest/cctest.cc
index 08fb01bc291860c01071bafd35f11b00ae01afd5..b8c77fcb8d1c4deba40a11caf02a10a0b982006b 100644
--- a/test/cctest/cctest.cc
+++ b/test/cctest/cctest.cc
@@ -141,6 +141,14 @@ class CcTestArrayBufferAllocator : public v8::ArrayBuffer::Allocator {
};
+class CcTestSharedArrayBufferAllocator
+ : public v8::SharedArrayBuffer::Allocator {
+ virtual void* Allocate(size_t length) { return malloc(length); }
+ virtual void* AllocateUninitialized(size_t length) { return malloc(length); }
+ virtual void Free(void* data, size_t length) { free(data); }
+};
+
+
static void SuggestTestHarness(int tests) {
if (tests == 0) return;
printf("Running multiple tests in sequence is deprecated and may cause "
@@ -177,6 +185,9 @@ int main(int argc, char* argv[]) {
CcTestArrayBufferAllocator array_buffer_allocator;
v8::V8::SetArrayBufferAllocator(&array_buffer_allocator);
+ CcTestSharedArrayBufferAllocator shared_array_buffer_allocator;
+ v8::V8::SetSharedArrayBufferAllocator(&shared_array_buffer_allocator);
+
i::PrintExtension print_extension;
v8::RegisterExtension(&print_extension);
i::ProfilerExtension profiler_extension;
« src/objects.h ('K') | « src/v8.cc ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698