ObjcClass::methodsNamed() can leak if buffer is dynamically allocated
https://bugs.webkit.org/show_bug.cgi?id=84668
Patch by Benjamin Poulain <bpoulain@apple.com> on 2012-04-26
Reviewed by Alexey Proskuryakov.
Source/WebCore:
Change ObjcClass::methodsNamed() to be based on a vector instead of managing
the memory manually.
Tests: platform/mac/plugins/bindings-objc-long-method-name.html
platform/mac/plugins/bindings-objc-method-name-conversion.html
* bridge/objc/objc_class.mm:
(Bindings):
(JSC::Bindings::convertJSMethodNameToObjc):
(JSC::Bindings::ObjcClass::methodsNamed):
Tools:
Extend ObjCPlugin to support the new layout tests of the Objective-C bridge.
* DumpRenderTree/mac/ObjCPlugin.m:
(+[ObjCPlugin isSelectorExcludedFromWebScript:]):
(+[ObjCPlugin webScriptNameForSelector:]):
(-[ObjCPlugin methodMappedToLongName]):
(-[ObjCPlugin testConversionColon:]):
(-[ObjCPlugin _:]):
LayoutTests:
Extend the test coverage to accessor with very long name. Add coverage for the
JavaScript to Objective-C method name conversion.
* platform/mac/plugins/bindings-objc-long-method-name-expected.txt: Added.
* platform/mac/plugins/bindings-objc-long-method-name.html: Added.
* platform/mac/plugins/bindings-objc-method-name-conversion-expected.txt: Added.
* platform/mac/plugins/bindings-objc-method-name-conversion.html: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@115358
268f45cc-cd09-0410-ab3c-
d52691b4dbfc