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

Side by Side Diff: runtime/vm/dart_api_impl_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 | « runtime/vm/custom_isolate_test.cc ('k') | runtime/vm/snapshot_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) 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 "bin/builtin.h" 5 #include "bin/builtin.h"
6 #include "include/dart_api.h" 6 #include "include/dart_api.h"
7 #include "include/dart_mirrors_api.h" 7 #include "include/dart_mirrors_api.h"
8 #include "include/dart_native_api.h" 8 #include "include/dart_native_api.h"
9 #include "include/dart_tools_api.h" 9 #include "include/dart_tools_api.h"
10 #include "platform/assert.h" 10 #include "platform/assert.h"
(...skipping 2801 matching lines...) Expand 10 before | Expand all | Expand 10 after
2812 2812
2813 UNIT_TEST_CASE(WeakPersistentHandlesCallbackShutdown) { 2813 UNIT_TEST_CASE(WeakPersistentHandlesCallbackShutdown) {
2814 TestCase::CreateTestIsolate(); 2814 TestCase::CreateTestIsolate();
2815 Dart_EnterScope(); 2815 Dart_EnterScope();
2816 Dart_Handle ref = Dart_True(); 2816 Dart_Handle ref = Dart_True();
2817 int peer = 1234; 2817 int peer = 1234;
2818 Dart_NewWeakPersistentHandle(ref, 2818 Dart_NewWeakPersistentHandle(ref,
2819 &peer, 2819 &peer,
2820 0, 2820 0,
2821 WeakPersistentHandlePeerFinalizer); 2821 WeakPersistentHandlePeerFinalizer);
2822 Dart_ExitScope();
2822 Dart_ShutdownIsolate(); 2823 Dart_ShutdownIsolate();
2823 EXPECT(peer == 42); 2824 EXPECT(peer == 42);
2824 } 2825 }
2825 2826
2826 2827
2827 TEST_CASE(WeakPersistentHandleExternalAllocationSize) { 2828 TEST_CASE(WeakPersistentHandleExternalAllocationSize) {
2828 Heap* heap = Isolate::Current()->heap(); 2829 Heap* heap = Isolate::Current()->heap();
2829 EXPECT(heap->ExternalInWords(Heap::kNew) == 0); 2830 EXPECT(heap->ExternalInWords(Heap::kNew) == 0);
2830 EXPECT(heap->ExternalInWords(Heap::kOld) == 0); 2831 EXPECT(heap->ExternalInWords(Heap::kOld) == 0);
2831 Dart_WeakPersistentHandle weak1 = NULL; 2832 Dart_WeakPersistentHandle weak1 = NULL;
(...skipping 6930 matching lines...) Expand 10 before | Expand all | Expand 10 after
9762 EXPECT_SUBSTRING("\"function\":\"::_main\"", buffer); 9763 EXPECT_SUBSTRING("\"function\":\"::_main\"", buffer);
9763 9764
9764 // Heartbeat test for new events. 9765 // Heartbeat test for new events.
9765 EXPECT_SUBSTRING("\"name\":\"TestVMDuration2\"", buffer); 9766 EXPECT_SUBSTRING("\"name\":\"TestVMDuration2\"", buffer);
9766 EXPECT_SUBSTRING("\"function\":\"::_bar\"", buffer); 9767 EXPECT_SUBSTRING("\"function\":\"::_bar\"", buffer);
9767 } 9768 }
9768 9769
9769 #endif // !PRODUCT 9770 #endif // !PRODUCT
9770 9771
9771 } // namespace dart 9772 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/custom_isolate_test.cc ('k') | runtime/vm/snapshot_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698