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

Unified Diff: dart/runtime/lib/mirrors_impl.dart

Issue 59073003: Version 0.8.10.4 (Closed) Base URL: http://dart.googlecode.com/svn/trunk/
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 | « dart/runtime/lib/isolate_patch.dart ('k') | dart/runtime/lib/simd128.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/runtime/lib/mirrors_impl.dart
===================================================================
--- dart/runtime/lib/mirrors_impl.dart (revision 29808)
+++ dart/runtime/lib/mirrors_impl.dart (working copy)
@@ -49,9 +49,10 @@
void clear() => _throw();
}
-// These values are allowed to be passed directly over the wire.
-bool _isSimpleValue(var value) {
- return (value == null || value is num || value is String || value is bool);
+class _InternalMirrorError {
+ const _InternalMirrorError(String this._msg);
+ String toString() => _msg;
+ final String _msg;
}
Map _filterMap(Map<Symbol, dynamic> old_map, bool filter(Symbol key, value)) {
@@ -216,19 +217,6 @@
value);
return reflect(value);
}
-
- static _validateArgument(int i, Object arg)
- {
- if (arg is Mirror) {
- if (arg is! InstanceMirror) {
- throw new MirrorException(
- 'positional argument $i ($arg) was not an InstanceMirror');
- }
- } else if (!_isSimpleValue(arg)) {
- throw new MirrorException(
- 'positional argument $i ($arg) was not a simple value');
- }
- }
}
class _LocalInstanceMirrorImpl extends _LocalObjectMirrorImpl
@@ -1252,7 +1240,7 @@
} else {
var parts = MirrorSystem.getName(simpleName).split('.');
if (parts.length > 2) {
- throw new MirrorException(
+ throw new _InternalMirrorError(
'Internal error in MethodMirror.constructorName: '
'malformed name <$simpleName>');
} else if (parts.length == 2) {
« no previous file with comments | « dart/runtime/lib/isolate_patch.dart ('k') | dart/runtime/lib/simd128.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698