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

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: Rebase Created 3 years, 9 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 279 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 includes.add('bindings/core/v8/V8HTMLConstructor.h') 290 includes.add('bindings/core/v8/V8HTMLConstructor.h')
291 291
292 # [NamedConstructor] 292 # [NamedConstructor]
293 named_constructor = named_constructor_context(interface) 293 named_constructor = named_constructor_context(interface)
294 294
295 if constructors or custom_constructors or named_constructor: 295 if constructors or custom_constructors or named_constructor:
296 if interface.is_partial: 296 if interface.is_partial:
297 raise Exception('[Constructor] and [NamedConstructor] MUST NOT be' 297 raise Exception('[Constructor] and [NamedConstructor] MUST NOT be'
298 ' specified on partial interface definitions: ' 298 ' specified on partial interface definitions: '
299 '%s' % interface.name) 299 '%s' % interface.name)
300 if named_constructor:
301 includes.add('bindings/core/v8/V8PrivateProperty.h')
300 302
301 includes.add('bindings/core/v8/V8ObjectConstructor.h') 303 includes.add('bindings/core/v8/V8ObjectConstructor.h')
302 includes.add('core/frame/LocalDOMWindow.h') 304 includes.add('core/frame/LocalDOMWindow.h')
303 elif 'Measure' in extended_attributes or 'MeasureAs' in extended_attributes: 305 elif 'Measure' in extended_attributes or 'MeasureAs' in extended_attributes:
304 if not interface.is_partial: 306 if not interface.is_partial:
305 raise Exception('[Measure] or [MeasureAs] specified for interface wi thout a constructor: ' 307 raise Exception('[Measure] or [MeasureAs] specified for interface wi thout a constructor: '
306 '%s' % interface.name) 308 '%s' % interface.name)
307 309
308 # [Unscopable] attributes and methods 310 # [Unscopable] attributes and methods
309 unscopables = [] 311 unscopables = []
(...skipping 1060 matching lines...) Expand 10 before | Expand all | Expand 10 after
1370 extended_attributes = deleter.extended_attributes 1372 extended_attributes = deleter.extended_attributes
1371 is_call_with_script_state = v8_utilities.has_extended_attribute_value(delete r, 'CallWith', 'ScriptState') 1373 is_call_with_script_state = v8_utilities.has_extended_attribute_value(delete r, 'CallWith', 'ScriptState')
1372 is_ce_reactions = 'CEReactions' in extended_attributes 1374 is_ce_reactions = 'CEReactions' in extended_attributes
1373 return { 1375 return {
1374 'is_call_with_script_state': is_call_with_script_state, 1376 'is_call_with_script_state': is_call_with_script_state,
1375 'is_ce_reactions': is_ce_reactions, 1377 'is_ce_reactions': is_ce_reactions,
1376 'is_custom': 'Custom' in extended_attributes, 1378 'is_custom': 'Custom' in extended_attributes,
1377 'is_raises_exception': 'RaisesException' in extended_attributes, 1379 'is_raises_exception': 'RaisesException' in extended_attributes,
1378 'name': cpp_name(deleter), 1380 'name': cpp_name(deleter),
1379 } 1381 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698