Skip to content
  • andersca@apple.com's avatar
    Tweak WeakObjCPtr · c24a7a4f
    andersca@apple.com authored
    https://bugs.webkit.org/show_bug.cgi?id=125311
    
    Reviewed by Darin Adler.
    
    Source/WebKit2:
    
    Make it possible to use WeakObjCPtr with pointer types such as id. Also,
    add a getAutoreleased() member that will load the weak pointer and retain + autorelease it.
    
    * Shared/mac/WeakObjCPtr.h:
    (WebKit::WeakObjCPtr::WeakObjCPtr):
    (WebKit::WeakObjCPtr::operator=):
    (WebKit::WeakObjCPtr::get):
    (WebKit::WeakObjCPtr::getAutoreleased):
    
    Tools:
    
    Split up tests into more logical groups. Add new tests for new functionality.
    
    * TestWebKitAPI/Tests/WebKit2/mac/WeakObjCPtr.mm:
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160187 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    c24a7a4f