mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-12-22 12:12:35 +03:00
JS: Add concept of thread destroy
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
This commit is contained in:
parent
17b28e85c1
commit
337082f715
@ -96,6 +96,20 @@ void js_destroyheap(jsheap *heap);
|
||||
*/
|
||||
nserror js_newthread(jsheap *heap, void *win_priv, void *doc_priv, jsthread **thread);
|
||||
|
||||
/**
|
||||
* Destroy a javascript thread
|
||||
*
|
||||
* This should be called when the browsing context is done with the thread.
|
||||
*
|
||||
* Essentially it should be called when the content is about to be destroyed
|
||||
* but in reality it can be called when the browser window relinquishes its
|
||||
* handle on the content since nominally the browser window itself owns
|
||||
* the thread.
|
||||
*
|
||||
* \param thread The thread to be destroyed
|
||||
*/
|
||||
void js_destroythread(jsthread *thread);
|
||||
|
||||
/**
|
||||
* execute some javascript in a context
|
||||
*/
|
||||
|
@ -51,6 +51,10 @@ nserror js_newthread(jsheap *heap, void *win_priv, void *doc_priv, jsthread **th
|
||||
return NSERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
void js_destroythread(jsthread *thread)
|
||||
{
|
||||
}
|
||||
|
||||
bool js_exec(jsthread *thread, const uint8_t *txt, size_t txtlen, const char *name)
|
||||
{
|
||||
return true;
|
||||
|
Loading…
Reference in New Issue
Block a user