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

Unified Diff: lib/html/templates/html/impl/impl_Element.darttemplate

Issue 11231074: Change signature of noSuchMethod to take an InvocationMirror. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: One more test expectation Created 8 years, 2 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 | « lib/html/dartium/html_dartium.dart ('k') | pkg/pkg.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/html/templates/html/impl/impl_Element.darttemplate
diff --git a/lib/html/templates/html/impl/impl_Element.darttemplate b/lib/html/templates/html/impl/impl_Element.darttemplate
index 6be2882b7bcc77ac384753a5376af03c02520628..092743d947a8d91aeacffb59a24adf1a57817685 100644
--- a/lib/html/templates/html/impl/impl_Element.darttemplate
+++ b/lib/html/templates/html/impl/impl_Element.darttemplate
@@ -738,11 +738,18 @@ class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
var xtag;
$if DARTIUM
- noSuchMethod(String name, List args) {
+ noSuchMethod(InvocationMirror invocation) {
if (dynamicUnknownElementDispatcher == null) {
- throw new NoSuchMethodError(this, name, args);
+ throw new NoSuchMethodError(this, invocation.memberName,
+ invocation.positionalArguments,
+ invocation.namedArguments);
} else {
- return dynamicUnknownElementDispatcher(this, name, args);
+ String hackedName = invocation.memberName;
+ if (invocation.isGetter) hackedName = "get:$hackedName";
+ if (invocation.isSetter) hackedName = "set:$hackedName";
+ return dynamicUnknownElementDispatcher(this,
+ hackedName,
+ invociation.positionalArguments);
}
}
$else
« no previous file with comments | « lib/html/dartium/html_dartium.dart ('k') | pkg/pkg.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698