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

Side by Side Diff: third_party/WebKit/Source/bindings/scripts/v8_callback_interface.py

Issue 2857853007: Rename |m_scriptState| to |script_state_| in IDL bindings. (Closed)
Patch Set: Created 3 years, 7 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 unified diff | Download patch
OLDNEW
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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698