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

Side by Side Diff: lib/dom/scripts/systemnative.py

Issue 10540175: Fix DataView constructor and byte accessors. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 6 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 | Annotate | Revision Log
OLDNEW
1 #!/usr/bin/python 1 #!/usr/bin/python
2 # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 2 # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
3 # for details. All rights reserved. Use of this source code is governed by a 3 # for details. All rights reserved. Use of this source code is governed by a
4 # BSD-style license that can be found in the LICENSE file. 4 # BSD-style license that can be found in the LICENSE file.
5 5
6 """This module provides shared functionality for the systems to generate 6 """This module provides shared functionality for the systems to generate
7 native binding from the IDL database.""" 7 native binding from the IDL database."""
8 8
9 import emitter 9 import emitter
10 import os 10 import os
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 self._cpp_resolver_emitter.Emit( 248 self._cpp_resolver_emitter.Emit(
249 ' if (name == "$(INTERFACE_NAME)_constructor_Callback")\n' 249 ' if (name == "$(INTERFACE_NAME)_constructor_Callback")\n'
250 ' return Dart$(INTERFACE_NAME)Internal::constructorCallback;\n', 250 ' return Dart$(INTERFACE_NAME)Internal::constructorCallback;\n',
251 INTERFACE_NAME=self._interface.id) 251 INTERFACE_NAME=self._interface.id)
252 252
253 253
254 constructor_info = AnalyzeConstructor(self._interface) 254 constructor_info = AnalyzeConstructor(self._interface)
255 if constructor_info: 255 if constructor_info:
256 self._EmitFactoryProvider(self._interface.id, constructor_info) 256 self._EmitFactoryProvider(self._interface.id, constructor_info)
257 257
258 if constructor_info is None: 258 if 'CustomConstructor' in self._interface.ext_attrs:
259 # We have a custom implementation for it. 259 # We have a custom implementation for it.
260 self._cpp_declarations_emitter.Emit( 260 self._cpp_declarations_emitter.Emit(
261 '\n' 261 '\n'
262 'void constructorCallback(Dart_NativeArguments);\n') 262 'void constructorCallback(Dart_NativeArguments);\n')
263 return 263 return
264 264
265 raises_dom_exceptions = 'ConstructorRaisesException' in self._interface.ext_ attrs 265 raises_dom_exceptions = 'ConstructorRaisesException' in self._interface.ext_ attrs
266 raises_exceptions = raises_dom_exceptions or len(constructor_info.idl_args) > 0 266 raises_exceptions = raises_dom_exceptions or len(constructor_info.idl_args) > 0
267 arguments = [] 267 arguments = []
268 parameter_definitions_emitter = emitter.Emitter() 268 parameter_definitions_emitter = emitter.Emitter()
(...skipping 781 matching lines...) Expand 10 before | Expand all | Expand 10 after
1050 continue 1050 continue
1051 parent_interface = database.GetInterface(parent.type.id) 1051 parent_interface = database.GetInterface(parent.type.id)
1052 if callback(parent_interface): 1052 if callback(parent_interface):
1053 return parent_interface 1053 return parent_interface
1054 parent_interface = _FindParent(parent_interface, database, callback) 1054 parent_interface = _FindParent(parent_interface, database, callback)
1055 if parent_interface: 1055 if parent_interface:
1056 return parent_interface 1056 return parent_interface
1057 1057
1058 def _IsArgumentOptionalInWebCore(argument): 1058 def _IsArgumentOptionalInWebCore(argument):
1059 return IsOptional(argument) and not 'Callback' in argument.ext_attrs 1059 return IsOptional(argument) and not 'Callback' in argument.ext_attrs
OLDNEW
« no previous file with comments | « lib/dom/scripts/generator.py ('k') | lib/dom/templates/html/frog/factoryprovider_DataView.darttemplate » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698