https://bugs.webkit.org/show_bug.cgi?id=153652
Reviewed by Tim Horton.
Source/WebCore:
No new tests (Two skipped tests now pass).
* Modules/indexeddb/IDBKeyData.cpp:
(WebCore::IDBKeyData::loggingString): Limit the length of the string.
* Modules/indexeddb/IDBKeyRangeData.cpp:
(WebCore::IDBKeyRangeData::loggingString): Limit the length of the string.
LayoutTests:
* platform/mac-wk1/TestExpectations:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@195832
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2016-01-29 Brady Eidson <beidson@apple.com>
+
+ Modern IDB: Fix logging that overwhelms python with strings of excessive length.
+ https://bugs.webkit.org/show_bug.cgi?id=153652
+
+ Reviewed by Tim Horton.
+
+ * platform/mac-wk1/TestExpectations:
+
2016-01-29 Saam barati <sbarati@apple.com>
Exits from exceptions shouldn't jettison code
# SQLite backend tests that crash or ASSERT
storage/indexeddb/database-odd-names.html [ Skip ]
-storage/indexeddb/odd-strings.html [ Skip ]
-
-# SQLite backend tests that wedge the entire testing harness
-imported/w3c/indexeddb/keyorder.htm [ Skip ]
storage/indexeddb/dont-wedge.html [ Skip ]
-storage/indexeddb/key-type-array.html [ Skip ]
+storage/indexeddb/odd-strings.html [ Skip ]
### END OF (3) IndexedDB failures with SQLite
########################################
+2016-01-29 Brady Eidson <beidson@apple.com>
+
+ Modern IDB: Fix logging that overwhelms python with strings of excessive length.
+ https://bugs.webkit.org/show_bug.cgi?id=153652
+
+ Reviewed by Tim Horton.
+
+ No new tests (Two skipped tests now pass).
+
+ * Modules/indexeddb/IDBKeyData.cpp:
+ (WebCore::IDBKeyData::loggingString): Limit the length of the string.
+
+ * Modules/indexeddb/IDBKeyRangeData.cpp:
+ (WebCore::IDBKeyRangeData::loggingString): Limit the length of the string.
+
2016-01-29 Jer Noble <jer.noble@apple.com>
Unreviewed Windows build fix; one more ResourceLoaderOptions call site which needs to
if (m_isNull)
return "<null>";
+ String result;
+
switch (m_type) {
case KeyType::Invalid:
return "<invalid>";
- case KeyType::Array:
- {
- StringBuilder result;
- result.appendLiteral("<array> - { ");
- for (size_t i = 0; i < m_arrayValue.size(); ++i) {
- result.append(m_arrayValue[i].loggingString());
- if (i < m_arrayValue.size() - 1)
- result.appendLiteral(", ");
- }
- result.appendLiteral(" }");
- return result.toString();
+ case KeyType::Array: {
+ StringBuilder builder;
+ builder.appendLiteral("<array> - { ");
+ for (size_t i = 0; i < m_arrayValue.size(); ++i) {
+ builder.append(m_arrayValue[i].loggingString());
+ if (i < m_arrayValue.size() - 1)
+ builder.appendLiteral(", ");
}
+ builder.appendLiteral(" }");
+ result = builder.toString();
+ break;
+ }
case KeyType::String:
- return "<string> - " + m_stringValue;
+ result = "<string> - " + m_stringValue;
+ break;
case KeyType::Date:
return String::format("Date m_type - %f", m_numberValue);
case KeyType::Number:
default:
return String();
}
- ASSERT_NOT_REACHED();
+
+ if (result.length() > 150) {
+ result.truncate(147);
+ result.append(WTF::ASCIILiteral("..."));
+ }
+
+ return result;
}
#endif
#ifndef NDEBUG
String IDBKeyRangeData::loggingString() const
{
- return makeString(lowerOpen ? "( " : "[ ", lowerKey.loggingString(), ", ", upperKey.loggingString(), upperOpen ? " )" : " ]");
+ auto result = makeString(lowerOpen ? "( " : "[ ", lowerKey.loggingString(), ", ", upperKey.loggingString(), upperOpen ? " )" : " ]");
+ if (result.length() > 400) {
+ result.truncate(397);
+ result.append(WTF::ASCIILiteral("..."));
+ }
+
+ return result;
}
#endif