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

Unified Diff: third_party/WebKit/Source/web/tests/WebUnitTests.cpp

Issue 1482683002: Trial: build trunk with Oilpan everywhere. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: have RemoteDOMWindow keep a weak ref back to its RemoteFrame Created 5 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/web/tests/WebUnitTests.cpp
diff --git a/third_party/WebKit/Source/web/tests/WebUnitTests.cpp b/third_party/WebKit/Source/web/tests/WebUnitTests.cpp
index 7c4f48a1678a0f538c9b15ce1ff7fbb3b412d6e5..f7a7d33b845867a8dc22a8bb71107c5803e04471 100644
--- a/third_party/WebKit/Source/web/tests/WebUnitTests.cpp
+++ b/third_party/WebKit/Source/web/tests/WebUnitTests.cpp
@@ -32,6 +32,7 @@
#include "web/tests/WebUnitTests.h"
#include "bindings/core/v8/V8GCController.h"
+#include "bindings/core/v8/V8Initializer.h"
#include <base/bind.h>
#include <base/message_loop/message_loop.h>
#include <base/run_loop.h>
@@ -53,6 +54,9 @@ int runHelper(base::TestSuite* testSuite, void (*preTestHook)(void), void (*post
base::MessageLoop::current()->PostTask(FROM_HERE, base::Bind(&base::DoNothing));
base::RunLoop().RunUntilIdle();
+ // Clear out any leftover, uncollected promises.
+ V8Initializer::disposeRejectedPromisesOnMainThread();
+
// Collect garbage in order to release mock objects referred from v8 or
// Oilpan heap. Otherwise false mock leaks will be reported.
V8GCController::collectAllGarbageForTesting(v8::Isolate::GetCurrent());

Powered by Google App Engine
This is Rietveld 408576698