fix(lib/VidGuardExtractor): Increase stack size to 8MB #570

Merged
Dark25 merged 1 commit from VidGuardExtractor into main 2025-01-18 16:41:53 -06:00

View file

@ -84,12 +84,12 @@ class VidGuardExtractor(private val client: OkHttpClient) {
Context.toString(svgObject) Context.toString(svgObject)
} }
} catch (e: Exception) { } catch (e: Exception) {
Log.i("Error", e.toString()) Log.e("Error", "JavaScript execution error: ${e.message}")
} finally { } finally {
Context.exit() Context.exit()
} }
} }
val t = Thread(ThreadGroup("A"), r, "thread_rhino", 2000000) // StackSize 2Mb: Run in a thread because rhino requires more stack size for large scripts. val t = Thread(ThreadGroup("A"), r, "thread_rhino", 8 * 1024 * 1024) // Increase stack size to 8MB
t.start() t.start()
t.join() t.join()
t.interrupt() t.interrupt()