VTT cues are always UTF-8, so use String::fromUTF8().
Created attachment 236219 [details] Proposed patch.
Committed r172257: https://trac.webkit.org/r172257
<rdar://problem/17925660>
Comment on attachment 236219 [details] Proposed patch. View in context: https://bugs.webkit.org/attachment.cgi?id=236219&action=review > Source/WebCore/platform/graphics/ISOVTTCue.cpp:78 > + return String::fromUTF8(JSC::Uint8Array::create(data, offset, length)->data(), length); What is the reason to create a UInt8Array here? This seems much more natural to me: return String::fromUTF8(static_cast<const char*>(data->data()) + offset, length);