mirror of
https://github.com/rkd77/elinks.git
synced 2024-12-04 14:46:47 -05:00
[spidermokey] function spidermonkey_release_all_runtimes
This commit is contained in:
parent
88fdf42ade
commit
68697e6480
@ -75,6 +75,14 @@ spidermonkey_runtime_release(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
spidermonkey_release_all_runtimes(void)
|
||||||
|
{
|
||||||
|
while (spidermonkey_runtime_refcount > 0) {
|
||||||
|
spidermonkey_runtime_release();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/** An ELinks-specific replacement for JS_DefineFunctions().
|
/** An ELinks-specific replacement for JS_DefineFunctions().
|
||||||
*
|
*
|
||||||
* @relates spidermonkeyFunctionSpec */
|
* @relates spidermonkeyFunctionSpec */
|
||||||
|
@ -12,6 +12,7 @@ extern JSContext *main_ctx;
|
|||||||
extern long spidermonkey_memory_limit;
|
extern long spidermonkey_memory_limit;
|
||||||
int spidermonkey_runtime_addref(void);
|
int spidermonkey_runtime_addref(void);
|
||||||
void spidermonkey_runtime_release(void);
|
void spidermonkey_runtime_release(void);
|
||||||
|
void spidermonkey_release_all_runtimes(void);
|
||||||
|
|
||||||
/** An ELinks-specific replacement for JSFunctionSpec.
|
/** An ELinks-specific replacement for JSFunctionSpec.
|
||||||
*
|
*
|
||||||
|
@ -160,8 +160,9 @@ spidermonkey_init(struct module *module)
|
|||||||
static void
|
static void
|
||||||
spidermonkey_done(struct module *xxx)
|
spidermonkey_done(struct module *xxx)
|
||||||
{
|
{
|
||||||
if (js_module_init_ok)
|
if (js_module_init_ok) {
|
||||||
spidermonkey_runtime_release();
|
spidermonkey_release_all_runtimes();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static const char *
|
static const char *
|
||||||
|
Loading…
Reference in New Issue
Block a user