(env)
| 466 | } |
| 467 | |
| 468 | function prepareScripts(env) { |
| 469 | env[PROMISE] = null; // let GC have it |
| 470 | const scripts = env[SCRIPTS]; |
| 471 | for (let i = 0, script, key, id; i < scripts.length; i++) { |
| 472 | script = scripts[i]; |
| 473 | id = script.id; |
| 474 | if (!script[__CODE]) { |
| 475 | id = script.props.id; |
| 476 | key = S_SCRIPT_PRE + id; |
| 477 | script = cache.get(key) || cache.put(key, prepareScript(script, env)); |
| 478 | scripts[i] = script; |
| 479 | } |
| 480 | if (script[INJECT_INTO] !== CONTENT) { |
| 481 | env[PAGE] = true; // for registerScriptDataFF |
| 482 | } |
| 483 | script[VALUES] = env[S_VALUE][id] || null; |
| 484 | } |
| 485 | return scripts; |
| 486 | } |
| 487 | |
| 488 | /** |
| 489 | * @param {VMScript} script |
no test coverage detected