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

Side by Side Diff: runtime/vm/message_handler_test.cc

Issue 2620413002: Fix various memory leaks in unit tests detected by a new version of ASAN. (Closed)
Patch Set: . Created 3 years, 11 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 | « runtime/vm/compiler_test.cc ('k') | runtime/vm/native_api_impl.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 (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/message_handler.h" 5 #include "vm/message_handler.h"
6 #include "vm/port.h" 6 #include "vm/port.h"
7 #include "vm/unit_test.h" 7 #include "vm/unit_test.h"
8 8
9 namespace dart { 9 namespace dart {
10 10
(...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after
398 EXPECT_EQ(11, handler.message_count()); 398 EXPECT_EQ(11, handler.message_count());
399 EXPECT(handler.start_called()); 399 EXPECT(handler.start_called());
400 EXPECT(!handler.end_called()); 400 EXPECT(!handler.end_called());
401 EXPECT_EQ(port, handler_ports[0]); 401 EXPECT_EQ(port, handler_ports[0]);
402 for (int i = 1; i < 11; i++) { 402 for (int i = 1; i < 11; i++) {
403 EXPECT_EQ(ports[i - 1], handler_ports[i]); 403 EXPECT_EQ(ports[i - 1], handler_ports[i]);
404 } 404 }
405 handler_peer.decrement_live_ports(); 405 handler_peer.decrement_live_ports();
406 EXPECT(!handler.HasLivePorts()); 406 EXPECT(!handler.HasLivePorts());
407 PortMap::ClosePorts(&handler); 407 PortMap::ClosePorts(&handler);
408 delete[] ports;
408 } 409 }
409 410
410 } // namespace dart 411 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/compiler_test.cc ('k') | runtime/vm/native_api_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698