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 #include <limits.h> | 5 #include <limits.h> |
6 #include <stddef.h> | 6 #include <stddef.h> |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 | 8 |
9 #include "include/v8.h" | 9 #include "include/v8.h" |
| 10 #include "src/objects-inl.h" |
10 #include "src/objects.h" | 11 #include "src/objects.h" |
11 #include "src/parsing/parse-info.h" | 12 #include "src/parsing/parse-info.h" |
12 #include "src/parsing/parsing.h" | 13 #include "src/parsing/parsing.h" |
13 #include "src/parsing/preparser.h" | 14 #include "src/parsing/preparser.h" |
14 #include "test/fuzzer/fuzzer-support.h" | 15 #include "test/fuzzer/fuzzer-support.h" |
15 | 16 |
16 extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { | 17 extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { |
17 v8_fuzzer::FuzzerSupport* support = v8_fuzzer::FuzzerSupport::Get(); | 18 v8_fuzzer::FuzzerSupport* support = v8_fuzzer::FuzzerSupport::Get(); |
18 v8::Isolate* isolate = support->GetIsolate(); | 19 v8::Isolate* isolate = support->GetIsolate(); |
19 | 20 |
(...skipping 14 matching lines...) Expand all Loading... |
34 | 35 |
35 v8::internal::Handle<v8::internal::Script> script = | 36 v8::internal::Handle<v8::internal::Script> script = |
36 factory->NewScript(source.ToHandleChecked()); | 37 factory->NewScript(source.ToHandleChecked()); |
37 v8::internal::Zone zone(i_isolate->allocator(), ZONE_NAME); | 38 v8::internal::Zone zone(i_isolate->allocator(), ZONE_NAME); |
38 v8::internal::ParseInfo info(&zone, script); | 39 v8::internal::ParseInfo info(&zone, script); |
39 v8::internal::parsing::ParseProgram(&info); | 40 v8::internal::parsing::ParseProgram(&info); |
40 isolate->RequestGarbageCollectionForTesting( | 41 isolate->RequestGarbageCollectionForTesting( |
41 v8::Isolate::kFullGarbageCollection); | 42 v8::Isolate::kFullGarbageCollection); |
42 return 0; | 43 return 0; |
43 } | 44 } |
OLD | NEW |