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

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

Issue 340943002: ServiceWorker: Update IDLs to use ScalarValueString (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Add URLs and one real test case Created 6 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 # 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 743 matching lines...) Expand 10 before | Expand all | Expand 10 after
754 754
755 # (Perform automatic type conversion, in order. If any of these match, 755 # (Perform automatic type conversion, in order. If any of these match,
756 # that’s the end, and no other tests are needed.) To keep this code simple, 756 # that’s the end, and no other tests are needed.) To keep this code simple,
757 # we rely on the C++ compiler's dead code elimination to deal with the 757 # we rely on the C++ compiler's dead code elimination to deal with the
758 # redundancy if both cases below trigger. 758 # redundancy if both cases below trigger.
759 759
760 # 11. Otherwise: if there is an entry in S that has one of the following 760 # 11. Otherwise: if there is an entry in S that has one of the following
761 # types at position i of its type list, 761 # types at position i of its type list,
762 # • DOMString 762 # • DOMString
763 # • an enumeration type 763 # • an enumeration type
764 # * ByteString
765 # Blink: ScalarValueString is a pending Web IDL addition
764 try: 766 try:
765 method = next(method for idl_type, method in idl_types_methods 767 method = next(method for idl_type, method in idl_types_methods
766 if idl_type.name == 'String' or idl_type.is_enum) 768 if idl_type.name in ('String',
769 'ByteString',
770 'ScalarValueString') or
771 idl_type.is_enum)
767 yield 'true', method 772 yield 'true', method
768 except StopIteration: 773 except StopIteration:
769 pass 774 pass
770 775
771 # 12. Otherwise: if there is an entry in S that has one of the following 776 # 12. Otherwise: if there is an entry in S that has one of the following
772 # types at position i of its type list, 777 # types at position i of its type list,
773 # • a numeric type 778 # • a numeric type
774 try: 779 try:
775 method = next(method for idl_type, method in idl_types_methods 780 method = next(method for idl_type, method in idl_types_methods
776 if idl_type.is_numeric_type) 781 if idl_type.is_numeric_type)
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after
1073 deleter = next( 1078 deleter = next(
1074 method 1079 method
1075 for method in interface.operations 1080 for method in interface.operations
1076 if ('deleter' in method.specials and 1081 if ('deleter' in method.specials and
1077 len(method.arguments) == 1 and 1082 len(method.arguments) == 1 and
1078 str(method.arguments[0].idl_type) == 'DOMString')) 1083 str(method.arguments[0].idl_type) == 'DOMString'))
1079 except StopIteration: 1084 except StopIteration:
1080 return None 1085 return None
1081 1086
1082 return property_deleter(deleter) 1087 return property_deleter(deleter)
OLDNEW
« no previous file with comments | « LayoutTests/http/tests/serviceworker/resources/request-worker.js ('k') | Source/modules/serviceworkers/Client.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698