Bug 34412 - [BREWMP] Port SharedBuffer::createWithContentsOfFile
: [BREWMP] Port SharedBuffer::createWithContentsOfFile
Status: RESOLVED FIXED
: WebKit
Platform
: 528+ (Nightly build)
: Other Other
: P2 Normal
Assigned To:
:
:
:
: 33564
  Show dependency treegraph
 
Reported: 2010-02-01 02:02 PST by
Modified: 2010-08-29 19:07 PST (History)


Attachments
Port SharedBuffer (4.05 KB, patch)
2010-02-01 02:05 PST, Kwang Yul Seo
no flags Review Patch | Details | Formatted Diff | Diff
Port SharedBuffer (4.01 KB, application/octet-stream)
2010-02-03 03:09 PST, Kwang Yul Seo
no flags Details
Port SharedBuffer (4.01 KB, patch)
2010-02-03 03:10 PST, Kwang Yul Seo
no flags Review Patch | Details | Formatted Diff | Diff
Port SharedBuffer (4.02 KB, patch)
2010-02-03 03:16 PST, Kwang Yul Seo
no flags Review Patch | Details | Formatted Diff | Diff
Revised patch (3.73 KB, patch)
2010-05-21 06:12 PST, Kwang Yul Seo
no flags Review Patch | Details | Formatted Diff | Diff
Revised patch (3.71 KB, patch)
2010-06-08 22:38 PST, Kwang Yul Seo
no flags Review Patch | Details | Formatted Diff | Diff
Revised patch (3.72 KB, patch)
2010-06-14 20:58 PST, Kwang Yul Seo
no flags Review Patch | Details | Formatted Diff | Diff


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2010-02-01 02:02:25 PST
Implement SharedBuffer::createWithContentsOfFile with IFileMgr.
------- Comment #1 From 2010-02-01 02:05:27 PST -------
Created an attachment (id=47820) [details]
Port SharedBuffer
------- Comment #2 From 2010-02-01 16:00:17 PST -------
(From update of attachment 47820 [details])
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.
------- Comment #3 From 2010-02-01 16:58:10 PST -------
It sounds like a good idea. I will create a smart pointer for Brew.
------- Comment #4 From 2010-02-03 03:09:04 PST -------
Created an attachment (id=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
------- Comment #5 From 2010-02-03 03:10:28 PST -------
Created an attachment (id=48009) [details]
Port SharedBuffer

Ooops. Forgot to check patch checkbox.
------- Comment #6 From 2010-02-03 03:16:00 PST -------
Created an attachment (id=48011) [details]
Port SharedBuffer

Fix a small mistake.
------- Comment #7 From 2010-02-03 13:01:42 PST -------
(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);
------- Comment #8 From 2010-02-08 08:11:05 PST -------
(In reply to comment #7)
> (From update of attachment 48011 [details] [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 #9 From 2010-02-08 08:12:09 PST -------
(From update of attachment 48011 [details])
------- Comment #10 From 2010-05-21 06:12:38 PST -------
Created an attachment (id=56702) [details]
Revised patch

Use ShellBrew's createInstance to create an OwnPtr-ed IFileMgr.
------- Comment #11 From 2010-06-07 06:45:31 PST -------
(From update of attachment 56702 [details])
Cancel the patch as I found a bug. I will resubmit the patch after fixing the bug.
------- Comment #12 From 2010-06-08 22:38:15 PST -------
Created an attachment (id=58212) [details]
Revised patch

Patch
------- Comment #13 From 2010-06-14 20:58:16 PST -------
Created an attachment (id=58750) [details]
Revised patch

Use fileSystemRepresentation instead of filenameFromString due to the change in bug 40201
------- Comment #14 From 2010-08-27 08:47:33 PST -------
Ping.
------- Comment #15 From 2010-08-29 18:24:53 PST -------
(From update of attachment 58750 [details])
I'm not familiar with SharedBuffer, but the change looks to have no problem. I'm setting r+.
------- Comment #16 From 2010-08-29 19:07:46 PST -------
(From update of attachment 58750 [details])
Clearing flags on attachment: 58750

Committed r66348: <http://trac.webkit.org/changeset/66348>
------- Comment #17 From 2010-08-29 19:07:52 PST -------
All reviewed patches have been landed.  Closing bug.