Bug 165562 - Move FileHandle to WebCore FileHandle.h
Summary: Move FileHandle to WebCore FileHandle.h
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Keith Rollin
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-12-07 16:20 PST by Keith Rollin
Modified: 2016-12-08 18:57 PST (History)
5 users (show)

See Also:


Attachments
Patch (32.69 KB, patch)
2016-12-07 23:31 PST, Keith Rollin
no flags Details | Formatted Diff | Diff
Patch (32.26 KB, patch)
2016-12-08 12:31 PST, Keith Rollin
no flags Details | Formatted Diff | Diff
Patch (32.37 KB, patch)
2016-12-08 13:14 PST, Keith Rollin
no flags Details | Formatted Diff | Diff
Patch (32.40 KB, patch)
2016-12-08 13:50 PST, Keith Rollin
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Keith Rollin 2016-12-07 16:20:01 PST
Bug 164527 introduces a FileHandle class into WebKit2/NetworkProcess. This should be moved to WebCore. While doing this, we should consider what this class should actually be. Should is just be a C++ wrapper around the plain functionality in FileSystem.h? Or should it provide more?
Comment 1 Keith Rollin 2016-12-07 23:31:56 PST
Created attachment 296498 [details]
Patch
Comment 2 Alex Christensen 2016-12-08 10:40:01 PST
Comment on attachment 296498 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=296498&action=review

> Source/WebCore/platform/FileHandle.cpp:40
> +    , m_fileHandle(invalidPlatformFileHandle)

This isn't necessary because of the initializer list in the header.

> Source/WebCore/platform/FileHandle.cpp:47
> +    , m_fileHandle(invalidPlatformFileHandle)

I think this is confusing.  Maybe we should = delete this constructor.

> Source/WebCore/platform/FileHandle.cpp:69
> +        m_fileHandle = invalidPlatformFileHandle;

ditto
Comment 3 Keith Rollin 2016-12-08 10:51:58 PST
(In reply to comment #2)
> > Source/WebCore/platform/FileHandle.cpp:47
> > +    , m_fileHandle(invalidPlatformFileHandle)
> 
> I think this is confusing.  Maybe we should = delete this constructor.
> 
> > Source/WebCore/platform/FileHandle.cpp:69
> > +        m_fileHandle = invalidPlatformFileHandle;
> 
> ditto

Heh. I concur. I originally had them "= delete", but tried adding them into this version in the interests of completeness.
Comment 4 Keith Rollin 2016-12-08 12:31:47 PST
Created attachment 296547 [details]
Patch
Comment 5 Keith Rollin 2016-12-08 13:14:52 PST
Created attachment 296555 [details]
Patch
Comment 6 Keith Rollin 2016-12-08 13:50:13 PST
Created attachment 296562 [details]
Patch
Comment 7 WebKit Commit Bot 2016-12-08 16:57:18 PST
Comment on attachment 296562 [details]
Patch

Clearing flags on attachment: 296562

Committed r209583: <http://trac.webkit.org/changeset/209583>
Comment 8 WebKit Commit Bot 2016-12-08 16:57:22 PST
All reviewed patches have been landed.  Closing bug.
Comment 9 Ryan Haddad 2016-12-08 17:49:13 PST
This change appears to have broken the Windows build:

https://build.webkit.org/builders/Apple%20Win%20Release%20%28Build%29/builds/82532

C:\cygwin\home\buildbot\slave\win-release\build\Source\WebCore\platform\FileHandle.cpp(107): error C3861: 'vasprintf': identifier not found [C:\cygwin\home\buildbot\slave\win-release\build\WebKitBuild\Release\Source\WebCore\WebCore.vcxproj]
Comment 10 Keith Rollin 2016-12-08 18:18:32 PST
OK, I'll fix it if you haven't already rolled it out.
Comment 11 Keith Rollin 2016-12-08 18:57:58 PST
Fixed in Bug 165642.