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

Side by Side Diff: test/cctest/test-accessors.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/heap/test-page-promotion.cc ('k') | test/cctest/test-api.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 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after
312 CHECK(info.This() == info.Holder()); 312 CHECK(info.This() == info.Holder());
313 CHECK(info.Data() 313 CHECK(info.Data()
314 ->Equals(info.GetIsolate()->GetCurrentContext(), v8_str("data")) 314 ->Equals(info.GetIsolate()->GetCurrentContext(), v8_str("data"))
315 .FromJust()); 315 .FromJust());
316 ApiTestFuzzer::Fuzz(); 316 ApiTestFuzzer::Fuzz();
317 CHECK(info.GetIsolate() == CcTest::isolate()); 317 CHECK(info.GetIsolate() == CcTest::isolate());
318 CHECK(info.This() == info.Holder()); 318 CHECK(info.This() == info.Holder());
319 CHECK(info.Data() 319 CHECK(info.Data()
320 ->Equals(info.GetIsolate()->GetCurrentContext(), v8_str("data")) 320 ->Equals(info.GetIsolate()->GetCurrentContext(), v8_str("data"))
321 .FromJust()); 321 .FromJust());
322 CcTest::heap()->CollectAllGarbage(); 322 CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
323 CHECK(info.GetIsolate() == CcTest::isolate()); 323 CHECK(info.GetIsolate() == CcTest::isolate());
324 CHECK(info.This() == info.Holder()); 324 CHECK(info.This() == info.Holder());
325 CHECK(info.Data() 325 CHECK(info.Data()
326 ->Equals(info.GetIsolate()->GetCurrentContext(), v8_str("data")) 326 ->Equals(info.GetIsolate()->GetCurrentContext(), v8_str("data"))
327 .FromJust()); 327 .FromJust());
328 info.GetReturnValue().Set(17); 328 info.GetReturnValue().Set(17);
329 } 329 }
330 330
331 331
332 THREADED_TEST(DirectCall) { 332 THREADED_TEST(DirectCall) {
(...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after
792 ->Set(env.local(), v8_str("Fun"), 792 ->Set(env.local(), v8_str("Fun"),
793 fun_templ->GetFunction(env.local()).ToLocalChecked()) 793 fun_templ->GetFunction(env.local()).ToLocalChecked())
794 .FromJust()); 794 .FromJust());
795 795
796 CompileRun( 796 CompileRun(
797 "var f = new Fun();" 797 "var f = new Fun();"
798 "Number.prototype.__proto__ = f;" 798 "Number.prototype.__proto__ = f;"
799 "var a = 42;" 799 "var a = 42;"
800 "for (var i = 0; i<3; i++) { a.foo; }"); 800 "for (var i = 0; i<3; i++) { a.foo; }");
801 } 801 }
OLDNEW
« no previous file with comments | « test/cctest/heap/test-page-promotion.cc ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698