Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(655)

Unified Diff: runtime/lib/integers.cc

Issue 53993004: Change integer canonicalization to use CheckAndCanonicalize (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 =
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698