Implement SharedBuffer::createWithContentsOfFile with IFileMgr.
Created attachment 47820 [details] Port SharedBuffer
Comment on attachment 47820 [details] Port SharedBuffer Seems we're going to need a smart pointer for Brew, like how GOwnPtr or RetainPtr works. Manual calls to: IFILEMGR_Release just end in sadness.
It sounds like a good idea. I will create a smart pointer for Brew.
Created attachment 48008 [details] Port SharedBuffer Make sure the local variable fileMgr and file are released in every path. Use OwnPtrBrew submitted in https://bugs.webkit.org/show_bug.cgi?id=34518
Created attachment 48009 [details] Port SharedBuffer Ooops. Forgot to check patch checkbox.
Created attachment 48011 [details] Port SharedBuffer Fix a small mistake.
Comment on attachment 48011 [details] Port SharedBuffer Isn't there a rawPtr() accessor (or similar) on OwnPtrBrew which would allow you to avoid ever having the IFileMgr* local variable? IFileMgr* p; 58 ISHELL_CreateInstance(shell, AEECLSID_FILEMGR, reinterpret_cast<void**>(&p)); 59 60 OwnPtrBrew<IFileMgr> fileMgr(p);
(In reply to comment #7) > (From update of attachment 48011 [details]) > Isn't there a rawPtr() accessor (or similar) on OwnPtrBrew which would allow > you to avoid ever having the IFileMgr* local variable? > > IFileMgr* p; > 58 ISHELL_CreateInstance(shell, AEECLSID_FILEMGR, > reinterpret_cast<void**>(&p)); > 59 > 60 OwnPtrBrew<IFileMgr> fileMgr(p); I filed a bug for this. Please check https://bugs.webkit.org/show_bug.cgi?id=34705 I will update the patch once 34705 is landed.
Comment on attachment 48011 [details] Port SharedBuffer
Created attachment 56702 [details] Revised patch Use ShellBrew's createInstance to create an OwnPtr-ed IFileMgr.
Comment on attachment 56702 [details] Revised patch Cancel the patch as I found a bug. I will resubmit the patch after fixing the bug.
Created attachment 58212 [details] Revised patch Patch
Created attachment 58750 [details] Revised patch Use fileSystemRepresentation instead of filenameFromString due to the change in bug 40201
Ping.
Comment on attachment 58750 [details] Revised patch I'm not familiar with SharedBuffer, but the change looks to have no problem. I'm setting r+.
Comment on attachment 58750 [details] Revised patch Clearing flags on attachment: 58750 Committed r66348: <http://trac.webkit.org/changeset/66348>
All reviewed patches have been landed. Closing bug.