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

Side by Side Diff: test/cctest/test-api-interceptors.cc

Issue 2310143002: [heap] Introduce enum of garbage collection reasons. (Closed)
Patch Set: rebase Created 4 years, 3 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 | « test/cctest/test-api.cc ('k') | test/cctest/test-cpu-profiler.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 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
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
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 }
OLDNEW
« no previous file with comments | « test/cctest/test-api.cc ('k') | test/cctest/test-cpu-profiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698