Fix offscreen canvas transfer with closure (#11427)

This commit is contained in:
JunyueCao 2020-06-22 21:56:48 +08:00 коммит произвёл GitHub
Родитель 9993d15675
Коммит 1af418c28f
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
2 изменённых файлов: 6 добавлений и 4 удалений

Просмотреть файл

@ -478,4 +478,5 @@ a license to everyone to use it as detailed in LICENSE.)
* Robert Aboukhalil <robert.aboukhalil@gmail.com> * Robert Aboukhalil <robert.aboukhalil@gmail.com>
* Jonathan Poelen <jonathan.poelen@gmail.com> * Jonathan Poelen <jonathan.poelen@gmail.com>
* Ashley Hauck <github@khyperia.com> * Ashley Hauck <github@khyperia.com>
* Junyue Cao <junyuecao@gmail.com>
* Elías Serrano <feserr3@gmail.com> * Elías Serrano <feserr3@gmail.com>

Просмотреть файл

@ -531,12 +531,13 @@ var LibraryPThread = {
'selfThreadId': threadParams.pthread_ptr, // TODO: Remove this since thread ID is now the same as the thread address. 'selfThreadId': threadParams.pthread_ptr, // TODO: Remove this since thread ID is now the same as the thread address.
'parentThreadId': threadParams.parent_pthread_ptr, 'parentThreadId': threadParams.parent_pthread_ptr,
'stackBase': threadParams.stackBase, 'stackBase': threadParams.stackBase,
'stackSize': threadParams.stackSize, 'stackSize': threadParams.stackSize
};
#if OFFSCREENCANVAS_SUPPORT #if OFFSCREENCANVAS_SUPPORT
'moduleCanvasId': threadParams.moduleCanvasId, // Note that we do not need to quote these names because they are only used in this file, and not from the external worker.js.
'offscreenCanvases': threadParams.offscreenCanvases, msg.moduleCanvasId = threadParams.moduleCanvasId;
msg.offscreenCanvases = threadParams.offscreenCanvases;
#endif #endif
};
worker.runPthread = function() { worker.runPthread = function() {
// Ask the worker to start executing its pthread entry point function. // Ask the worker to start executing its pthread entry point function.
msg.time = performance.now(); msg.time = performance.now();