OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 2 * Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
3 * for details. All rights reserved. Use of this source code is governed by a | 3 * for details. All rights reserved. Use of this source code is governed by a |
4 * BSD-style license that can be found in the LICENSE file. | 4 * BSD-style license that can be found in the LICENSE file. |
5 */ | 5 */ |
6 | 6 |
7 #ifndef INCLUDE_DART_API_H_ | 7 #ifndef INCLUDE_DART_API_H_ |
8 #define INCLUDE_DART_API_H_ | 8 #define INCLUDE_DART_API_H_ |
9 | 9 |
10 /** \mainpage Dart Embedding API Reference | 10 /** \mainpage Dart Embedding API Reference |
(...skipping 2606 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2617 | 2617 |
2618 /** | 2618 /** |
2619 * Returns the url from which a library was loaded. | 2619 * Returns the url from which a library was loaded. |
2620 */ | 2620 */ |
2621 DART_EXPORT Dart_Handle Dart_LibraryUrl(Dart_Handle library); | 2621 DART_EXPORT Dart_Handle Dart_LibraryUrl(Dart_Handle library); |
2622 | 2622 |
2623 DART_EXPORT Dart_Handle Dart_LookupLibrary(Dart_Handle url); | 2623 DART_EXPORT Dart_Handle Dart_LookupLibrary(Dart_Handle url); |
2624 /* TODO(turnidge): Consider returning Dart_Null() when the library is | 2624 /* TODO(turnidge): Consider returning Dart_Null() when the library is |
2625 * not found to distinguish that from a true error case. */ | 2625 * not found to distinguish that from a true error case. */ |
2626 | 2626 |
| 2627 |
| 2628 /** |
| 2629 * Report an loading error for the library. |
| 2630 * |
| 2631 * \param library The library that failed to load. |
| 2632 * \param error The Dart error instance containing the load error. |
| 2633 * |
| 2634 * \return If the VM handles the error, the return value is |
| 2635 * a null handle. If it doesn't handle the error, the error |
| 2636 * object is returned. |
| 2637 */ |
| 2638 DART_EXPORT Dart_Handle Dart_LibraryHandleError(Dart_Handle library, |
| 2639 Dart_Handle error); |
| 2640 |
| 2641 |
2627 DART_EXPORT Dart_Handle Dart_LoadLibrary(Dart_Handle url, | 2642 DART_EXPORT Dart_Handle Dart_LoadLibrary(Dart_Handle url, |
2628 Dart_Handle source); | 2643 Dart_Handle source); |
2629 | 2644 |
2630 /** | 2645 /** |
2631 * Imports a library into another library, optionally with a prefix. | 2646 * Imports a library into another library, optionally with a prefix. |
2632 * If no prefix is required, an empty string or Dart_Null() can be | 2647 * If no prefix is required, an empty string or Dart_Null() can be |
2633 * supplied. | 2648 * supplied. |
2634 * | 2649 * |
2635 * \param library The library into which to import another library. | 2650 * \param library The library into which to import another library. |
2636 * \param import The library to import. | 2651 * \param import The library to import. |
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2814 * NOTE: If multiple callbacks with the same name are registered, only the | 2829 * NOTE: If multiple callbacks with the same name are registered, only the |
2815 * last callback registered will be remembered. | 2830 * last callback registered will be remembered. |
2816 */ | 2831 */ |
2817 DART_EXPORT void Dart_RegisterRootServiceRequestCallback( | 2832 DART_EXPORT void Dart_RegisterRootServiceRequestCallback( |
2818 const char* name, | 2833 const char* name, |
2819 Dart_ServiceRequestCallback callback, | 2834 Dart_ServiceRequestCallback callback, |
2820 void* user_data); | 2835 void* user_data); |
2821 | 2836 |
2822 | 2837 |
2823 #endif /* INCLUDE_DART_API_H_ */ /* NOLINT */ | 2838 #endif /* INCLUDE_DART_API_H_ */ /* NOLINT */ |
OLD | NEW |