OLD | NEW |
1 // Copyright 2016 the V8 project authors. All rights reserved. | 1 // Copyright 2016 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 #ifndef TEST_FUZZER_FUZZER_SUPPORT_H_ | 5 #ifndef TEST_FUZZER_FUZZER_SUPPORT_H_ |
6 #define TEST_FUZZER_FUZZER_SUPPORT_H_ | 6 #define TEST_FUZZER_FUZZER_SUPPORT_H_ |
7 | 7 |
8 #include "include/v8.h" | 8 #include "include/v8.h" |
9 | 9 |
10 namespace v8_fuzzer { | 10 namespace v8_fuzzer { |
11 | 11 |
12 class FuzzerSupport { | 12 class FuzzerSupport { |
13 public: | 13 public: |
14 FuzzerSupport(int* argc, char*** argv); | 14 FuzzerSupport(int* argc, char*** argv); |
15 ~FuzzerSupport(); | 15 ~FuzzerSupport(); |
16 | 16 |
17 static FuzzerSupport* Get(); | 17 static FuzzerSupport* Get(); |
18 | 18 |
19 v8::Isolate* GetIsolate(); | 19 v8::Isolate* GetIsolate(); |
20 v8::Local<v8::Context> GetContext(); | 20 v8::Local<v8::Context> GetContext(); |
21 | 21 |
22 private: | 22 private: |
23 // Prevent copying. Not implemented. | 23 // Prevent copying. Not implemented. |
24 FuzzerSupport(const FuzzerSupport&); | 24 FuzzerSupport(const FuzzerSupport&); |
25 FuzzerSupport& operator=(const FuzzerSupport&); | 25 FuzzerSupport& operator=(const FuzzerSupport&); |
26 | 26 |
27 class ArrayBufferAllocator; | |
28 | 27 |
29 v8::Platform* platform_; | 28 v8::Platform* platform_; |
30 ArrayBufferAllocator* allocator_; | 29 v8::ArrayBuffer::Allocator* allocator_; |
31 v8::Isolate* isolate_; | 30 v8::Isolate* isolate_; |
32 v8::Global<v8::Context> context_; | 31 v8::Global<v8::Context> context_; |
33 }; | 32 }; |
34 | 33 |
35 } // namespace | 34 } // namespace |
36 | 35 |
37 #endif // TEST_FUZZER_FUZZER_SUPPORT_H_ | 36 #endif // TEST_FUZZER_FUZZER_SUPPORT_H_ |
OLD | NEW |