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

Unified Diff: lib/math.cc

Issue 10909152: Fix for issue 4808 (The vm crashes when parseInt is called with string containing a $). (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 8 years, 3 months 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: lib/math.cc
===================================================================
--- lib/math.cc (revision 12139)
+++ lib/math.cc (working copy)
@@ -104,7 +104,8 @@
DEFINE_NATIVE_ENTRY(MathNatives_parseInt, 1) {
GET_NATIVE_ARGUMENT(String, value, arguments->At(0));
- Scanner scanner(value, String::Handle());
+ const String& dummy_key = String::Handle(Symbols::Empty());
+ Scanner scanner(value, dummy_key);
const Scanner::GrowableTokenStream& tokens = scanner.GetStream();
String* int_string;
bool is_positive;
@@ -128,7 +129,8 @@
DEFINE_NATIVE_ENTRY(MathNatives_parseDouble, 1) {
GET_NATIVE_ARGUMENT(String, value, arguments->At(0));
- Scanner scanner(value, String::Handle());
+ const String& dummy_key = String::Handle(Symbols::Empty());
+ Scanner scanner(value, dummy_key);
const Scanner::GrowableTokenStream& tokens = scanner.GetStream();
String* number_string;
bool is_positive;
« 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