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

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

Issue 2012973002: Background finalization. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 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 unified diff | Download patch
« no previous file with comments | « no previous file | runtime/vm/dart_api_state.h » ('j') | runtime/vm/dart_api_state.h » ('J')
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 "vm/compiler.h" 6 #include "vm/compiler.h"
7 #include "include/dart_api.h" 7 #include "include/dart_api.h"
8 #include "include/dart_mirrors_api.h" 8 #include "include/dart_mirrors_api.h"
9 #include "include/dart_native_api.h" 9 #include "include/dart_native_api.h"
10 #include "include/dart_tools_api.h" 10 #include "include/dart_tools_api.h"
(...skipping 1188 matching lines...) Expand 10 before | Expand all | Expand 10 after
1199 &utf8_encoded_reversed, &utf8_length_reversed); 1199 &utf8_encoded_reversed, &utf8_length_reversed);
1200 EXPECT_VALID(result); 1200 EXPECT_VALID(result);
1201 EXPECT_EQ(6, utf8_length_reversed); 1201 EXPECT_EQ(6, utf8_length_reversed);
1202 uint8_t expected[6] = {237, 180, 158, 237, 160, 180}; 1202 uint8_t expected[6] = {237, 180, 158, 237, 160, 180};
1203 for (int i = 0; i < 6; i++) { 1203 for (int i = 0; i < 6; i++) {
1204 EXPECT_EQ(expected[i], utf8_encoded_reversed[i]); 1204 EXPECT_EQ(expected[i], utf8_encoded_reversed[i]);
1205 } 1205 }
1206 } 1206 }
1207 1207
1208 1208
1209 // Helper class to ensure new gen GC is triggered without any side effects.
1210 // The normal call to CollectGarbage(Heap::kNew) could potentially trigger
1211 // an old gen collection if there is a promotion failure and this could
1212 // perturb the test.
1213 class GCTestHelper : public AllStatic {
1214 public:
1215 static void CollectNewSpace(Heap::ApiCallbacks api_callbacks) {
1216 bool invoke_api_callbacks = (api_callbacks == Heap::kInvokeApiCallbacks);
1217 Isolate::Current()->heap()->new_space()->Scavenge(invoke_api_callbacks);
1218 }
1219
1220 static void WaitForFinalizationTasks() {
1221 Heap* heap = Isolate::Current()->heap();
1222 MonitorLocker ml(heap->finalization_tasks_lock());
1223 while (heap->finalization_tasks() > 0) {
1224 ml.Wait();
siva 2016/06/02 20:18:05 Should this be WaitWithSafepointCheck(...) here?
rmacnak 2016/06/03 01:08:30 Done.
1225 }
1226 }
1227 };
1228
1229
1209 static void ExternalStringCallbackFinalizer(void* peer) { 1230 static void ExternalStringCallbackFinalizer(void* peer) {
1210 *static_cast<int*>(peer) *= 2; 1231 *static_cast<int*>(peer) *= 2;
1211 } 1232 }
1212 1233
1213 1234
1214 TEST_CASE(ExternalStringCallback) { 1235 TEST_CASE(ExternalStringCallback) {
1215 int peer8 = 40; 1236 int peer8 = 40;
1216 int peer16 = 41; 1237 int peer16 = 41;
1217 1238
1218 { 1239 {
(...skipping 16 matching lines...) Expand all
1235 EXPECT_VALID(obj16); 1256 EXPECT_VALID(obj16);
1236 1257
1237 Dart_ExitScope(); 1258 Dart_ExitScope();
1238 } 1259 }
1239 1260
1240 { 1261 {
1241 TransitionNativeToVM transition(thread); 1262 TransitionNativeToVM transition(thread);
1242 EXPECT_EQ(40, peer8); 1263 EXPECT_EQ(40, peer8);
1243 EXPECT_EQ(41, peer16); 1264 EXPECT_EQ(41, peer16);
1244 Isolate::Current()->heap()->CollectGarbage(Heap::kOld); 1265 Isolate::Current()->heap()->CollectGarbage(Heap::kOld);
1266 GCTestHelper::WaitForFinalizationTasks();
1245 EXPECT_EQ(40, peer8); 1267 EXPECT_EQ(40, peer8);
1246 EXPECT_EQ(41, peer16); 1268 EXPECT_EQ(41, peer16);
1247 Isolate::Current()->heap()->CollectGarbage(Heap::kNew); 1269 Isolate::Current()->heap()->CollectGarbage(Heap::kNew);
1270 GCTestHelper::WaitForFinalizationTasks();
1248 EXPECT_EQ(80, peer8); 1271 EXPECT_EQ(80, peer8);
1249 EXPECT_EQ(82, peer16); 1272 EXPECT_EQ(82, peer16);
1250 } 1273 }
1251 } 1274 }
1252 1275
1253 1276
1254 TEST_CASE(ExternalStringPretenure) { 1277 TEST_CASE(ExternalStringPretenure) {
1255 { 1278 {
1256 Dart_EnterScope(); 1279 Dart_EnterScope();
1257 static const uint8_t big_data8[16*MB] = {0, }; 1280 static const uint8_t big_data8[16*MB] = {0, };
(...skipping 1116 matching lines...) Expand 10 before | Expand all | Expand 10 after
2374 ARRAY_SIZE(data)); 2397 ARRAY_SIZE(data));
2375 Dart_NewWeakPersistentHandle( 2398 Dart_NewWeakPersistentHandle(
2376 obj, &peer, sizeof(data), ExternalTypedDataFinalizer); 2399 obj, &peer, sizeof(data), ExternalTypedDataFinalizer);
2377 EXPECT_VALID(obj); 2400 EXPECT_VALID(obj);
2378 Dart_ExitScope(); 2401 Dart_ExitScope();
2379 } 2402 }
2380 { 2403 {
2381 TransitionNativeToVM transition(thread); 2404 TransitionNativeToVM transition(thread);
2382 EXPECT(peer == 0); 2405 EXPECT(peer == 0);
2383 Isolate::Current()->heap()->CollectGarbage(Heap::kOld); 2406 Isolate::Current()->heap()->CollectGarbage(Heap::kOld);
2407 GCTestHelper::WaitForFinalizationTasks();
2384 EXPECT(peer == 0); 2408 EXPECT(peer == 0);
2385 Isolate::Current()->heap()->CollectGarbage(Heap::kNew); 2409 Isolate::Current()->heap()->CollectGarbage(Heap::kNew);
2410 GCTestHelper::WaitForFinalizationTasks();
2386 EXPECT(peer == 42); 2411 EXPECT(peer == 42);
2387 } 2412 }
2388 } 2413 }
2389 2414
2390 2415
2391 static void CheckFloat32x4Data(Dart_Handle obj) { 2416 static void CheckFloat32x4Data(Dart_Handle obj) {
2392 void* raw_data = NULL; 2417 void* raw_data = NULL;
2393 intptr_t len; 2418 intptr_t len;
2394 Dart_TypedData_Type type; 2419 Dart_TypedData_Type type;
2395 EXPECT_VALID(Dart_TypedDataAcquireData(obj, &type, &raw_data, &len)); 2420 EXPECT_VALID(Dart_TypedDataAcquireData(obj, &type, &raw_data, &len));
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
2432 Dart_Handle lcl = Dart_NewExternalTypedData( 2457 Dart_Handle lcl = Dart_NewExternalTypedData(
2433 Dart_TypedData_kFloat32x4, data, 10); 2458 Dart_TypedData_kFloat32x4, data, 10);
2434 Dart_NewWeakPersistentHandle( 2459 Dart_NewWeakPersistentHandle(
2435 lcl, &peer, sizeof(data), ExternalTypedDataFinalizer); 2460 lcl, &peer, sizeof(data), ExternalTypedDataFinalizer);
2436 CheckFloat32x4Data(lcl); 2461 CheckFloat32x4Data(lcl);
2437 } 2462 }
2438 Dart_ExitScope(); 2463 Dart_ExitScope();
2439 { 2464 {
2440 TransitionNativeToVM transition(thread); 2465 TransitionNativeToVM transition(thread);
2441 Isolate::Current()->heap()->CollectGarbage(Heap::kNew); 2466 Isolate::Current()->heap()->CollectGarbage(Heap::kNew);
2467 GCTestHelper::WaitForFinalizationTasks();
2442 EXPECT(peer == 42); 2468 EXPECT(peer == 42);
2443 } 2469 }
2444 } 2470 }
2445 2471
2446 2472
2447 // Unit test for entering a scope, creating a local handle and exiting 2473 // Unit test for entering a scope, creating a local handle and exiting
2448 // the scope. 2474 // the scope.
2449 UNIT_TEST_CASE(EnterExitScope) { 2475 UNIT_TEST_CASE(EnterExitScope) {
2450 TestIsolateScope __test_isolate__; 2476 TestIsolateScope __test_isolate__;
2451 2477
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
2594 Dart_SetPersistentHandle(obj, ref2); 2620 Dart_SetPersistentHandle(obj, ref2);
2595 str ^= PersistentHandle::Cast(obj)->raw(); 2621 str ^= PersistentHandle::Cast(obj)->raw();
2596 EXPECT(str.Equals(kTestString2)); 2622 EXPECT(str.Equals(kTestString2));
2597 2623
2598 // Now assign Null to the persistent handle and check. 2624 // Now assign Null to the persistent handle and check.
2599 Dart_SetPersistentHandle(obj, Dart_Null()); 2625 Dart_SetPersistentHandle(obj, Dart_Null());
2600 EXPECT(Dart_IsNull(obj)); 2626 EXPECT(Dart_IsNull(obj));
2601 } 2627 }
2602 2628
2603 2629
2604 // Helper class to ensure new gen GC is triggered without any side effects.
2605 // The normal call to CollectGarbage(Heap::kNew) could potentially trigger
2606 // an old gen collection if there is a promotion failure and this could
2607 // perturb the test.
2608 class GCTestHelper : public AllStatic {
2609 public:
2610 static void CollectNewSpace(Heap::ApiCallbacks api_callbacks) {
2611 bool invoke_api_callbacks = (api_callbacks == Heap::kInvokeApiCallbacks);
2612 Isolate::Current()->heap()->new_space()->Scavenge(invoke_api_callbacks);
2613 }
2614 };
2615
2616
2617 static Dart_Handle AsHandle(Dart_PersistentHandle weak) { 2630 static Dart_Handle AsHandle(Dart_PersistentHandle weak) {
2618 return Dart_HandleFromPersistent(weak); 2631 return Dart_HandleFromPersistent(weak);
2619 } 2632 }
2620 2633
2621 2634
2622 static Dart_Handle AsHandle(Dart_WeakPersistentHandle weak) { 2635 static Dart_Handle AsHandle(Dart_WeakPersistentHandle weak) {
2623 return Dart_HandleFromWeakPersistent(weak); 2636 return Dart_HandleFromWeakPersistent(weak);
2624 } 2637 }
2625 2638
2626 2639
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
2721 EXPECT(Dart_IdentityEquals(old_ref, AsHandle(weak_old_ref))); 2734 EXPECT(Dart_IdentityEquals(old_ref, AsHandle(weak_old_ref)));
2722 2735
2723 // Delete local (strong) references. 2736 // Delete local (strong) references.
2724 Dart_ExitScope(); 2737 Dart_ExitScope();
2725 } 2738 }
2726 2739
2727 { 2740 {
2728 TransitionNativeToVM transition(thread); 2741 TransitionNativeToVM transition(thread);
2729 // Garbage collect new space again. 2742 // Garbage collect new space again.
2730 GCTestHelper::CollectNewSpace(Heap::kIgnoreApiCallbacks); 2743 GCTestHelper::CollectNewSpace(Heap::kIgnoreApiCallbacks);
2744 GCTestHelper::WaitForFinalizationTasks();
2731 } 2745 }
2732 2746
2733 { 2747 {
2734 Dart_EnterScope(); 2748 Dart_EnterScope();
2735 // Weak ref to new space object should now be cleared. 2749 // Weak ref to new space object should now be cleared.
2736 EXPECT(weak_new_ref == NULL); 2750 EXPECT(weak_new_ref == NULL);
2737 EXPECT_VALID(AsHandle(weak_old_ref)); 2751 EXPECT_VALID(AsHandle(weak_old_ref));
2738 EXPECT(!Dart_IsNull(AsHandle(weak_old_ref))); 2752 EXPECT(!Dart_IsNull(AsHandle(weak_old_ref)));
2739 Dart_ExitScope(); 2753 Dart_ExitScope();
2740 } 2754 }
2741 2755
2742 { 2756 {
2743 TransitionNativeToVM transition(thread); 2757 TransitionNativeToVM transition(thread);
2744 // Garbage collect old space again. 2758 // Garbage collect old space again.
2745 Isolate::Current()->heap()->CollectGarbage(Heap::kOld); 2759 Isolate::Current()->heap()->CollectGarbage(Heap::kOld);
2760 GCTestHelper::WaitForFinalizationTasks();
2746 } 2761 }
2747 2762
2748 { 2763 {
2749 Dart_EnterScope(); 2764 Dart_EnterScope();
2750 // Weak ref to old space object should now be cleared. 2765 // Weak ref to old space object should now be cleared.
2751 EXPECT(weak_new_ref == NULL); 2766 EXPECT(weak_new_ref == NULL);
2752 EXPECT(weak_old_ref == NULL); 2767 EXPECT(weak_old_ref == NULL);
2753 Dart_ExitScope(); 2768 Dart_ExitScope();
2754 } 2769 }
2755 2770
(...skipping 24 matching lines...) Expand all
2780 WeakPersistentHandlePeerFinalizer); 2795 WeakPersistentHandlePeerFinalizer);
2781 EXPECT_VALID(AsHandle(weak_ref)); 2796 EXPECT_VALID(AsHandle(weak_ref));
2782 EXPECT(peer == 0); 2797 EXPECT(peer == 0);
2783 Dart_ExitScope(); 2798 Dart_ExitScope();
2784 } 2799 }
2785 { 2800 {
2786 TransitionNativeToVM transition(thread); 2801 TransitionNativeToVM transition(thread);
2787 Isolate::Current()->heap()->CollectGarbage(Heap::kOld); 2802 Isolate::Current()->heap()->CollectGarbage(Heap::kOld);
2788 EXPECT(peer == 0); 2803 EXPECT(peer == 0);
2789 GCTestHelper::CollectNewSpace(Heap::kIgnoreApiCallbacks); 2804 GCTestHelper::CollectNewSpace(Heap::kIgnoreApiCallbacks);
2805 GCTestHelper::WaitForFinalizationTasks();
2790 EXPECT(peer == 42); 2806 EXPECT(peer == 42);
2791 } 2807 }
2792 } 2808 }
2793 2809
2794 2810
2795 TEST_CASE(WeakPersistentHandleNoCallback) { 2811 TEST_CASE(WeakPersistentHandleNoCallback) {
2796 Dart_WeakPersistentHandle weak_ref = NULL; 2812 Dart_WeakPersistentHandle weak_ref = NULL;
2797 int peer = 0; 2813 int peer = 0;
2798 { 2814 {
2799 Dart_EnterScope(); 2815 Dart_EnterScope();
2800 Dart_Handle obj = NewString("new string"); 2816 Dart_Handle obj = NewString("new string");
2801 EXPECT_VALID(obj); 2817 EXPECT_VALID(obj);
2802 weak_ref = Dart_NewWeakPersistentHandle(obj, &peer, 0, 2818 weak_ref = Dart_NewWeakPersistentHandle(obj, &peer, 0,
2803 WeakPersistentHandlePeerFinalizer); 2819 WeakPersistentHandlePeerFinalizer);
2804 Dart_ExitScope(); 2820 Dart_ExitScope();
2805 } 2821 }
2806 // A finalizer is not invoked on a deleted handle. Therefore, the 2822 // A finalizer is not invoked on a deleted handle. Therefore, the
2807 // peer value should not change after the referent is collected. 2823 // peer value should not change after the referent is collected.
2808 Dart_Isolate isolate = reinterpret_cast<Dart_Isolate>(Isolate::Current()); 2824 Dart_Isolate isolate = reinterpret_cast<Dart_Isolate>(Isolate::Current());
2809 Dart_DeleteWeakPersistentHandle(isolate, weak_ref); 2825 Dart_DeleteWeakPersistentHandle(isolate, weak_ref);
2810 EXPECT(peer == 0); 2826 EXPECT(peer == 0);
2811 { 2827 {
2812 TransitionNativeToVM transition(thread); 2828 TransitionNativeToVM transition(thread);
2813 Isolate::Current()->heap()->CollectGarbage(Heap::kOld); 2829 Isolate::Current()->heap()->CollectGarbage(Heap::kOld);
2814 EXPECT(peer == 0); 2830 EXPECT(peer == 0);
2815 GCTestHelper::CollectNewSpace(Heap::kIgnoreApiCallbacks); 2831 GCTestHelper::CollectNewSpace(Heap::kIgnoreApiCallbacks);
2832 GCTestHelper::WaitForFinalizationTasks();
2816 EXPECT(peer == 0); 2833 EXPECT(peer == 0);
2817 } 2834 }
2818 } 2835 }
2819 2836
2820 2837
2821 UNIT_TEST_CASE(WeakPersistentHandlesCallbackShutdown) { 2838 UNIT_TEST_CASE(WeakPersistentHandlesCallbackShutdown) {
2822 TestCase::CreateTestIsolate(); 2839 TestCase::CreateTestIsolate();
2823 Dart_EnterScope(); 2840 Dart_EnterScope();
2824 Dart_Handle ref = Dart_True(); 2841 Dart_Handle ref = Dart_True();
2825 int peer = 1234; 2842 int peer = 1234;
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
2866 Dart_ExitScope(); 2883 Dart_ExitScope();
2867 } 2884 }
2868 { 2885 {
2869 TransitionNativeToVM transition(thread); 2886 TransitionNativeToVM transition(thread);
2870 Isolate::Current()->heap()->CollectGarbage(Heap::kOld); 2887 Isolate::Current()->heap()->CollectGarbage(Heap::kOld);
2871 EXPECT(heap->ExternalInWords(Heap::kNew) == 2888 EXPECT(heap->ExternalInWords(Heap::kNew) ==
2872 (kWeak1ExternalSize + kWeak2ExternalSize) / kWordSize); 2889 (kWeak1ExternalSize + kWeak2ExternalSize) / kWordSize);
2873 // Collect weakly referenced string, and promote strongly referenced string. 2890 // Collect weakly referenced string, and promote strongly referenced string.
2874 GCTestHelper::CollectNewSpace(Heap::kIgnoreApiCallbacks); 2891 GCTestHelper::CollectNewSpace(Heap::kIgnoreApiCallbacks);
2875 GCTestHelper::CollectNewSpace(Heap::kIgnoreApiCallbacks); 2892 GCTestHelper::CollectNewSpace(Heap::kIgnoreApiCallbacks);
2893 GCTestHelper::WaitForFinalizationTasks();
2876 EXPECT(heap->ExternalInWords(Heap::kNew) == 0); 2894 EXPECT(heap->ExternalInWords(Heap::kNew) == 0);
2877 EXPECT(heap->ExternalInWords(Heap::kOld) == kWeak2ExternalSize / kWordSize); 2895 EXPECT(heap->ExternalInWords(Heap::kOld) == kWeak2ExternalSize / kWordSize);
2878 } 2896 }
2879 Dart_Isolate isolate = reinterpret_cast<Dart_Isolate>(Isolate::Current()); 2897 Dart_Isolate isolate = reinterpret_cast<Dart_Isolate>(Isolate::Current());
2880 Dart_DeleteWeakPersistentHandle(isolate, weak1); 2898 Dart_DeleteWeakPersistentHandle(isolate, weak1);
2881 Dart_DeleteWeakPersistentHandle(isolate, weak2); 2899 Dart_DeleteWeakPersistentHandle(isolate, weak2);
2882 Dart_DeletePersistentHandle(strong_ref); 2900 Dart_DeletePersistentHandle(strong_ref);
2883 { 2901 {
2884 TransitionNativeToVM transition(thread); 2902 TransitionNativeToVM transition(thread);
2885 Isolate::Current()->heap()->CollectGarbage(Heap::kOld); 2903 Isolate::Current()->heap()->CollectGarbage(Heap::kOld);
2904 GCTestHelper::WaitForFinalizationTasks();
2886 EXPECT(heap->ExternalInWords(Heap::kOld) == 0); 2905 EXPECT(heap->ExternalInWords(Heap::kOld) == 0);
2887 } 2906 }
2888 } 2907 }
2889 2908
2890 2909
2891 TEST_CASE(WeakPersistentHandleExternalAllocationSizeNewspaceGC) { 2910 TEST_CASE(WeakPersistentHandleExternalAllocationSizeNewspaceGC) {
2892 Dart_Isolate isolate = reinterpret_cast<Dart_Isolate>(Isolate::Current()); 2911 Dart_Isolate isolate = reinterpret_cast<Dart_Isolate>(Isolate::Current());
2893 Heap* heap = Isolate::Current()->heap(); 2912 Heap* heap = Isolate::Current()->heap();
2894 Dart_WeakPersistentHandle weak1 = NULL; 2913 Dart_WeakPersistentHandle weak1 = NULL;
2895 // Large enough to exceed any new space limit. Not actually allocated. 2914 // Large enough to exceed any new space limit. Not actually allocated.
(...skipping 25 matching lines...) Expand all
2921 EXPECT(handle.IsOld()); 2940 EXPECT(handle.IsOld());
2922 } 2941 }
2923 EXPECT(heap->ExternalInWords(Heap::kNew) == 0); 2942 EXPECT(heap->ExternalInWords(Heap::kNew) == 0);
2924 EXPECT(heap->ExternalInWords(Heap::kOld) == kWeak1ExternalSize / kWordSize); 2943 EXPECT(heap->ExternalInWords(Heap::kOld) == kWeak1ExternalSize / kWordSize);
2925 Dart_ExitScope(); 2944 Dart_ExitScope();
2926 } 2945 }
2927 Dart_DeleteWeakPersistentHandle(isolate, weak1); 2946 Dart_DeleteWeakPersistentHandle(isolate, weak1);
2928 { 2947 {
2929 TransitionNativeToVM transition(thread); 2948 TransitionNativeToVM transition(thread);
2930 Isolate::Current()->heap()->CollectGarbage(Heap::kOld); 2949 Isolate::Current()->heap()->CollectGarbage(Heap::kOld);
2950 GCTestHelper::WaitForFinalizationTasks();
2931 EXPECT(heap->ExternalInWords(Heap::kOld) == 0); 2951 EXPECT(heap->ExternalInWords(Heap::kOld) == 0);
2932 } 2952 }
2933 } 2953 }
2934 2954
2935 2955
2936 TEST_CASE(WeakPersistentHandleExternalAllocationSizeOldspaceGC) { 2956 TEST_CASE(WeakPersistentHandleExternalAllocationSizeOldspaceGC) {
2937 // Check that external allocation in old space can trigger GC. 2957 // Check that external allocation in old space can trigger GC.
2938 Isolate* isolate = Isolate::Current(); 2958 Isolate* isolate = Isolate::Current();
2939 Dart_EnterScope(); 2959 Dart_EnterScope();
2940 Dart_Handle live = Api::NewHandle(thread, String::New("live", Heap::kOld)); 2960 Dart_Handle live = Api::NewHandle(thread, String::New("live", Heap::kOld));
(...skipping 7140 matching lines...) Expand 10 before | Expand all | Expand 10 after
10081 result = Dart_Invoke(lib, 10101 result = Dart_Invoke(lib,
10082 NewString("foozoo"), 10102 NewString("foozoo"),
10083 0, 10103 0,
10084 NULL); 10104 NULL);
10085 EXPECT(Dart_IsError(result)); 10105 EXPECT(Dart_IsError(result));
10086 } 10106 }
10087 10107
10088 #endif // !PRODUCT 10108 #endif // !PRODUCT
10089 10109
10090 } // namespace dart 10110 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/dart_api_state.h » ('j') | runtime/vm/dart_api_state.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698