Title: [156306] trunk/Source/WebCore
- Revision
- 156306
- Author
- [email protected]
- Date
- 2013-09-23 16:26:23 -0700 (Mon, 23 Sep 2013)
Log Message
[WIN] Add implementation for WebCore::readFromFile()
https://bugs.webkit.org/show_bug.cgi?id=119210
Reviewed by Brent Fulgham.
* platform/win/FileSystemWin.cpp:
(WebCore::readFromFile):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (156305 => 156306)
--- trunk/Source/WebCore/ChangeLog 2013-09-23 22:41:57 UTC (rev 156305)
+++ trunk/Source/WebCore/ChangeLog 2013-09-23 23:26:23 UTC (rev 156306)
@@ -1,5 +1,15 @@
2013-09-23 Patrick Gansterer <[email protected]>
+ [WIN] Add implementation for WebCore::readFromFile()
+ https://bugs.webkit.org/show_bug.cgi?id=119210
+
+ Reviewed by Brent Fulgham.
+
+ * platform/win/FileSystemWin.cpp:
+ (WebCore::readFromFile):
+
+2013-09-23 Patrick Gansterer <[email protected]>
+
[WIN] Implement WebMutableURLRequest::setHTTPBody()
https://bugs.webkit.org/show_bug.cgi?id=91920
Modified: trunk/Source/WebCore/platform/win/FileSystemWin.cpp (156305 => 156306)
--- trunk/Source/WebCore/platform/win/FileSystemWin.cpp 2013-09-23 22:41:57 UTC (rev 156305)
+++ trunk/Source/WebCore/platform/win/FileSystemWin.cpp 2013-09-23 23:26:23 UTC (rev 156306)
@@ -384,6 +384,19 @@
return static_cast<int>(bytesWritten);
}
+int readFromFile(PlatformFileHandle handle, char* data, int length)
+{
+ if (!isHandleValid(handle))
+ return -1;
+
+ DWORD bytesRead;
+ bool success = ::ReadFile(handle, data, length, &bytesRead, 0);
+
+ if (!success)
+ return -1;
+ return static_cast<int>(bytesRead);
+}
+
bool unloadModule(PlatformModule module)
{
return ::FreeLibrary(module);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes