| Index: runtime/vm/dart_api_impl.cc
|
| diff --git a/runtime/vm/dart_api_impl.cc b/runtime/vm/dart_api_impl.cc
|
| index f30f365fa89b1104eebb6553cabf034f6aa46e91..89d602af857135d890e2efc000a61e066ff23182 100644
|
| --- a/runtime/vm/dart_api_impl.cc
|
| +++ b/runtime/vm/dart_api_impl.cc
|
| @@ -2031,6 +2031,14 @@ DART_EXPORT Dart_Handle Dart_NewInteger(int64_t value) {
|
| }
|
|
|
|
|
| +DART_EXPORT Dart_Handle Dart_NewIntegerFromUint64(uint64_t value) {
|
| + Isolate* isolate = Isolate::Current();
|
| + DARTSCOPE(isolate);
|
| + CHECK_CALLBACK_STATE(isolate);
|
| + return Api::NewHandle(isolate, Integer::NewFromUint64(value));
|
| +}
|
| +
|
| +
|
| DART_EXPORT Dart_Handle Dart_NewIntegerFromHexCString(const char* str) {
|
| Isolate* isolate = Isolate::Current();
|
| DARTSCOPE(isolate);
|
| @@ -2089,8 +2097,9 @@ DART_EXPORT Dart_Handle Dart_IntegerToUint64(Dart_Handle integer,
|
| if (int_obj.IsNull()) {
|
| RETURN_TYPE_ERROR(isolate, integer, Integer);
|
| }
|
| - ASSERT(!int_obj.IsSmi());
|
| - if (int_obj.IsMint() && !int_obj.IsNegative()) {
|
| + if (int_obj.IsSmi()) {
|
| + ASSERT(int_obj.IsNegative());
|
| + } else if (int_obj.IsMint() && !int_obj.IsNegative()) {
|
| *value = int_obj.AsInt64Value();
|
| return Api::Success();
|
| } else {
|
|
|