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

Unified Diff: runtime/vm/object.cc

Issue 269253007: - Fix the external_test.dart as it was relying on outdated (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 6 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 | « runtime/vm/intrinsifier.h ('k') | runtime/vm/parser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object.cc
===================================================================
--- runtime/vm/object.cc (revision 37188)
+++ runtime/vm/object.cc (working copy)
@@ -225,16 +225,20 @@
String& segment = String::Handle();
intptr_t start_pos = 0;
for (intptr_t i = 0; i < name.Length(); i++) {
- if (name.CharAt(i) == '@') {
+ if (name.CharAt(i) == '@' &&
+ (i+1) < name.Length() &&
+ (name.CharAt(i+1) >= '0') &&
+ (name.CharAt(i+1) <= '9')) {
// Append the current segment to the unmangled name.
segment = String::SubString(name, start_pos, (i - start_pos));
unmangled_name = String::Concat(unmangled_name, segment);
- // Advance until past the name mangling.
+ // Advance until past the name mangling. The private keys are only
+ // numbers so we skip until the first non-number.
i++; // Skip the '@'.
while ((i < name.Length()) &&
- (name.CharAt(i) != '&') &&
- (name.CharAt(i) != '.')) {
+ (name.CharAt(i) >= '0') &&
+ (name.CharAt(i) <= '9')) {
i++;
}
start_pos = i;
@@ -9307,7 +9311,7 @@
}
char private_key[32];
OS::SNPrint(private_key, sizeof(private_key),
- "%c%#" Px "", kPrivateKeySeparator, key_value);
+ "%c%" Pd "", kPrivateKeySeparator, key_value);
StorePointer(&raw_ptr()->private_key_, String::New(private_key, Heap::kOld));
}
« no previous file with comments | « runtime/vm/intrinsifier.h ('k') | runtime/vm/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698