| Index: tools/dom/src/native_DOMImplementation.dart
|
| diff --git a/tools/dom/src/native_DOMImplementation.dart b/tools/dom/src/native_DOMImplementation.dart
|
| index 2a063c0f491e188066d7cad1a7b6f1d6f5388473..65e117b44a35163a0e5c4ad992d8993be92c4630 100644
|
| --- a/tools/dom/src/native_DOMImplementation.dart
|
| +++ b/tools/dom/src/native_DOMImplementation.dart
|
| @@ -15,6 +15,8 @@ class _ConsoleVariables {
|
| if (invocation.isGetter) {
|
| return _data[member];
|
| } else if (invocation.isSetter) {
|
| + assert(member.endsWith('='));
|
| + member = member.substring(0, member.length - 1);
|
| _data[member] = invocation.positionalArguments[0];
|
| } else {
|
| return Function.apply(_data[member], invocation.positionalArguments, invocation.namedArguments);
|
| @@ -133,7 +135,9 @@ class _Utils {
|
| * expression for a closure with a body matching the original expression
|
| * where locals are passed in as arguments. Returns a list containing the
|
| * String expression for the closure and the list of arguments that should
|
| - * be passed to it.
|
| + * be passed to it. The expression should then be evaluated using
|
| + * Dart_EvaluateExpr which will generate a closure that should be invoked
|
| + * with the list of arguments passed to this method.
|
| *
|
| * For example:
|
| * <code>wrapExpressionAsClosure("foo + bar", ["bar", 40, "foo", 2])</code>
|
| @@ -146,6 +150,12 @@ class _Utils {
|
| addArg(arg, value) {
|
| arg = stripMemberName(arg);
|
| if (args.containsKey(arg)) return;
|
| + // We ignore arguments with the name 'this' rather than throwing an
|
| + // exception because Dart_GetLocalVariables includes 'this' and it
|
| + // is more convenient to filter it out here than from C++ code.
|
| + // 'this' needs to be handled by calling Dart_EvaluateExpr with
|
| + // 'this' as the target rather than by passing it as an argument.
|
| + if (arg == 'this') return;
|
| if (args.isNotEmpty) {
|
| sb.write(", ");
|
| }
|
|
|