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

Side by Side Diff: Source/bindings/scripts/v8_interface.py

Issue 793243004: IDL: Properly support [Exposed] on static methods (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years 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 # coding=utf-8 2 # coding=utf-8
3 # 3 #
4 # Redistribution and use in source and binary forms, with or without 4 # Redistribution and use in source and binary forms, with or without
5 # modification, are permitted provided that the following conditions are 5 # modification, are permitted provided that the following conditions are
6 # met: 6 # met:
7 # 7 #
8 # * Redistributions of source code must retain the above copyright 8 # * Redistributions of source code must retain the above copyright
9 # notice, this list of conditions and the following disclaimer. 9 # notice, this list of conditions and the following disclaimer.
10 # * Redistributions in binary form must reproduce the above 10 # * Redistributions in binary form must reproduce the above
(...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after
373 has_custom_registration = (overloads['has_custom_registration_all'] or 373 has_custom_registration = (overloads['has_custom_registration_all'] or
374 overloads['runtime_determined_lengths']) 374 overloads['runtime_determined_lengths'])
375 else: 375 else:
376 if not method['visible']: 376 if not method['visible']:
377 continue 377 continue
378 per_context_enabled_function = method['per_context_enabled_function' ] 378 per_context_enabled_function = method['per_context_enabled_function' ]
379 conditionally_exposed_function = method['exposed_test'] 379 conditionally_exposed_function = method['exposed_test']
380 runtime_enabled_function = method['runtime_enabled_function'] 380 runtime_enabled_function = method['runtime_enabled_function']
381 has_custom_registration = method['has_custom_registration'] 381 has_custom_registration = method['has_custom_registration']
382 382
383 if has_custom_registration:
384 custom_registration_methods.append(method)
385 continue
383 if per_context_enabled_function or conditionally_exposed_function: 386 if per_context_enabled_function or conditionally_exposed_function:
384 conditionally_enabled_methods.append(method) 387 conditionally_enabled_methods.append(method)
385 continue 388 continue
386 if runtime_enabled_function or has_custom_registration: 389 if runtime_enabled_function:
387 custom_registration_methods.append(method) 390 custom_registration_methods.append(method)
Jens Widell 2014/12/15 12:22:34 So, I split 'has_custom_registration' away from 'r
388 continue 391 continue
389 if method['should_be_exposed_to_script']: 392 if method['should_be_exposed_to_script']:
390 method_configuration_methods.append(method) 393 method_configuration_methods.append(method)
391 394
392 for method in methods: 395 for method in methods:
393 # The value of the Function object’s “length” property is a Number 396 # The value of the Function object’s “length” property is a Number
394 # determined as follows: 397 # determined as follows:
395 # 1. Let S be the effective overload set for regular operations (if the 398 # 1. Let S be the effective overload set for regular operations (if the
396 # operation is a regular operation) or for static operations (if the 399 # operation is a regular operation) or for static operations (if the
397 # operation is a static operation) with identifier id on interface I and 400 # operation is a static operation) with identifier id on interface I and
(...skipping 862 matching lines...) Expand 10 before | Expand all | Expand 10 after
1260 deleter = next( 1263 deleter = next(
1261 method 1264 method
1262 for method in interface.operations 1265 for method in interface.operations
1263 if ('deleter' in method.specials and 1266 if ('deleter' in method.specials and
1264 len(method.arguments) == 1 and 1267 len(method.arguments) == 1 and
1265 str(method.arguments[0].idl_type) == 'DOMString')) 1268 str(method.arguments[0].idl_type) == 'DOMString'))
1266 except StopIteration: 1269 except StopIteration:
1267 return None 1270 return None
1268 1271
1269 return property_deleter(deleter) 1272 return property_deleter(deleter)
OLDNEW
« no previous file with comments | « no previous file | Source/bindings/templates/interface_base.cpp » ('j') | Source/bindings/tests/results/core/V8TestInterface.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698