Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
REGRESSION(r204565): WKObject is broken
https://bugs.webkit.org/show_bug.cgi?id=174736 <rdar://problem/33246169> Reviewed by Dan Bernstein. Source/WebKit: Revert r204565 as making WKObject a root class caused unexpected crashes. Instead, we now have WKObject inherit from NSProxy (instead of previously NSObject) and we forward calls to the target. We also need to provide an implementation for private methods such as isNSString__ to address the issue with NSStrings that r204565 was trying to fix. * Shared/Cocoa/APIObject.mm: (API::Object::unwrap): * Shared/Cocoa/WKObject.h: * Shared/Cocoa/WKObject.mm: (-[WKObject dealloc]): (-[WKObject hash]): (-[WKObject isKindOfClass:]): (-[WKObject isMemberOfClass:]): (-[WKObject respondsToSelector:]): (-[WKObject conformsToProtocol:]): (-[WKObject forwardingTargetForSelector:]): (-[WKObject description]): (-[WKObject debugDescription]): (-[WKObject classForCoder]): (-[WKObject classForKeyedArchiver]): (-[WKObject _web_createTarget]): (-[WKObject forwardInvocation:]): (-[WKObject methodSignatureForSelector:]): (-[WKObject isNSObject__]): (-[WKObject isNSArray__]): (-[WKObject isNSCFConstantString__]): (-[WKObject isNSData__]): (-[WKObject isNSDate__]): (-[WKObject isNSDictionary__]): (-[WKObject isNSNumber__]): (-[WKObject isNSOrderedSet__]): (-[WKObject isNSSet__]): (-[WKObject isNSString__]): (-[WKObject isNSTimeZone__]): (-[WKObject isNSValue__]): Tools: Add API test that used to crash. * TestWebKitAPI/Tests/WebKit2Cocoa/WKObject.mm: (TestWebKitAPI::TEST): Canonical link: https://commits.webkit.org/191573@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@219764 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
Showing
6 changed files
with
178 additions
and
90 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.