Index: Source/platform/fonts/opentype/OpenTypeSanitizer.cpp |
diff --git a/Source/platform/fonts/opentype/OpenTypeSanitizer.cpp b/Source/platform/fonts/opentype/OpenTypeSanitizer.cpp |
index c5e71ae45976e36add0d0c78f017cdfcaa0c23f9..77a62f5057cf8aa6d9120be8d34abed8bc5f54a8 100644 |
--- a/Source/platform/fonts/opentype/OpenTypeSanitizer.cpp |
+++ b/Source/platform/fonts/opentype/OpenTypeSanitizer.cpp |
@@ -77,9 +77,14 @@ PassRefPtr<SharedBuffer> OpenTypeSanitizer::sanitize() |
double start = currentTime(); |
BlinkOTSContext otsContext; |
- if (!otsContext.Process(&output, reinterpret_cast<const uint8_t*>(m_buffer->data()), m_buffer->size())) |
+ if (!otsContext.Process(&output, reinterpret_cast<const uint8_t*>(m_buffer->data()), m_buffer->size())) { |
+ setParsingError(true); |
+ setErrorString(otsContext.getErrorString()); |
return nullptr; |
+ } |
+ setParsingError(false); |
+ setErrorString(otsContext.getErrorString()); |
const size_t transcodeLen = output.Tell(); |
recordDecodeSpeedHistogram(m_buffer, currentTime() - start, transcodeLen); |
return SharedBuffer::create(static_cast<unsigned char*>(output.get()), transcodeLen); |