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

Side by Side Diff: test/mkgrokdump/mkgrokdump.cc

Issue 2895923002: Fix compilation failure due to overload of virtual function (Closed)
Patch Set: Add Reserver and SetProtection in test array buffer allocators Created 3 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 | « src/d8.cc ('k') | test/unittests/value-serializer-unittest.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 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <stdio.h> 5 #include <stdio.h>
6 6
7 #include "include/libplatform/libplatform.h" 7 #include "include/libplatform/libplatform.h"
8 #include "include/v8.h" 8 #include "include/v8.h"
9 9
10 #include "src/frames.h" 10 #include "src/frames.h"
(...skipping 19 matching lines...) Expand all
30 #if defined(V8_USE_SNAPSHOT) && !defined(DEBUG) 30 #if defined(V8_USE_SNAPSHOT) && !defined(DEBUG)
31 static const char* kBuild = "shipping"; 31 static const char* kBuild = "shipping";
32 #else 32 #else
33 static const char* kBuild = "non-shipping"; 33 static const char* kBuild = "non-shipping";
34 #endif 34 #endif
35 35
36 class MockArrayBufferAllocator : public v8::ArrayBuffer::Allocator { 36 class MockArrayBufferAllocator : public v8::ArrayBuffer::Allocator {
37 public: 37 public:
38 void* Allocate(size_t length) override { return nullptr; } 38 void* Allocate(size_t length) override { return nullptr; }
39 void* AllocateUninitialized(size_t length) override { return nullptr; } 39 void* AllocateUninitialized(size_t length) override { return nullptr; }
40 void* Reserve(size_t length) override { return nullptr; }
41 void Free(void* data, size_t length, AllocationMode mode) override {}
40 void Free(void* p, size_t) override {} 42 void Free(void* p, size_t) override {}
43 void SetProtection(void* data, size_t length,
44 Protection protection) override {}
41 }; 45 };
42 46
43 static int DumpHeapConstants(const char* argv0) { 47 static int DumpHeapConstants(const char* argv0) {
44 // Start up V8. 48 // Start up V8.
45 v8::Platform* platform = v8::platform::CreateDefaultPlatform(); 49 v8::Platform* platform = v8::platform::CreateDefaultPlatform();
46 v8::V8::InitializePlatform(platform); 50 v8::V8::InitializePlatform(platform);
47 v8::V8::Initialize(); 51 v8::V8::Initialize();
48 v8::V8::InitializeExternalStartupData(argv0); 52 v8::V8::InitializeExternalStartupData(argv0);
49 Isolate::CreateParams create_params; 53 Isolate::CreateParams create_params;
50 MockArrayBufferAllocator mock_arraybuffer_allocator; 54 MockArrayBufferAllocator mock_arraybuffer_allocator;
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 // Teardown. 128 // Teardown.
125 isolate->Dispose(); 129 isolate->Dispose();
126 v8::V8::ShutdownPlatform(); 130 v8::V8::ShutdownPlatform();
127 delete platform; 131 delete platform;
128 return 0; 132 return 0;
129 } 133 }
130 134
131 } // namespace v8 135 } // namespace v8
132 136
133 int main(int argc, char* argv[]) { return v8::DumpHeapConstants(argv[0]); } 137 int main(int argc, char* argv[]) { return v8::DumpHeapConstants(argv[0]); }
OLDNEW
« no previous file with comments | « src/d8.cc ('k') | test/unittests/value-serializer-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698