Changeset 230456 in webkit
- Timestamp:
- Apr 9, 2018 5:17:49 PM (6 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r230454 r230456 1 2018-04-09 Sihui Liu <sihui_liu@apple.com> 2 3 REGRESSION(r229929): localStorage is broken for WebInspector 4 https://bugs.webkit.org/show_bug.cgi?id=184382 5 <rdar://problem/39257355> 6 7 Reviewed by Chris Dumez. 8 9 Removed an if condition that caused false positive cases of database error. As per 10 https://www.sqlite.org/c3ref/errcode.html, return value of sqlite3_errcode() is undefined 11 on successful API call, so we should not use the code to check if there is an error. We 12 should only use it when there is an error. 13 After moving this condition, LocalStorage might return empty string instead of NULL on 14 sqlite3_column_blob() error. 15 16 Modified a test to cover this case: 17 TestWebKitAPI/Tests/WebKitCocoa/LocalStoragePersistence.mm. 18 19 * platform/sql/SQLiteStatement.cpp: 20 (WebCore::SQLiteStatement::getColumnBlobAsString): 21 1 22 2018-04-09 Brent Fulgham <bfulgham@apple.com> 2 23 -
trunk/Source/WebCore/platform/sql/SQLiteStatement.cpp
r229929 r230456 384 384 385 385 const void* blob = sqlite3_column_blob(m_statement, col); 386 if (m_database.lastError() != SQLITE_OK)387 return String();388 386 if (!blob) 389 387 return emptyString(); -
trunk/Tools/ChangeLog
r230391 r230456 1 2018-04-09 Sihui Liu <sihui_liu@apple.com> 2 3 REGRESSION(r229929): localStorage is broken for WebInspector 4 https://bugs.webkit.org/show_bug.cgi?id=184382 5 <rdar://problem/39257355> 6 7 Reviewed by Chris Dumez. 8 9 * TestWebKitAPI/Tests/WebKitCocoa/LocalStoragePersistence.mm: 10 (TEST): 11 * TestWebKitAPI/Tests/WebKitCocoa/localstorage-empty-string-value.html: 12 1 13 2018-04-09 Zan Dobersek <zdobersek@igalia.com> 2 14 -
trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/LocalStoragePersistence.mm
r229929 r230456 79 79 receivedScriptMessage = false; 80 80 RetainPtr<NSString> string1 = (NSString *)[lastScriptMessage body]; 81 EXPECT_WK_STREQ(@" ", string1.get());81 EXPECT_WK_STREQ(@"setItem EmptyString", string1.get()); 82 82 83 83 // Ditch this web view (ditch the in-memory local storage). -
trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/localstorage-empty-string-value.html
r229929 r230456 8 8 localStorage.setItem(key, value); 9 9 localStorage.setItem(testKey, 'test'); 10 window.webkit.messageHandlers.testHandler.postMessage("setItem " + key); 11 } else { 12 window.webkit.messageHandlers.testHandler.postMessage("" + localStorage.getItem(key)); 10 13 } 11 12 var result = localStorage.getItem(key);13 window.webkit.messageHandlers.testHandler.postMessage("" + result);14 14 </script> 15 15 </body>
Note: See TracChangeset
for help on using the changeset viewer.