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

Side by Side Diff: third_party/WebKit/Source/web/tests/RunAllTests.cpp

Issue 1919663002: Unify and generalize thread static persistent finalization. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased Created 4 years, 8 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 | « third_party/WebKit/Source/platform/heap/ThreadState.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 int result = testSuite->Run(); 50 int result = testSuite->Run();
51 51
52 // Tickle EndOfTaskRunner which among other things will flush the queue 52 // Tickle EndOfTaskRunner which among other things will flush the queue
53 // of error messages via V8Initializer::reportRejectedPromisesOnMainThread. 53 // of error messages via V8Initializer::reportRejectedPromisesOnMainThread.
54 base::MessageLoop::current()->PostTask(FROM_HERE, base::Bind(&base::DoNothin g)); 54 base::MessageLoop::current()->PostTask(FROM_HERE, base::Bind(&base::DoNothin g));
55 base::RunLoop().RunUntilIdle(); 55 base::RunLoop().RunUntilIdle();
56 56
57 // Collect garbage (including threadspecific persistent handles) in order 57 // Collect garbage (including threadspecific persistent handles) in order
58 // to release mock objects referred from v8 or Oilpan heap. Otherwise false 58 // to release mock objects referred from v8 or Oilpan heap. Otherwise false
59 // mock leaks will be reported. 59 // mock leaks will be reported.
60 blink::ThreadState::current()->callThreadShutdownHooks();
61 blink::V8GCController::collectAllGarbageForTesting(v8::Isolate::GetCurrent() ); 60 blink::V8GCController::collectAllGarbageForTesting(v8::Isolate::GetCurrent() );
62 61
63 content::TearDownBlinkTestEnvironment(); 62 content::TearDownBlinkTestEnvironment();
64 63
65 return result; 64 return result;
66 } 65 }
67 66
68 } // namespace 67 } // namespace
69 68
70 int main(int argc, char** argv) 69 int main(int argc, char** argv)
71 { 70 {
72 mojo::edk::Init(); 71 mojo::edk::Init();
73 72
74 base::TestSuite testSuite(argc, argv); 73 base::TestSuite testSuite(argc, argv);
75 return base::LaunchUnitTests(argc, argv, base::Bind(&runHelper, base::Unreta ined(&testSuite))); 74 return base::LaunchUnitTests(argc, argv, base::Bind(&runHelper, base::Unreta ined(&testSuite)));
76 } 75 }
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/heap/ThreadState.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698