| Index: runtime/vm/dart_api_impl.cc
|
| diff --git a/runtime/vm/dart_api_impl.cc b/runtime/vm/dart_api_impl.cc
|
| index 6d485a58b0fb29f3345bf970950726ca63ac0ebe..ce7b2585150a740b0e389403eeca97fdf9c3077c 100644
|
| --- a/runtime/vm/dart_api_impl.cc
|
| +++ b/runtime/vm/dart_api_impl.cc
|
| @@ -2302,11 +2302,6 @@ DART_EXPORT Dart_Handle Dart_IntegerToUint64(Dart_Handle integer,
|
| }
|
|
|
|
|
| -static uword BigintAllocate(intptr_t size) {
|
| - return Api::TopScope(Thread::Current())->zone()->AllocUnsafe(size);
|
| -}
|
| -
|
| -
|
| DART_EXPORT Dart_Handle Dart_IntegerToHexCString(Dart_Handle integer,
|
| const char** value) {
|
| API_TIMELINE_DURATION;
|
| @@ -2315,12 +2310,13 @@ DART_EXPORT Dart_Handle Dart_IntegerToHexCString(Dart_Handle integer,
|
| if (int_obj.IsNull()) {
|
| RETURN_TYPE_ERROR(Z, integer, Integer);
|
| }
|
| + Zone* scope_zone = Api::TopScope(Thread::Current())->zone();
|
| if (int_obj.IsSmi() || int_obj.IsMint()) {
|
| const Bigint& bigint = Bigint::Handle(Z,
|
| Bigint::NewFromInt64(int_obj.AsInt64Value()));
|
| - *value = bigint.ToHexCString(BigintAllocate);
|
| + *value = bigint.ToHexCString(scope_zone);
|
| } else {
|
| - *value = Bigint::Cast(int_obj).ToHexCString(BigintAllocate);
|
| + *value = Bigint::Cast(int_obj).ToHexCString(scope_zone);
|
| }
|
| return Api::Success();
|
| }
|
|
|