Changeset 148303 in webkit
- Timestamp:
- Apr 12, 2013 2:39:09 PM (11 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 18 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r148301 r148303 1 2013-04-12 Oliver Hunt <oliver@apple.com> 2 3 make the codegenerator actually emit polymorphism check in the "no vtable" path 4 https://bugs.webkit.org/show_bug.cgi?id=114533 5 6 Reviewed by David Kilzer. 7 8 Make the "no vtable" check correct so that we actually plant a polymorphism 9 check. Update a few interfaces to have the correct validation attributes. 10 11 * Modules/webdatabase/SQLTransaction.idl: 12 * bindings/scripts/CodeGeneratorJS.pm: 13 (GenerateImplementation): 14 * bindings/scripts/test/JS/JSTestInterface.cpp: 15 (WebCore::toJS): 16 * bindings/scripts/test/TestInterface.idl: 17 * html/track/TextTrackCue.idl: 18 * svg/SVGAnimatedAngle.idl: 19 * svg/SVGAnimatedBoolean.idl: 20 * svg/SVGAnimatedEnumeration.idl: 21 * svg/SVGAnimatedInteger.idl: 22 * svg/SVGAnimatedLength.idl: 23 * svg/SVGAnimatedLengthList.idl: 24 * svg/SVGAnimatedNumber.idl: 25 * svg/SVGAnimatedNumberList.idl: 26 * svg/SVGAnimatedPreserveAspectRatio.idl: 27 * svg/SVGAnimatedRect.idl: 28 * svg/SVGAnimatedString.idl: 29 * svg/SVGAnimatedTransformList.idl: 30 1 31 2013-04-12 Oliver Hunt <oliver@apple.com> 2 32 -
trunk/Source/WebCore/Modules/webdatabase/SQLTransaction.idl
r141034 r148303 31 31 OmitConstructor, 32 32 JSNoStaticTables, 33 ImplementationLacksVTable33 SkipVTableValidation 34 34 ] interface SQLTransaction { 35 35 [Custom] void executeSql(in DOMString sqlStatement, -
trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
r148301 r148303 2748 2748 #endif 2749 2749 END 2750 push(@implContent, <<END) if $interface->extendedAttributes->{"ImplementationLacksVTable"} && $vtableNameGnu;2750 push(@implContent, <<END) if $interface->extendedAttributes->{"ImplementationLacksVTable"}; 2751 2751 #if COMPILER(CLANG) 2752 2752 // If you hit this failure the interface definition has the ImplementationLacksVTable -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp
r148301 r148303 500 500 } 501 501 502 #if ENABLE(BINDING_INTEGRITY)503 #if PLATFORM(WIN)504 #pragma warning(disable: 4483)505 extern "C" { extern void (*const __identifier("??_7TestInterface@WebCore@@6B@")[])(); }506 #else507 extern "C" { extern void* _ZTVN7WebCore13TestInterfaceE[]; }508 #endif509 #endif510 502 JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, TestInterface* impl) 511 503 { … … 513 505 return jsNull(); 514 506 if (JSValue result = getExistingWrapper<JSTestInterface>(exec, impl)) return result; 515 516 #if ENABLE(BINDING_INTEGRITY)517 void* actualVTablePointer = *(reinterpret_cast<void**>(impl));518 #if PLATFORM(WIN)519 void* expectedVTablePointer = reinterpret_cast<void*>(__identifier("??_7TestInterface@WebCore@@6B@"));520 #else521 void* expectedVTablePointer = &_ZTVN7WebCore13TestInterfaceE[2];522 507 #if COMPILER(CLANG) 523 // If this fails TestInterface does not have a vtable, so you need to add the 524 // ImplementationLacksVTable attribute to the interface definition 525 COMPILE_ASSERT(__is_polymorphic(TestInterface), TestInterface_is_not_polymorphic); 526 #endif 527 #endif 528 // If you hit this assertion you either have a use after free bug, or 529 // TestInterface has subclasses. If TestInterface has subclasses that get passed 530 // to toJS() we currently require TestInterface you to opt out of binding hardening 531 // by adding the SkipVTableValidation attribute to the interface IDL definition 532 RELEASE_ASSERT(actualVTablePointer == expectedVTablePointer); 508 // If you hit this failure the interface definition has the ImplementationLacksVTable 509 // attribute. You should remove that attribute. If the class has subclasses 510 // that may be passed through this toJS() function you should use the SkipVTableValidation 511 // attribute to TestInterface. 512 COMPILE_ASSERT(!__is_polymorphic(TestInterface), TestInterface_is_polymorphic_but_idl_claims_not_to_be); 533 513 #endif 534 514 return createNewWrapper<JSTestInterface>(exec, globalObject, impl); -
trunk/Source/WebCore/bindings/scripts/test/TestInterface.idl
r140303 r148303 36 36 Constructor(in DOMString str1, in [Optional=DefaultIsUndefined] DOMString str2), 37 37 ConstructorRaisesException, 38 ConstructorConditional=TEST_INTERFACE 38 ConstructorConditional=TEST_INTERFACE, 39 ImplementationLacksVTable 39 40 ] interface TestInterface { 40 41 }; -
trunk/Source/WebCore/html/track/TextTrackCue.idl
r147355 r148303 33 33 JSCustomMarkFunction, 34 34 JSCustomIsReachable, 35 ImplementationLacksVTable35 SkipVTableValidation 36 36 ] interface TextTrackCue { 37 37 readonly attribute TextTrack track; -
trunk/Source/WebCore/svg/SVGAnimatedAngle.idl
r141034 r148303 26 26 [ 27 27 Conditional=SVG, 28 ImplementationLacksVTable28 SkipVTableValidation 29 29 ] interface SVGAnimatedAngle { 30 30 readonly attribute SVGAngle baseVal; -
trunk/Source/WebCore/svg/SVGAnimatedBoolean.idl
r141034 r148303 26 26 [ 27 27 Conditional=SVG, 28 ImplementationLacksVTable28 SkipVTableValidation 29 29 ] interface SVGAnimatedBoolean { 30 30 [StrictTypeChecking] attribute boolean baseVal -
trunk/Source/WebCore/svg/SVGAnimatedEnumeration.idl
r141034 r148303 26 26 [ 27 27 Conditional=SVG, 28 ImplementationLacksVTable28 SkipVTableValidation 29 29 ] interface SVGAnimatedEnumeration { 30 30 [StrictTypeChecking] attribute unsigned short baseVal -
trunk/Source/WebCore/svg/SVGAnimatedInteger.idl
r141034 r148303 26 26 [ 27 27 Conditional=SVG, 28 ImplementationLacksVTable28 SkipVTableValidation 29 29 ] interface SVGAnimatedInteger { 30 30 [StrictTypeChecking] attribute long baseVal -
trunk/Source/WebCore/svg/SVGAnimatedLength.idl
r141034 r148303 26 26 [ 27 27 Conditional=SVG, 28 ImplementationLacksVTable28 SkipVTableValidation 29 29 ] interface SVGAnimatedLength { 30 30 readonly attribute SVGLength baseVal; -
trunk/Source/WebCore/svg/SVGAnimatedLengthList.idl
r141034 r148303 26 26 [ 27 27 Conditional=SVG, 28 ImplementationLacksVTable28 SkipVTableValidation 29 29 ] interface SVGAnimatedLengthList { 30 30 readonly attribute SVGLengthList baseVal; -
trunk/Source/WebCore/svg/SVGAnimatedNumber.idl
r141034 r148303 27 27 [ 28 28 Conditional=SVG, 29 ImplementationLacksVTable29 SkipVTableValidation 30 30 ] interface SVGAnimatedNumber { 31 31 [StrictTypeChecking] attribute float baseVal -
trunk/Source/WebCore/svg/SVGAnimatedNumberList.idl
r141034 r148303 26 26 [ 27 27 Conditional=SVG, 28 ImplementationLacksVTable28 SkipVTableValidation 29 29 ] interface SVGAnimatedNumberList { 30 30 readonly attribute SVGNumberList baseVal; -
trunk/Source/WebCore/svg/SVGAnimatedPreserveAspectRatio.idl
r141034 r148303 26 26 [ 27 27 Conditional=SVG, 28 ImplementationLacksVTable28 SkipVTableValidation 29 29 ] interface SVGAnimatedPreserveAspectRatio { 30 30 readonly attribute SVGPreserveAspectRatio baseVal; -
trunk/Source/WebCore/svg/SVGAnimatedRect.idl
r141034 r148303 26 26 [ 27 27 Conditional=SVG, 28 ImplementationLacksVTable28 SkipVTableValidation 29 29 ] interface SVGAnimatedRect { 30 30 readonly attribute SVGRect baseVal; -
trunk/Source/WebCore/svg/SVGAnimatedString.idl
r141034 r148303 26 26 [ 27 27 Conditional=SVG, 28 ImplementationLacksVTable28 SkipVTableValidation 29 29 ] interface SVGAnimatedString { 30 30 attribute DOMString baseVal -
trunk/Source/WebCore/svg/SVGAnimatedTransformList.idl
r141034 r148303 26 26 [ 27 27 Conditional=SVG, 28 ImplementationLacksVTable28 SkipVTableValidation 29 29 ] interface SVGAnimatedTransformList { 30 30 readonly attribute SVGTransformList baseVal;
Note: See TracChangeset
for help on using the changeset viewer.