mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-06 15:58:39 +09:00
[js] Add some utility functions to get the current JS runtime.
This commit is contained in:
parent
6639e9cdac
commit
976239c8d0
2 changed files with 8 additions and 0 deletions
|
|
@ -483,6 +483,11 @@ JS_DestroyContext(JSContext* cx)
|
|||
DestroyContext(cx);
|
||||
}
|
||||
|
||||
JS_PUBLIC_API(JSRuntime*)
|
||||
JS_GetRuntime(JSContext* cx) {
|
||||
return cx->runtime();
|
||||
}
|
||||
|
||||
static JS_CurrentEmbedderTimeFunction currentEmbedderTimeFunction;
|
||||
|
||||
JS_PUBLIC_API(void)
|
||||
|
|
|
|||
|
|
@ -995,6 +995,9 @@ JS_NewContext(uint32_t maxbytes,
|
|||
extern JS_PUBLIC_API(void)
|
||||
JS_DestroyContext(JSContext* cx);
|
||||
|
||||
extern JS_PUBLIC_API(JSRuntime*)
|
||||
JS_GetRuntime(JSContext* cx);
|
||||
|
||||
typedef double (*JS_CurrentEmbedderTimeFunction)();
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue