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

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

Issue 1683553003: Add missing Dart_ExitScope calls in some of the VM unit tests. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 10 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 | « no previous file | runtime/vm/dart_api_impl_test.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) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 "include/dart_api.h" 5 #include "include/dart_api.h"
6 #include "include/dart_native_api.h" 6 #include "include/dart_native_api.h"
7 7
8 #include "vm/unit_test.h" 8 #include "vm/unit_test.h"
9 9
10 // Custom Isolate Test. 10 // Custom Isolate Test.
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 Dart_EnterIsolate(isolate()); 203 Dart_EnterIsolate(isolate());
204 Dart_EnterScope(); 204 Dart_EnterScope();
205 205
206 Dart_Handle result = Dart_HandleMessage(); 206 Dart_Handle result = Dart_HandleMessage();
207 EXPECT_VALID(result); 207 EXPECT_VALID(result);
208 208
209 if (!Dart_HasLivePorts()) { 209 if (!Dart_HasLivePorts()) {
210 OS::Print("<< Shutting down isolate(%p)\n", isolate()); 210 OS::Print("<< Shutting down isolate(%p)\n", isolate());
211 event_queue->RemoveEventsForIsolate(isolate()); 211 event_queue->RemoveEventsForIsolate(isolate());
212 Dart_SetMessageNotifyCallback(NULL); 212 Dart_SetMessageNotifyCallback(NULL);
213 Dart_ExitIsolate();
213 Dart_ShutdownIsolate(); 214 Dart_ShutdownIsolate();
214 } else { 215 } else {
215 Dart_ExitScope(); 216 Dart_ExitScope();
216 Dart_ExitIsolate(); 217 Dart_ExitIsolate();
217 } 218 }
218 ASSERT(Dart_CurrentIsolate() == NULL); 219 ASSERT(Dart_CurrentIsolate() == NULL);
219 } 220 }
220 221
221 222
222 static void NotifyMessage(Dart_Isolate dest_isolate) { 223 static void NotifyMessage(Dart_Isolate dest_isolate) {
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
350 } 351 }
351 OS::Print("-- Finished event loop --\n"); 352 OS::Print("-- Finished event loop --\n");
352 EXPECT_STREQ("Received: 43", saved_echo); 353 EXPECT_STREQ("Received: 43", saved_echo);
353 free(saved_echo); 354 free(saved_echo);
354 355
355 delete event_queue; 356 delete event_queue;
356 event_queue = NULL; 357 event_queue = NULL;
357 } 358 }
358 359
359 } // namespace dart 360 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/dart_api_impl_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698