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

This commit is contained in:
Dark25 2025-01-18 23:41:52 +01:00 committed by GitHub
parent fd9fb12730
commit 5f0e64837e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -84,12 +84,12 @@ class VidGuardExtractor(private val client: OkHttpClient) {
Context.toString(svgObject)
}
} catch (e: Exception) {
Log.i("Error", e.toString())
Log.e("Error", "JavaScript execution error: ${e.message}")
} finally {
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.join()
t.interrupt()