Changeset 148301 in webkit
- Timestamp:
- Apr 12, 2013 1:28:55 PM (11 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r148300 r148301 1 2013-04-12 Oliver Hunt <oliver@apple.com> 2 3 Make CodeGeneratorJS plant comments to explain failures in the binding validation 4 https://bugs.webkit.org/show_bug.cgi?id=114528 5 6 Reviewed by Sam Weinig. 7 8 No change in behaviour, just make the generated bindings include comments 9 to aid diagnosing issues that may be non-obvious. 10 11 * bindings/scripts/CodeGeneratorJS.pm: 12 (GenerateImplementation): 13 * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp: 14 (WebCore::toJS): 15 * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp: 16 (WebCore::toJS): 17 * bindings/scripts/test/JS/JSTestEventConstructor.cpp: 18 (WebCore::toJS): 19 * bindings/scripts/test/JS/JSTestEventTarget.cpp: 20 (WebCore::toJS): 21 * bindings/scripts/test/JS/JSTestException.cpp: 22 (WebCore::toJS): 23 * bindings/scripts/test/JS/JSTestInterface.cpp: 24 (WebCore::toJS): 25 * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp: 26 (WebCore::toJS): 27 * bindings/scripts/test/JS/JSTestNamedConstructor.cpp: 28 (WebCore::toJS): 29 * bindings/scripts/test/JS/JSTestObj.cpp: 30 (WebCore::toJS): 31 * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp: 32 (WebCore::toJS): 33 * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp: 34 (WebCore::toJS): 35 * bindings/scripts/test/JS/JSTestTypedefs.cpp: 36 (WebCore::toJS): 37 1 38 2013-04-12 Tim Horton <timothy_horton@apple.com> 2 39 -
trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
r148260 r148301 2736 2736 void* expectedVTablePointer = ${vtableRefGnu}; 2737 2737 #if COMPILER(CLANG) 2738 // If this fails $implType does not have a vtable, so you need to add the 2739 // ImplementationLacksVTable attribute to the interface definition 2738 2740 COMPILE_ASSERT(__is_polymorphic($implType), ${implType}_is_not_polymorphic); 2739 2741 #endif 2740 2742 #endif 2743 // If you hit this assertion you either have a use after free bug, or 2744 // $implType has subclasses. If $implType has subclasses that get passed 2745 // to toJS() we currently require $interfaceName you to opt out of binding hardening 2746 // by adding the SkipVTableValidation attribute to the interface IDL definition 2741 2747 RELEASE_ASSERT(actualVTablePointer == expectedVTablePointer); 2742 2748 #endif … … 2744 2750 push(@implContent, <<END) if $interface->extendedAttributes->{"ImplementationLacksVTable"} && $vtableNameGnu; 2745 2751 #if COMPILER(CLANG) 2746 COMPILE_ASSERT(!__is_polymorphic($implType), ${implType}_is_polymorphic_but_idl_claims_not_to_be); 2752 // If you hit this failure the interface definition has the ImplementationLacksVTable 2753 // attribute. You should remove that attribute. If the class has subclasses 2754 // that may be passed through this toJS() function you should use the SkipVTableValidation 2755 // attribute to $interfaceName. 2756 COMPILE_ASSERT(!__is_polymorphic($implType), ${implType}_is_polymorphic_but_idl_claims_not_to_be); 2747 2757 #endif 2748 2758 END -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestActiveDOMObject.cpp
r148260 r148301 257 257 void* expectedVTablePointer = &_ZTVN7WebCore19TestActiveDOMObjectE[2]; 258 258 #if COMPILER(CLANG) 259 // If this fails TestActiveDOMObject does not have a vtable, so you need to add the 260 // ImplementationLacksVTable attribute to the interface definition 259 261 COMPILE_ASSERT(__is_polymorphic(TestActiveDOMObject), TestActiveDOMObject_is_not_polymorphic); 260 262 #endif 261 263 #endif 264 // If you hit this assertion you either have a use after free bug, or 265 // TestActiveDOMObject has subclasses. If TestActiveDOMObject has subclasses that get passed 266 // to toJS() we currently require TestActiveDOMObject you to opt out of binding hardening 267 // by adding the SkipVTableValidation attribute to the interface IDL definition 262 268 RELEASE_ASSERT(actualVTablePointer == expectedVTablePointer); 263 269 #endif -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp
r148260 r148301 241 241 void* expectedVTablePointer = &_ZTVN7WebCore21TestCustomNamedGetterE[2]; 242 242 #if COMPILER(CLANG) 243 // If this fails TestCustomNamedGetter does not have a vtable, so you need to add the 244 // ImplementationLacksVTable attribute to the interface definition 243 245 COMPILE_ASSERT(__is_polymorphic(TestCustomNamedGetter), TestCustomNamedGetter_is_not_polymorphic); 244 246 #endif 245 247 #endif 248 // If you hit this assertion you either have a use after free bug, or 249 // TestCustomNamedGetter has subclasses. If TestCustomNamedGetter has subclasses that get passed 250 // to toJS() we currently require TestCustomNamedGetter you to opt out of binding hardening 251 // by adding the SkipVTableValidation attribute to the interface IDL definition 246 252 RELEASE_ASSERT(actualVTablePointer == expectedVTablePointer); 247 253 #endif -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestEventConstructor.cpp
r148260 r148301 256 256 void* expectedVTablePointer = &_ZTVN7WebCore20TestEventConstructorE[2]; 257 257 #if COMPILER(CLANG) 258 // If this fails TestEventConstructor does not have a vtable, so you need to add the 259 // ImplementationLacksVTable attribute to the interface definition 258 260 COMPILE_ASSERT(__is_polymorphic(TestEventConstructor), TestEventConstructor_is_not_polymorphic); 259 261 #endif 260 262 #endif 263 // If you hit this assertion you either have a use after free bug, or 264 // TestEventConstructor has subclasses. If TestEventConstructor has subclasses that get passed 265 // to toJS() we currently require TestEventConstructor you to opt out of binding hardening 266 // by adding the SkipVTableValidation attribute to the interface IDL definition 261 267 RELEASE_ASSERT(actualVTablePointer == expectedVTablePointer); 262 268 #endif -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestEventTarget.cpp
r148260 r148301 362 362 void* expectedVTablePointer = &_ZTVN7WebCore15TestEventTargetE[2]; 363 363 #if COMPILER(CLANG) 364 // If this fails TestEventTarget does not have a vtable, so you need to add the 365 // ImplementationLacksVTable attribute to the interface definition 364 366 COMPILE_ASSERT(__is_polymorphic(TestEventTarget), TestEventTarget_is_not_polymorphic); 365 367 #endif 366 368 #endif 369 // If you hit this assertion you either have a use after free bug, or 370 // TestEventTarget has subclasses. If TestEventTarget has subclasses that get passed 371 // to toJS() we currently require TestEventTarget you to opt out of binding hardening 372 // by adding the SkipVTableValidation attribute to the interface IDL definition 367 373 RELEASE_ASSERT(actualVTablePointer == expectedVTablePointer); 368 374 #endif -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestException.cpp
r148260 r148301 198 198 void* expectedVTablePointer = &_ZTVN7WebCore13TestExceptionE[2]; 199 199 #if COMPILER(CLANG) 200 // If this fails TestException does not have a vtable, so you need to add the 201 // ImplementationLacksVTable attribute to the interface definition 200 202 COMPILE_ASSERT(__is_polymorphic(TestException), TestException_is_not_polymorphic); 201 203 #endif 202 204 #endif 205 // If you hit this assertion you either have a use after free bug, or 206 // TestException has subclasses. If TestException has subclasses that get passed 207 // to toJS() we currently require TestException you to opt out of binding hardening 208 // by adding the SkipVTableValidation attribute to the interface IDL definition 203 209 RELEASE_ASSERT(actualVTablePointer == expectedVTablePointer); 204 210 #endif -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp
r148260 r148301 521 521 void* expectedVTablePointer = &_ZTVN7WebCore13TestInterfaceE[2]; 522 522 #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 523 525 COMPILE_ASSERT(__is_polymorphic(TestInterface), TestInterface_is_not_polymorphic); 524 526 #endif 525 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 526 532 RELEASE_ASSERT(actualVTablePointer == expectedVTablePointer); 527 533 #endif -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp
r148260 r148301 219 219 void* expectedVTablePointer = &_ZTVN7WebCore26TestMediaQueryListListenerE[2]; 220 220 #if COMPILER(CLANG) 221 // If this fails TestMediaQueryListListener does not have a vtable, so you need to add the 222 // ImplementationLacksVTable attribute to the interface definition 221 223 COMPILE_ASSERT(__is_polymorphic(TestMediaQueryListListener), TestMediaQueryListListener_is_not_polymorphic); 222 224 #endif 223 225 #endif 226 // If you hit this assertion you either have a use after free bug, or 227 // TestMediaQueryListListener has subclasses. If TestMediaQueryListListener has subclasses that get passed 228 // to toJS() we currently require TestMediaQueryListListener you to opt out of binding hardening 229 // by adding the SkipVTableValidation attribute to the interface IDL definition 224 230 RELEASE_ASSERT(actualVTablePointer == expectedVTablePointer); 225 231 #endif -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNamedConstructor.cpp
r148260 r148301 233 233 void* expectedVTablePointer = &_ZTVN7WebCore20TestNamedConstructorE[2]; 234 234 #if COMPILER(CLANG) 235 // If this fails TestNamedConstructor does not have a vtable, so you need to add the 236 // ImplementationLacksVTable attribute to the interface definition 235 237 COMPILE_ASSERT(__is_polymorphic(TestNamedConstructor), TestNamedConstructor_is_not_polymorphic); 236 238 #endif 237 239 #endif 240 // If you hit this assertion you either have a use after free bug, or 241 // TestNamedConstructor has subclasses. If TestNamedConstructor has subclasses that get passed 242 // to toJS() we currently require TestNamedConstructor you to opt out of binding hardening 243 // by adding the SkipVTableValidation attribute to the interface IDL definition 238 244 RELEASE_ASSERT(actualVTablePointer == expectedVTablePointer); 239 245 #endif -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp
r148260 r148301 3103 3103 void* expectedVTablePointer = &_ZTVN7WebCore7TestObjE[2]; 3104 3104 #if COMPILER(CLANG) 3105 // If this fails TestObj does not have a vtable, so you need to add the 3106 // ImplementationLacksVTable attribute to the interface definition 3105 3107 COMPILE_ASSERT(__is_polymorphic(TestObj), TestObj_is_not_polymorphic); 3106 3108 #endif 3107 3109 #endif 3110 // If you hit this assertion you either have a use after free bug, or 3111 // TestObj has subclasses. If TestObj has subclasses that get passed 3112 // to toJS() we currently require TestObj you to opt out of binding hardening 3113 // by adding the SkipVTableValidation attribute to the interface IDL definition 3108 3114 RELEASE_ASSERT(actualVTablePointer == expectedVTablePointer); 3109 3115 #endif -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp
r148260 r148301 263 263 void* expectedVTablePointer = &_ZTVN7WebCore26TestOverloadedConstructorsE[2]; 264 264 #if COMPILER(CLANG) 265 // If this fails TestOverloadedConstructors does not have a vtable, so you need to add the 266 // ImplementationLacksVTable attribute to the interface definition 265 267 COMPILE_ASSERT(__is_polymorphic(TestOverloadedConstructors), TestOverloadedConstructors_is_not_polymorphic); 266 268 #endif 267 269 #endif 270 // If you hit this assertion you either have a use after free bug, or 271 // TestOverloadedConstructors has subclasses. If TestOverloadedConstructors has subclasses that get passed 272 // to toJS() we currently require TestOverloadedConstructors you to opt out of binding hardening 273 // by adding the SkipVTableValidation attribute to the interface IDL definition 268 274 RELEASE_ASSERT(actualVTablePointer == expectedVTablePointer); 269 275 #endif -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp
r148260 r148301 411 411 void* expectedVTablePointer = &_ZTVN7WebCore34TestSerializedScriptValueInterfaceE[2]; 412 412 #if COMPILER(CLANG) 413 // If this fails TestSerializedScriptValueInterface does not have a vtable, so you need to add the 414 // ImplementationLacksVTable attribute to the interface definition 413 415 COMPILE_ASSERT(__is_polymorphic(TestSerializedScriptValueInterface), TestSerializedScriptValueInterface_is_not_polymorphic); 414 416 #endif 415 417 #endif 418 // If you hit this assertion you either have a use after free bug, or 419 // TestSerializedScriptValueInterface has subclasses. If TestSerializedScriptValueInterface has subclasses that get passed 420 // to toJS() we currently require TestSerializedScriptValueInterface you to opt out of binding hardening 421 // by adding the SkipVTableValidation attribute to the interface IDL definition 416 422 RELEASE_ASSERT(actualVTablePointer == expectedVTablePointer); 417 423 #endif -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.cpp
r148260 r148301 649 649 void* expectedVTablePointer = &_ZTVN7WebCore12TestTypedefsE[2]; 650 650 #if COMPILER(CLANG) 651 // If this fails TestTypedefs does not have a vtable, so you need to add the 652 // ImplementationLacksVTable attribute to the interface definition 651 653 COMPILE_ASSERT(__is_polymorphic(TestTypedefs), TestTypedefs_is_not_polymorphic); 652 654 #endif 653 655 #endif 656 // If you hit this assertion you either have a use after free bug, or 657 // TestTypedefs has subclasses. If TestTypedefs has subclasses that get passed 658 // to toJS() we currently require TestTypedefs you to opt out of binding hardening 659 // by adding the SkipVTableValidation attribute to the interface IDL definition 654 660 RELEASE_ASSERT(actualVTablePointer == expectedVTablePointer); 655 661 #endif
Note: See TracChangeset
for help on using the changeset viewer.