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

Unified Diff: test/unittests/libplatform/default-platform-unittest.cc

Issue 1221083004: Fix memory-leak in default platform implementation of delayed tasks. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/libplatform/default-platform.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/unittests/libplatform/default-platform-unittest.cc
diff --git a/test/unittests/libplatform/default-platform-unittest.cc b/test/unittests/libplatform/default-platform-unittest.cc
index ffa3199444eb4457017921bf9e622bf0a1c8ce70..814b27bc518e5a147e0291e605ccae416539c4c5 100644
--- a/test/unittests/libplatform/default-platform-unittest.cc
+++ b/test/unittests/libplatform/default-platform-unittest.cc
@@ -111,5 +111,21 @@ TEST(DefaultPlatformTest, PumpMessageLoopNoStarvation) {
EXPECT_TRUE(platform.PumpMessageLoop(isolate));
}
+
+TEST(DefaultPlatformTest, PendingDelayedTasksAreDestroyedOnShutdown) {
+ InSequence s;
+
+ int dummy;
+ Isolate* isolate = reinterpret_cast<Isolate*>(&dummy);
+
+ {
+ DefaultPlatformWithMockTime platform;
+ StrictMock<MockTask>* task = new StrictMock<MockTask>;
+ platform.CallDelayedOnForegroundThread(isolate, task, 10);
+ EXPECT_CALL(*task, Die());
+ }
+}
+
+
} // namespace platform
} // namespace v8
« no previous file with comments | « src/libplatform/default-platform.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698