/* Native methods. */ void IfNull(Dart_NativeArguments arguments) { Dart_Handle object = Dart_GetNativeArgument(arguments, 0); if (Dart_IsNull(object)) { Dart_SetReturnValue(arguments, Dart_GetNativeArgument(arguments, 1)); } else { Dart_SetReturnValue(arguments, object); } }
void platformServicePort(Dart_NativeArguments arguments) { Dart_EnterScope(); Dart_SetReturnValue(arguments, Dart_Null()); Dart_Port service_port = Dart_NewNativePort("PlatformService", wrappedPlatformService, true); if (service_port != ILLEGAL_PORT) { Dart_Handle send_port = HandleError(Dart_NewSendPort(service_port)); Dart_SetReturnValue(arguments, send_port); } Dart_ExitScope(); }
void getVersion(Dart_NativeArguments arguments) { Dart_EnterScope(); Dart_Handle result = Dart_NewInteger(PDFLIB_MAJORVERSION); Dart_SetReturnValue(arguments, result); Dart_ExitScope(); }