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

Unified Diff: runtime/lib/errors_patch.dart

Issue 326263002: Add missing demangling to the VM's NoSuchMethodError. Ensure the NoSuchMethorError for reflective i… (Closed) Base URL: https://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 | « no previous file | runtime/lib/mirrors.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/lib/errors_patch.dart
diff --git a/runtime/lib/errors_patch.dart b/runtime/lib/errors_patch.dart
index 520c9a95afff86338c0a78a6a780481955081504..3dc0e54bb8dadcd37d46f35ffd5b28bbffee5884 100644
--- a/runtime/lib/errors_patch.dart
+++ b/runtime/lib/errors_patch.dart
@@ -2,6 +2,8 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
+import 'dart:mirrors' show MirrorSystem;
+
patch class Error {
/* patch */ static String _objectToString(Object object) {
return Object._toString(object);
@@ -216,7 +218,7 @@ patch class NoSuchMethodError {
var args_message = args_mismatch ? " with matching arguments" : "";
var msg;
var memberName =
- (_memberName == null) ? "" : internal.Symbol.getName(_memberName);
+ (_memberName == null) ? "" : MirrorSystem.getName(_memberName);
if (type == _InvocationMirror._LOCAL_VAR) {
return "cannot assign to final variable '$memberName'.\n\n";
@@ -280,7 +282,7 @@ patch class NoSuchMethodError {
if (i > 0) {
actual_buf.write(", ");
}
- actual_buf.write(internal.Symbol.getName(key));
+ actual_buf.write(MirrorSystem.getName(key));
actual_buf.write(": ");
actual_buf.write(Error.safeToString(value));
i++;
@@ -297,7 +299,7 @@ patch class NoSuchMethodError {
receiver_str = Error.safeToString(_receiver);
}
var memberName =
- (_memberName == null) ? "" : internal.Symbol.getName(_memberName);
+ (_memberName == null) ? "" : MirrorSystem.getName(_memberName);
var type = _invocation_type & _InvocationMirror._TYPE_MASK;
if (type == _InvocationMirror._LOCAL_VAR) {
msg_buf.write(
« no previous file with comments | « no previous file | runtime/lib/mirrors.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698