| OLD | NEW |
| 1 # Copyright (C) 2013 Google Inc. All rights reserved. | 1 # Copyright (C) 2013 Google Inc. All rights reserved. |
| 2 # | 2 # |
| 3 # Redistribution and use in source and binary forms, with or without | 3 # Redistribution and use in source and binary forms, with or without |
| 4 # modification, are permitted provided that the following conditions are | 4 # modification, are permitted provided that the following conditions are |
| 5 # met: | 5 # met: |
| 6 # | 6 # |
| 7 # * Redistributions of source code must retain the above copyright | 7 # * Redistributions of source code must retain the above copyright |
| 8 # notice, this list of conditions and the following disclaimer. | 8 # notice, this list of conditions and the following disclaimer. |
| 9 # * Redistributions in binary form must reproduce the above | 9 # * Redistributions in binary form must reproduce the above |
| 10 # copyright notice, this list of conditions and the following disclaimer | 10 # copyright notice, this list of conditions and the following disclaimer |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 context.update(arguments_context(operation.arguments, | 131 context.update(arguments_context(operation.arguments, |
| 132 call_with_this_handle)) | 132 call_with_this_handle)) |
| 133 return context | 133 return context |
| 134 | 134 |
| 135 | 135 |
| 136 def arguments_context(arguments, call_with_this_handle): | 136 def arguments_context(arguments, call_with_this_handle): |
| 137 def argument_context(argument): | 137 def argument_context(argument): |
| 138 return { | 138 return { |
| 139 'handle': '%sHandle' % argument.name, | 139 'handle': '%sHandle' % argument.name, |
| 140 'cpp_value_to_v8_value': argument.idl_type.cpp_value_to_v8_value( | 140 'cpp_value_to_v8_value': argument.idl_type.cpp_value_to_v8_value( |
| 141 argument.name, isolate='m_scriptState->GetIsolate()', | 141 argument.name, isolate='script_state_->GetIsolate()', |
| 142 creation_context='m_scriptState->GetContext()->Global()'), | 142 creation_context='script_state_->GetContext()->Global()'), |
| 143 } | 143 } |
| 144 | 144 |
| 145 argument_declarations = ['ScriptValue thisValue'] if call_with_this_handle e
lse [] | 145 argument_declarations = ['ScriptValue thisValue'] if call_with_this_handle e
lse [] |
| 146 argument_declarations.extend( | 146 argument_declarations.extend( |
| 147 '%s %s' % (argument.idl_type.callback_cpp_type, argument.name) | 147 '%s %s' % (argument.idl_type.callback_cpp_type, argument.name) |
| 148 for argument in arguments) | 148 for argument in arguments) |
| 149 return { | 149 return { |
| 150 'argument_declarations': argument_declarations, | 150 'argument_declarations': argument_declarations, |
| 151 'arguments': [argument_context(argument) for argument in arguments], | 151 'arguments': [argument_context(argument) for argument in arguments], |
| 152 } | 152 } |
| OLD | NEW |