WebKit Bugzilla
Attachment 360186 Details for
Bug 193789
: [JSCOnly][WTF] Expose FileSystem.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-193789-20190125163300.patch (text/plain), 4.10 KB, created by
Ross Kirsling
on 2019-01-25 16:33:01 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Ross Kirsling
Created:
2019-01-25 16:33:01 PST
Size:
4.10 KB
patch
obsolete
>Subversion Revision: 240476 >diff --git a/Source/WTF/ChangeLog b/Source/WTF/ChangeLog >index dfbc786068d3962e25f0c2697a1d07dde458a25c..ebe2fe85114d141c07714a7a1c60ad4cf3d95f68 100644 >--- a/Source/WTF/ChangeLog >+++ b/Source/WTF/ChangeLog >@@ -1,3 +1,15 @@ >+2019-01-25 Ross Kirsling <ross.kirsling@sony.com> >+ >+ [JSCOnly][WTF] Expose FileSystem. >+ https://bugs.webkit.org/show_bug.cgi?id=193789 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * wtf/FileSystem.h: >+ * wtf/PlatformJSCOnly.cmake: >+ * wtf/win/FileSystemWin.cpp: >+ (WTF::FileSystemImpl::fileSystemRepresentation): >+ > 2019-01-24 Youenn Fablet <youenn@apple.com> > > Use MonotonicTime in WorkerRunLoop >diff --git a/Source/WTF/wtf/FileSystem.h b/Source/WTF/wtf/FileSystem.h >index 95c3baf2e628b9cad7462a069eec00b9af86c2a3..cc615598f45f1ba99548e6179ba99fee08a1463b 100644 >--- a/Source/WTF/wtf/FileSystem.h >+++ b/Source/WTF/wtf/FileSystem.h >@@ -48,7 +48,7 @@ typedef const struct __CFData* CFDataRef; > > OBJC_CLASS NSString; > >-#if PLATFORM(WIN) >+#if OS(WINDOWS) > typedef void *HANDLE; > #endif > >@@ -63,10 +63,10 @@ struct FileMetadata; > namespace FileSystemImpl { > > // PlatformFileHandle >-#if USE(GLIB) && !PLATFORM(WIN) >+#if USE(GLIB) && !OS(WINDOWS) > typedef GFileIOStream* PlatformFileHandle; > const PlatformFileHandle invalidPlatformFileHandle = 0; >-#elif PLATFORM(WIN) >+#elif OS(WINDOWS) > typedef HANDLE PlatformFileHandle; > // FIXME: -1 is INVALID_HANDLE_VALUE, defined in <winbase.h>. Chromium tries to > // avoid using Windows headers in headers. We'd rather move this into the .cpp. >@@ -173,7 +173,7 @@ WTF_EXPORT_PRIVATE RetainPtr<CFURLRef> pathAsURL(const String&); > String filenameForDisplay(const String&); > #endif > >-#if PLATFORM(WIN) >+#if OS(WINDOWS) > WTF_EXPORT_PRIVATE String localUserSpecificStorageDirectory(); > WTF_EXPORT_PRIVATE String roamingUserSpecificStorageDirectory(); > #endif >diff --git a/Source/WTF/wtf/PlatformJSCOnly.cmake b/Source/WTF/wtf/PlatformJSCOnly.cmake >index ba05090f77b44eef3f4496a78b20f81714bd426b..49604ec1d6b9122447fde60c217d9f9093044e85 100644 >--- a/Source/WTF/wtf/PlatformJSCOnly.cmake >+++ b/Source/WTF/wtf/PlatformJSCOnly.cmake >@@ -7,10 +7,13 @@ if (WIN32) > text/win/TextBreakIteratorInternalICUWin.cpp > > win/CPUTimeWin.cpp >+ win/DbgHelperWin.cpp > win/LanguageWin.cpp > win/MainThreadWin.cpp > ) > list(APPEND WTF_PUBLIC_HEADERS >+ win/DbgHelperWin.h >+ > text/win/WCharStringExtras.h > ) > else () >@@ -38,6 +41,9 @@ if (WIN32) > list(APPEND WTF_SOURCES > win/MemoryFootprintWin.cpp > ) >+ list(APPEND WTF_PUBLIC_HEADERS >+ win/Win32Handle.h >+ ) > elseif (APPLE) > file(COPY mac/MachExceptions.defs DESTINATION ${DERIVED_SOURCES_WTF_DIR}) > add_custom_command( >@@ -102,3 +108,31 @@ if (APPLE) > "${WTF_DIR}/icu" > ) > endif () >+ >+if (WIN32) >+ list(APPEND WTF_SOURCES >+ win/FileSystemWin.cpp >+ win/PathWalker.cpp >+ ) >+ list(APPEND WTF_LIBRARIES >+ shlwapi >+ ) >+elseif (USE_GLIB) >+ list(APPEND WTF_PUBLIC_HEADERS >+ glib/GLibUtilities.h >+ glib/GRefPtr.h >+ glib/GUniquePtr.h >+ ) >+ list(APPEND WTF_SOURCES >+ glib/FileSystemGlib.cpp >+ glib/GLibUtilities.cpp >+ glib/GRefPtr.cpp >+ ) >+ list(APPEND WTF_SYSTEM_INCLUDE_DIRECTORIES >+ ${GIO_UNIX_INCLUDE_DIRS} >+ ) >+else () >+ list(APPEND WTF_SOURCES >+ posix/FileSystemPOSIX.cpp >+ ) >+endif () >diff --git a/Source/WTF/wtf/win/FileSystemWin.cpp b/Source/WTF/wtf/win/FileSystemWin.cpp >index 00e3352a36d8272efe93575a9ce99c10a538fdd4..d672af6374693cf0521ec3689689cebcc02ede38 100644 >--- a/Source/WTF/wtf/win/FileSystemWin.cpp >+++ b/Source/WTF/wtf/win/FileSystemWin.cpp >@@ -279,7 +279,7 @@ String pathByAppendingComponents(StringView path, const Vector<StringView>& comp > > CString fileSystemRepresentation(const String& path) > { >- auto upconvertedCharacters = path.upconvertedCharacters(); >+ auto upconvertedCharacters = StringView(path).upconvertedCharacters(); > > const UChar* characters = upconvertedCharacters; > int size = WideCharToMultiByte(CP_ACP, 0, characters, path.length(), 0, 0, 0, 0) - 1;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 193789
:
360186
|
360351
|
360353
|
360357