Bug 187221

Summary: Port WTF to OS(FUCHSIA)
Product: WebKit Reporter: Adam Barth <abarth>
Component: New BugsAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, don.olmstead, fpizlo, webkit-bug-importer, ysuzuki
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch none

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>