OLD | NEW |
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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 <stdlib.h> | 5 #include <stdlib.h> |
6 | 6 |
7 #include "test/cctest/test-api.h" | 7 #include "test/cctest/test-api.h" |
8 | 8 |
9 #include "include/v8-util.h" | 9 #include "include/v8-util.h" |
10 #include "src/api.h" | 10 #include "src/api.h" |
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
353 } | 353 } |
354 | 354 |
355 void InterceptorHasOwnPropertyGetter( | 355 void InterceptorHasOwnPropertyGetter( |
356 Local<Name> name, const v8::PropertyCallbackInfo<v8::Value>& info) { | 356 Local<Name> name, const v8::PropertyCallbackInfo<v8::Value>& info) { |
357 ApiTestFuzzer::Fuzz(); | 357 ApiTestFuzzer::Fuzz(); |
358 } | 358 } |
359 | 359 |
360 void InterceptorHasOwnPropertyGetterGC( | 360 void InterceptorHasOwnPropertyGetterGC( |
361 Local<Name> name, const v8::PropertyCallbackInfo<v8::Value>& info) { | 361 Local<Name> name, const v8::PropertyCallbackInfo<v8::Value>& info) { |
362 ApiTestFuzzer::Fuzz(); | 362 ApiTestFuzzer::Fuzz(); |
363 CcTest::heap()->CollectAllGarbage(); | 363 CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); |
364 } | 364 } |
365 | 365 |
366 } // namespace | 366 } // namespace |
367 | 367 |
368 int query_counter_int = 0; | 368 int query_counter_int = 0; |
369 | 369 |
370 namespace { | 370 namespace { |
371 void QueryCallback(Local<Name> property, | 371 void QueryCallback(Local<Name> property, |
372 const v8::PropertyCallbackInfo<v8::Integer>& info) { | 372 const v8::PropertyCallbackInfo<v8::Integer>& info) { |
373 query_counter_int++; | 373 query_counter_int++; |
(...skipping 4249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4623 ->Set(env.local(), v8_str("Fun"), | 4623 ->Set(env.local(), v8_str("Fun"), |
4624 fun_templ->GetFunction(env.local()).ToLocalChecked()) | 4624 fun_templ->GetFunction(env.local()).ToLocalChecked()) |
4625 .FromJust()); | 4625 .FromJust()); |
4626 | 4626 |
4627 CompileRun( | 4627 CompileRun( |
4628 "var f = new Fun();" | 4628 "var f = new Fun();" |
4629 "Number.prototype.__proto__ = f;" | 4629 "Number.prototype.__proto__ = f;" |
4630 "var a = 42;" | 4630 "var a = 42;" |
4631 "for (var i = 0; i<3; i++) { a.foo; }"); | 4631 "for (var i = 0; i<3; i++) { a.foo; }"); |
4632 } | 4632 } |
OLD | NEW |