Chromium Code Reviews| Index: lib/dom/scripts/systemnative.py |
| diff --git a/lib/dom/scripts/systemnative.py b/lib/dom/scripts/systemnative.py |
| index ee1054028c7c1dba41ad027231ddcab6f2b1b8c7..f410895e618cf3852b95956df674bd9254456fd5 100644 |
| --- a/lib/dom/scripts/systemnative.py |
| +++ b/lib/dom/scripts/systemnative.py |
| @@ -679,6 +679,9 @@ class NativeImplementationGenerator(systembase.BaseGenerator): |
| self._cpp_impl_includes.add('"ScriptArguments.h"') |
| self._cpp_impl_includes.add('"ScriptCallStack.h"') |
| cpp_arguments = ['scriptArguments', 'scriptCallStack'] |
| + # WebKit uses scriptArguments to reconstruct last argument, so |
| + # it's not needed and should be just removed. |
| + arguments = arguments[:-1] |
|
podivilov
2012/08/21 12:03:27
It does the opposite to DatabaseBuilder.AddMissing
Anton Muhin
2012/08/21 12:04:33
I'd be glad to, but I need proper signatures for a
|
| if ext_attrs.get('CallWith') == 'ScriptExecutionContext': |
| raises_exceptions = True |
| @@ -687,8 +690,8 @@ class NativeImplementationGenerator(systembase.BaseGenerator): |
| if 'ImplementedBy' in ext_attrs: |
| assert needs_receiver |
| - cpp_arguments.append('receiver') |
| self._cpp_impl_includes.add('"%s.h"' % ext_attrs['ImplementedBy']) |
| + cpp_arguments.append('receiver') |
| if 'NamedConstructor' in ext_attrs: |
| raises_exceptions = True |
| @@ -792,19 +795,11 @@ class NativeImplementationGenerator(systembase.BaseGenerator): |
| ' RefPtr<ScriptCallStack> scriptCallStack(DartUtilities::createScriptCallStack());\n' |
| ' if (!scriptCallStack->size())\n' |
| ' return;\n', |
| - INDEX=len(arguments)) |
| + INDEX=len(arguments) + 1) |
| # Process Dart cpp_arguments. |
| - start_index = 0 |
| - if needs_receiver: |
| - start_index = 1 |
| - for (i, argument) in enumerate(arguments): |
| - if (i == len(arguments) - 1 and |
| - self._interface.id == 'Console' and |
| - argument.id == 'arg'): |
| - # FIXME: we are skipping last argument here because it was added in |
| - # supplemental dart.idl. Cleanup dart.idl and remove this check. |
| - break |
| + start_index = 1 if needs_receiver else 0 |
| + for i, argument in enumerate(arguments): |
| argument_expression = self._GenerateToNative(body_emitter, argument, start_index + i) |
| cpp_arguments.append(argument_expression) |