Fix crash on exit
This commit is contained in:
1 parent
703fea1bab
commit
9dab7d9394
3 files changed
+6
-11
No files matched your search
@@ -23,7 +23,11 @@ function GetComponentName(taskFunc as object) as string
|
||||
if IsString(taskFunc)
|
||||
return `${taskFunc}_asynctask`
|
||||
end if
|
||||
return `${FuncName(taskFunc)}_asynctask`
|
||||
' NOTE: do NOT use FuncName in here.
|
||||
' we use:
|
||||
' return `${FuncName(taskFunc)}_asynctask`
|
||||
' The app hangs on exit, and the TV crashes and restarts. I'm not kidding.
|
||||
return (LCase(`${taskFunc}_asynctask`)).replace("function:", "").trim()
|
||||
end function
|
||||
|
||||
function OnTaskState(e as object) as void
|
||||
|
||||
@@ -35,9 +35,5 @@ function ValidInt(obj as dynamic) as integer
|
||||
end function
|
||||
|
||||
function FuncName(func as function) as string
|
||||
if func <> invalid and GetInterface(func, "ifToStr") <> invalid
|
||||
return func.toStr().replace("Function: ", "")
|
||||
end if
|
||||
|
||||
return ""
|
||||
return (LCase(`${func}`)).replace("function:", "").trim()
|
||||
end function
|
||||
@@ -37,11 +37,6 @@ export class ManifestEditPlugin implements CompilerPlugin {
|
||||
if (debug) {
|
||||
// Host IP address
|
||||
manifestContent = manifestContent.replace(/DEBUG_HOST_IP_ADDRESS/i, `${ip.address()}`)
|
||||
|
||||
// Run as process to use the Roku Resource Monitor
|
||||
if (manifestContent.indexOf('run_as_process=1') < 0) {
|
||||
manifestContent += '\nrun_as_process=1';
|
||||
}
|
||||
}
|
||||
|
||||
// Test flag
|
||||
|
||||
Reference in new issue
Block a user