Bug 187221 - Port WTF to OS(FUCHSIA)
Summary: Port WTF to OS(FUCHSIA)
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-06-30 11:20 PDT by Adam Barth
Modified: 2018-06-30 13:55 PDT (History)
5 users (show)

See Also:


Attachments
Patch (9.73 KB, patch)
2018-06-30 11:50 PDT, Adam Barth
no flags Details | Formatted Diff | Diff
Patch (10.21 KB, patch)
2018-06-30 13:09 PDT, Adam Barth
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Adam Barth 2018-06-30 11:20:32 PDT
Port WTF to OS(FUCHSIA)
Comment 1 Adam Barth 2018-06-30 11:50:38 PDT
Created attachment 344017 [details]
Patch
Comment 2 Yusuke Suzuki 2018-06-30 12:39:21 PDT
Comment on attachment 344017 [details]
Patch

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

r=me with nits.

> Source/WTF/wtf/FastMalloc.cpp:366
> +#elif HAVE(RESOURCE_H)

Can we have an implementation for Fuchsia?
If we can implement it (but if it is a bit complicated for this patch), adding FIXME here is desirable.

> Source/WTF/wtf/RandomDevice.cpp:33
> +#if !OS(DARWIN) && !OS(FUCHSIA) && OS(UNIX)

We should have `OS(FUCHSIA)` guard in RandomDevice.h too not to have m_fd.
Comment 3 Adam Barth 2018-06-30 13:07:22 PDT
> r=me with nits.

Thanks!

> > Source/WTF/wtf/FastMalloc.cpp:366
> > +#elif HAVE(RESOURCE_H)
> 
> Can we have an implementation for Fuchsia?
> If we can implement it (but if it is a bit complicated for this patch),
> adding FIXME here is desirable.

We removed resource.h from our libc in https://fuchsia.googlesource.com/zircon/+/67fec6dc8ea9285fb54f9bc741be63218439eda5%5E%21/

Apparently, the concepts expressed in that header don't map well to what we have planned in this area.  For example, Fuchsia doesn't track resource limits at process level.  Instead, resource usage is tracked at the job level to handle modern multiprocess applications.  (A job is a container for processes and other jobs.)

> > Source/WTF/wtf/RandomDevice.cpp:33
> > +#if !OS(DARWIN) && !OS(FUCHSIA) && OS(UNIX)
> 
> We should have `OS(FUCHSIA)` guard in RandomDevice.h too not to have m_fd.

Good idea.
Comment 4 Adam Barth 2018-06-30 13:09:13 PDT
Created attachment 344020 [details]
Patch
Comment 5 Yusuke Suzuki 2018-06-30 13:15:28 PDT
Comment on attachment 344020 [details]
Patch

r=me
Comment 6 WebKit Commit Bot 2018-06-30 13:54:03 PDT
Comment on attachment 344020 [details]
Patch

Clearing flags on attachment: 344020

Committed r233401: <https://trac.webkit.org/changeset/233401>
Comment 7 WebKit Commit Bot 2018-06-30 13:54:05 PDT
All reviewed patches have been landed.  Closing bug.
Comment 8 Radar WebKit Bug Importer 2018-06-30 13:55:15 PDT
<rdar://problem/41682410>