mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2025-07-10 15:28:33 +00:00
jitless
This commit is contained in:
parent
1bab6aa3a3
commit
532c6b2eb5
@ -77,7 +77,7 @@ def _create_temp_js(self, jscode):
|
||||
with contextlib.suppress(OSError):
|
||||
os.remove(js_file.name)
|
||||
|
||||
def deno_execute(self, jscode, video_id=None, *, note='Executing JS in Deno', allow_net=None):
|
||||
def deno_execute(self, jscode, video_id=None, *, note='Executing JS in Deno', allow_net=None, jit_less=True):
|
||||
"""Execute JS directly in Deno environment and return stdout"""
|
||||
|
||||
base_js = 'delete window.Deno; global = window;'
|
||||
@ -88,6 +88,8 @@ def deno_execute(self, jscode, video_id=None, *, note='Executing JS in Deno', al
|
||||
cmd = [self.exe, 'run', js_file.name]
|
||||
if allow_net:
|
||||
cmd.append('--allow-net' if isinstance(allow_net, bool) else f'--allow-net={allow_net}')
|
||||
if jit_less:
|
||||
cmd.append('--v8-flags=--jitless')
|
||||
|
||||
self.extractor.write_debug(f'Deno command line: {shell_quote(cmd)}')
|
||||
try:
|
||||
|
Loading…
Reference in New Issue
Block a user