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

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: Review feedback Created 3 years, 10 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 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 includes.add('bindings/core/v8/V8HTMLConstructor.h') 289 includes.add('bindings/core/v8/V8HTMLConstructor.h')
290 290
291 # [NamedConstructor] 291 # [NamedConstructor]
292 named_constructor = named_constructor_context(interface) 292 named_constructor = named_constructor_context(interface)
293 293
294 if constructors or custom_constructors or named_constructor: 294 if constructors or custom_constructors or named_constructor:
295 if interface.is_partial: 295 if interface.is_partial:
296 raise Exception('[Constructor] and [NamedConstructor] MUST NOT be' 296 raise Exception('[Constructor] and [NamedConstructor] MUST NOT be'
297 ' specified on partial interface definitions: ' 297 ' specified on partial interface definitions: '
298 '%s' % interface.name) 298 '%s' % interface.name)
299 if named_constructor:
300 includes.add('bindings/core/v8/V8PrivateProperty.h')
299 301
300 includes.add('bindings/core/v8/V8ObjectConstructor.h') 302 includes.add('bindings/core/v8/V8ObjectConstructor.h')
301 includes.add('core/frame/LocalDOMWindow.h') 303 includes.add('core/frame/LocalDOMWindow.h')
302 elif 'Measure' in extended_attributes or 'MeasureAs' in extended_attributes: 304 elif 'Measure' in extended_attributes or 'MeasureAs' in extended_attributes:
303 if not interface.is_partial: 305 if not interface.is_partial:
304 raise Exception('[Measure] or [MeasureAs] specified for interface wi thout a constructor: ' 306 raise Exception('[Measure] or [MeasureAs] specified for interface wi thout a constructor: '
305 '%s' % interface.name) 307 '%s' % interface.name)
306 308
307 # [Unscopable] attributes and methods 309 # [Unscopable] attributes and methods
308 unscopables = [] 310 unscopables = []
(...skipping 1175 matching lines...) Expand 10 before | Expand all | Expand 10 after
1484 extended_attributes = deleter.extended_attributes 1486 extended_attributes = deleter.extended_attributes
1485 is_call_with_script_state = v8_utilities.has_extended_attribute_value(delete r, 'CallWith', 'ScriptState') 1487 is_call_with_script_state = v8_utilities.has_extended_attribute_value(delete r, 'CallWith', 'ScriptState')
1486 is_ce_reactions = 'CEReactions' in extended_attributes 1488 is_ce_reactions = 'CEReactions' in extended_attributes
1487 return { 1489 return {
1488 'is_call_with_script_state': is_call_with_script_state, 1490 'is_call_with_script_state': is_call_with_script_state,
1489 'is_ce_reactions': is_ce_reactions, 1491 'is_ce_reactions': is_ce_reactions,
1490 'is_custom': 'Custom' in extended_attributes, 1492 'is_custom': 'Custom' in extended_attributes,
1491 'is_raises_exception': 'RaisesException' in extended_attributes, 1493 'is_raises_exception': 'RaisesException' in extended_attributes,
1492 'name': cpp_name(deleter), 1494 'name': cpp_name(deleter),
1493 } 1495 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698