mirror of
https://github.com/ONLYOFFICE/core.git
synced 2026-02-10 18:05:41 +08:00
For bug 68532
This commit is contained in:
@ -352,7 +352,18 @@
|
||||
}
|
||||
|
||||
this.lockPageNumForFontsLoader(pageIndex, UpdateFontsSource.Page);
|
||||
let retValue = Module["_GetGlyphs"](this.nativeFile, pageIndex);
|
||||
let isCrashed = false;
|
||||
let retValue = null;
|
||||
|
||||
try
|
||||
{
|
||||
retValue = Module["_GetGlyphs"](this.nativeFile, pageIndex);
|
||||
}
|
||||
catch (err)
|
||||
{
|
||||
retValue = null;
|
||||
isCrashed = true;
|
||||
}
|
||||
// there is no need to delete the result; this buffer is used as a text buffer
|
||||
// for text commands on other pages. After receiving ALL text pages,
|
||||
// you need to call destroyTextInfo()
|
||||
@ -362,10 +373,11 @@
|
||||
{
|
||||
// waiting fonts
|
||||
retValue = null;
|
||||
isCrashed = false;
|
||||
}
|
||||
|
||||
if (null == retValue)
|
||||
return null;
|
||||
return isCrashed ? [] : null;
|
||||
|
||||
let lenArray = new Int32Array(Module["HEAP8"].buffer, retValue, 5);
|
||||
let len = lenArray[0];
|
||||
|
||||
@ -432,9 +432,11 @@ namespace PdfReader
|
||||
|
||||
if (bResult)
|
||||
{
|
||||
#ifndef BUILDING_WASM_MODULE
|
||||
// Шрифт нашелся, но пока им пользоваться нельзя, потому что он загружается в параллельном потоке
|
||||
while (!pEntry->bAvailable)
|
||||
NSThreads::Sleep(10);
|
||||
#endif
|
||||
}
|
||||
|
||||
RELEASEOBJECT(pCS);
|
||||
@ -449,9 +451,11 @@ namespace PdfReader
|
||||
|
||||
if (bResult)
|
||||
{
|
||||
#ifndef BUILDING_WASM_MODULE
|
||||
// Шрифт нашелся, но пока им пользоваться нельзя, потому что он загружается в параллельном потоке
|
||||
while (!(*ppEntry)->bAvailable)
|
||||
NSThreads::Sleep(10);
|
||||
#endif
|
||||
}
|
||||
|
||||
if (!bResult)
|
||||
|
||||
Reference in New Issue
Block a user