Index: runtime/lib/integers.cc |
diff --git a/runtime/lib/integers.cc b/runtime/lib/integers.cc |
index 4ee0a0cd14fb1428592d0be6d418b007f677e7f7..4e64ea5ae04a625956daee125dd9f2c7cf296d94 100644 |
--- a/runtime/lib/integers.cc |
+++ b/runtime/lib/integers.cc |
@@ -248,8 +248,7 @@ DEFINE_NATIVE_ENTRY(Integer_fromEnvironment, 3) { |
const Integer& result = Integer::Handle(ParseInteger(value)); |
if (!result.IsNull()) { |
if (result.IsSmi()) return result.raw(); |
- return Integer::NewCanonical(String::Handle( |
- String::New(result.ToCString()))); |
+ return result.CheckAndCanonicalize(NULL); |
} |
} else if (Dart_IsError(response)) { |
const Object& error = |