Title: [232202] trunk/Source/WebCore
- Revision
- 232202
- Author
- eric.carl...@apple.com
- Date
- 2018-05-25 14:35:13 -0700 (Fri, 25 May 2018)
Log Message
Encode ISOWebVTTCue "strings" when logging
https://bugs.webkit.org/show_bug.cgi?id=185991
<rdar://problem/40563902>
Reviewed by Jer Noble.
* platform/graphics/iso/ISOVTTCue.cpp:
(WebCore::ISOWebVTTCue::toJSONString const): Use encodeWithURLEscapeSequences for all Strings
taken from ISO boxes.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (232201 => 232202)
--- trunk/Source/WebCore/ChangeLog 2018-05-25 21:27:19 UTC (rev 232201)
+++ trunk/Source/WebCore/ChangeLog 2018-05-25 21:35:13 UTC (rev 232202)
@@ -1,3 +1,15 @@
+2018-05-25 Eric Carlson <eric.carl...@apple.com>
+
+ Encode ISOWebVTTCue "strings" when logging
+ https://bugs.webkit.org/show_bug.cgi?id=185991
+ <rdar://problem/40563902>
+
+ Reviewed by Jer Noble.
+
+ * platform/graphics/iso/ISOVTTCue.cpp:
+ (WebCore::ISOWebVTTCue::toJSONString const): Use encodeWithURLEscapeSequences for all Strings
+ taken from ISO boxes.
+
2018-05-25 Alex Christensen <achristen...@webkit.org>
URL::host should return a StringView to reduce allocations
Modified: trunk/Source/WebCore/platform/graphics/iso/ISOVTTCue.cpp (232201 => 232202)
--- trunk/Source/WebCore/platform/graphics/iso/ISOVTTCue.cpp 2018-05-25 21:27:19 UTC (rev 232201)
+++ trunk/Source/WebCore/platform/graphics/iso/ISOVTTCue.cpp 2018-05-25 21:35:13 UTC (rev 232202)
@@ -27,15 +27,9 @@
#include "ISOVTTCue.h"
#include "Logging.h"
-#include <_javascript_Core/ArrayBuffer.h>
+#include "URL.h"
#include <_javascript_Core/DataView.h>
-#include <_javascript_Core/Int8Array.h>
-#include <_javascript_Core/JSCInlines.h>
-#include <_javascript_Core/TypedArrayInlines.h>
#include <wtf/JSONValues.h>
-#include <wtf/NeverDestroyed.h>
-#include <wtf/text/CString.h>
-#include <wtf/text/StringBuilder.h>
using JSC::DataView;
@@ -59,7 +53,7 @@
}
Vector<LChar> characters;
- characters.reserveInitialCapacity((size_t)characterCount);
+ characters.reserveInitialCapacity(static_cast<size_t>(characterCount));
while (characterCount--) {
int8_t character = 0;
if (!checkedRead<int8_t>(character, view, localOffset, BigEndian))
@@ -117,12 +111,11 @@
#if !LOG_DISABLED
object->setString(ASCIILiteral("text"), m_cueText);
#endif
- object->setString(ASCIILiteral("sourceId"), m_sourceID);
- object->setString(ASCIILiteral("id"), m_identifier);
+ object->setString(ASCIILiteral("sourceId"), encodeWithURLEscapeSequences(m_sourceID));
+ object->setString(ASCIILiteral("id"), encodeWithURLEscapeSequences(m_identifier));
- object->setString(ASCIILiteral("originalStartTime"), m_originalStartTime);
- object->setString(ASCIILiteral("settings"), m_settings);
- object->setString(ASCIILiteral("cueText"), m_cueText);
+ object->setString(ASCIILiteral("originalStartTime"), encodeWithURLEscapeSequences(m_originalStartTime));
+ object->setString(ASCIILiteral("settings"), encodeWithURLEscapeSequences(m_settings));
object->setDouble(ASCIILiteral("presentationTime"), m_presentationTime.toDouble());
object->setDouble(ASCIILiteral("duration"), m_duration.toDouble());
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes