Fix the issue in the ref test tracemonkey-extract_0_2_12

When getting the extracted document, the url for the wasms wasn't passed
and consequently the icc-based color wasn't rendered as expected because of the wasm for qcms.
This commit is contained in:
Calixte Denizet 2026-03-15 19:23:42 +01:00
parent 3127492a38
commit dde0beafc6
No known key found for this signature in database
GPG Key ID: 0C5442631EE0691F

View File

@ -666,7 +666,7 @@ class Driver {
task.isOffscreenCanvasSupported === false ? false : undefined; task.isOffscreenCanvasSupported === false ? false : undefined;
const disableFontFace = task.disableFontFace === true; const disableFontFace = task.disableFontFace === true;
const loadingTask = getDocument({ const documentOptions = {
url: new URL(task.file, window.location), url: new URL(task.file, window.location),
password: task.password, password: task.password,
cMapUrl: CMAP_URL, cMapUrl: CMAP_URL,
@ -682,12 +682,15 @@ class Driver {
isOffscreenCanvasSupported, isOffscreenCanvasSupported,
styleElement: xfaStyleElement, styleElement: xfaStyleElement,
disableFontFace, disableFontFace,
}); };
const loadingTask = getDocument(documentOptions);
let promise = loadingTask.promise; let promise = loadingTask.promise;
if (!this.masterMode && task.type === "extract") { if (!this.masterMode && task.type === "extract") {
promise = promise.then(async doc => { promise = promise.then(async doc => {
const data = await doc.extractPages([ const extractedDocumentOptions = { ...documentOptions };
delete extractedDocumentOptions.url;
extractedDocumentOptions.data = await doc.extractPages([
{ {
document: null, document: null,
includePages: task.includePages, includePages: task.includePages,
@ -695,7 +698,7 @@ class Driver {
]); ]);
await loadingTask.destroy(); await loadingTask.destroy();
delete task.includePages; delete task.includePages;
return getDocument(data).promise; return getDocument(extractedDocumentOptions).promise;
}); });
} }