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

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

Issue 2647643002: Fix V8 bindings for named constructors to set prototype object correctly (Closed)
Patch Set: Fixed failing test Created 3 years, 11 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 # 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 314 matching lines...) Expand 10 before | Expand all | Expand 10 after
325 # [NamedConstructor] 325 # [NamedConstructor]
326 named_constructor = named_constructor_context(interface) 326 named_constructor = named_constructor_context(interface)
327 327
328 if constructors or custom_constructors or named_constructor: 328 if constructors or custom_constructors or named_constructor:
329 if interface.is_partial: 329 if interface.is_partial:
330 raise Exception('[Constructor] and [NamedConstructor] MUST NOT be' 330 raise Exception('[Constructor] and [NamedConstructor] MUST NOT be'
331 ' specified on partial interface definitions: ' 331 ' specified on partial interface definitions: '
332 '%s' % interface.name) 332 '%s' % interface.name)
333 333
334 includes.add('bindings/core/v8/V8ObjectConstructor.h') 334 includes.add('bindings/core/v8/V8ObjectConstructor.h')
335 includes.add('bindings/core/v8/V8PrivateProperty.h')
Yuki 2017/01/20 05:54:42 nit: You can do this only if named_constructor: Th
sashab 2017/01/25 02:34:51 Done ty! :)
335 includes.add('core/frame/LocalDOMWindow.h') 336 includes.add('core/frame/LocalDOMWindow.h')
336 elif 'Measure' in extended_attributes or 'MeasureAs' in extended_attributes: 337 elif 'Measure' in extended_attributes or 'MeasureAs' in extended_attributes:
337 if not interface.is_partial: 338 if not interface.is_partial:
338 raise Exception('[Measure] or [MeasureAs] specified for interface wi thout a constructor: ' 339 raise Exception('[Measure] or [MeasureAs] specified for interface wi thout a constructor: '
339 '%s' % interface.name) 340 '%s' % interface.name)
340 341
341 # [Unscopable] attributes and methods 342 # [Unscopable] attributes and methods
342 unscopables = [] 343 unscopables = []
343 for attribute in interface.attributes: 344 for attribute in interface.attributes:
344 if 'Unscopable' in attribute.extended_attributes: 345 if 'Unscopable' in attribute.extended_attributes:
(...skipping 1156 matching lines...) Expand 10 before | Expand all | Expand 10 after
1501 extended_attributes = deleter.extended_attributes 1502 extended_attributes = deleter.extended_attributes
1502 is_call_with_script_state = v8_utilities.has_extended_attribute_value(delete r, 'CallWith', 'ScriptState') 1503 is_call_with_script_state = v8_utilities.has_extended_attribute_value(delete r, 'CallWith', 'ScriptState')
1503 is_ce_reactions = 'CEReactions' in extended_attributes 1504 is_ce_reactions = 'CEReactions' in extended_attributes
1504 return { 1505 return {
1505 'is_call_with_script_state': is_call_with_script_state, 1506 'is_call_with_script_state': is_call_with_script_state,
1506 'is_ce_reactions': is_ce_reactions, 1507 'is_ce_reactions': is_ce_reactions,
1507 'is_custom': 'Custom' in extended_attributes, 1508 'is_custom': 'Custom' in extended_attributes,
1508 'is_raises_exception': 'RaisesException' in extended_attributes, 1509 'is_raises_exception': 'RaisesException' in extended_attributes,
1509 'name': cpp_name(deleter), 1510 'name': cpp_name(deleter),
1510 } 1511 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698