[Webkit-unassigned] [Bug 194344] [WTF] Add getting/changing current working directory to FileSystem

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat Feb 9 12:54:21 PST 2019


https://bugs.webkit.org/show_bug.cgi?id=194344

Darin Adler <darin at apple.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #361404|review?                     |review+
              Flags|                            |

--- Comment #8 from Darin Adler <darin at apple.com> ---
Comment on attachment 361404
  --> https://bugs.webkit.org/attachment.cgi?id=361404
Add get/change current working directory functions, fix a few issues

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

I’d like to see the one first use of this in JSC in the same patch as introducing it. Not a huge fan of adding something unused to WTF.

> Source/WTF/wtf/glib/FileSystemGlib.cpp:470
> +    GUniquePtr<char> currentDir(g_get_current_dir());

When does this give a different value than getcwd?

> Source/WTF/wtf/glib/FileSystemGlib.cpp:476
> +    CString fsRep = fileSystemRepresentation(filePath);

Seems wasteful to have a local variable here.

> Source/WTF/wtf/glib/FileSystemGlib.cpp:477
> +    return !chdir(fsRep.data());

This is the same as the POSIX one. Maybe we can rearrange things so we don’t have two copies. Does this even work when glib is running on Windows?

> Source/WTF/wtf/posix/FileSystemPOSIX.cpp:506
> +    CString fsRep = fileSystemRepresentation(filePath);

Seems wasteful to have a local variable here. Just do it all on one line.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20190209/56c9202b/attachment-0001.html>


More information about the webkit-unassigned mailing list