Changeset 192583 in webkit
- Timestamp:
- Nov 18, 2015 11:47:08 AM (9 years ago)
- Location:
- trunk/Source
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WTF/ChangeLog
r192540 r192583 1 2015-11-18 Daniel Bates <dabates@apple.com> 2 3 [iOS] ASSERTION FAILED: temporaryFilePath.last() == '/' in WebCore::openTemporaryFile() 4 https://bugs.webkit.org/show_bug.cgi?id=151392 5 <rdar://problem/23595341> 6 7 Reviewed by Alexey Proskuryakov. 8 9 Workaround <rdar://problem/23579077> where confstr(_CS_DARWIN_USER_TEMP_DIR, ..., ...) retrieves 10 the path to the user temporary directory without a trailing slash in the iOS simulator. 11 12 * wtf/DataLog.cpp: 13 (WTF::initializeLogFileOnce): 14 1 15 2015-11-17 Filip Pizlo <fpizlo@apple.com> 2 16 -
trunk/Source/WTF/wtf/DataLog.cpp
r173949 r192583 82 82 #endif 83 83 84 const char* filename = 0;84 const char* filename = nullptr; 85 85 86 size_t lastComponentLength = strlen(logBasename) + suffixLength; 87 size_t dirnameLength = confstr(_CS_DARWIN_USER_TEMP_DIR, filenameBuffer, 1024); 88 if ((dirnameLength + lastComponentLength + suffixLength) < maxPathLength) { 89 strncat(filenameBuffer, logBasename, maxPathLength - dirnameLength); 90 filename = filenameBuffer; 86 bool success = confstr(_CS_DARWIN_USER_TEMP_DIR, filenameBuffer, sizeof(filenameBuffer)); 87 if (success) { 88 // FIXME: Assert that the path ends with a slash instead of adding a slash if it does not exist 89 // once <rdar://problem/23579077> is fixed in all iOS Simulator versions that we use. 90 size_t lastComponentLength = strlen(logBasename) + suffixLength; 91 size_t dirnameLength = strlen(filenameBuffer); 92 bool shouldAddPathSeparator = filenameBuffer[dirnameLength - 1] != '/' && logBasename[0] != '/'; 93 if (lastComponentLength + shouldAddPathSeparator <= sizeof(filenameBuffer) - dirnameLength - 1) { 94 if (shouldAddPathSeparator) 95 strncat(filenameBuffer, "/", 1); 96 strncat(filenameBuffer, logBasename, sizeof(filenameBuffer) - strlen(filenameBuffer) - 1); 97 filename = filenameBuffer; 98 } 91 99 } 92 100 #elif defined(DATA_LOG_FILENAME) -
trunk/Source/WebCore/ChangeLog
r192582 r192583 1 2015-11-18 Daniel Bates <dabates@apple.com> 2 3 [iOS] ASSERTION FAILED: temporaryFilePath.last() == '/' in WebCore::openTemporaryFile() 4 https://bugs.webkit.org/show_bug.cgi?id=151392 5 <rdar://problem/23595341> 6 7 Reviewed by Alexey Proskuryakov. 8 9 Workaround <rdar://problem/23579077> where confstr(_CS_DARWIN_USER_TEMP_DIR, ..., ...) retrieves 10 the path to the user temporary directory without a trailing slash in the iOS simulator. 11 12 * platform/mac/FileSystemMac.mm: 13 (WebCore::openTemporaryFile): Add a path separator (/) between the directory path and filename. 14 1 15 2015-11-18 Chris Dumez <cdumez@apple.com> 2 16 -
trunk/Source/WebCore/platform/mac/FileSystemMac.mm
r185525 r192583 70 70 // Shrink the vector. 71 71 temporaryFilePath.shrink(strlen(temporaryFilePath.data())); 72 ASSERT(temporaryFilePath.last() == '/'); 72 73 // FIXME: Change to a runtime assertion that the path ends with a slash once <rdar://problem/23579077> is 74 // fixed in all iOS Simulator versions that we use. 75 if (temporaryFilePath.last() != '/') 76 temporaryFilePath.append('/'); 73 77 74 78 // Append the file name. -
trunk/Source/WebKit2/ChangeLog
r192528 r192583 1 2015-11-18 Daniel Bates <dabates@apple.com> 2 3 [iOS] ASSERTION FAILED: temporaryFilePath.last() == '/' in WebCore::openTemporaryFile() 4 https://bugs.webkit.org/show_bug.cgi?id=151392 5 <rdar://problem/23595341> 6 7 Reviewed by Alexey Proskuryakov. 8 9 Workaround <rdar://problem/23579077> where confstr(_CS_DARWIN_USER_TEMP_DIR, ..., ...) retrieves 10 the path to the user temporary directory without a trailing slash in the iOS simulator. 11 12 * Shared/mac/SandboxExtensionMac.mm: 13 (WebKit::SandboxExtension::createHandleForTemporaryFile): Add a path separator (/) between the directory path and filename. 14 1 15 2015-11-17 Geoffrey Garen <ggaren@apple.com> 2 16 -
trunk/Source/WebKit2/Shared/mac/SandboxExtensionMac.mm
r186566 r192583 250 250 // Shrink the vector. 251 251 path.shrink(strlen(path.data())); 252 ASSERT(path.last() == '/'); 252 253 // FIXME: Change to a runtime assertion that the path ends with a slash once <rdar://problem/23579077> is 254 // fixed in all iOS Simulator versions that we use. 255 if (path.last() != '/') 256 path.append('/'); 253 257 254 258 // Append the file name.
Note: See TracChangeset
for help on using the changeset viewer.