[js] Add some utility functions to get the current JS runtime.
parent
a84aca97e2
commit
f9bd1dc92c
|
@ -483,6 +483,11 @@ JS_DestroyContext(JSContext* cx)
|
||||||
DestroyContext(cx);
|
DestroyContext(cx);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
JS_PUBLIC_API(JSRuntime*)
|
||||||
|
JS_GetRuntime(JSContext* cx) {
|
||||||
|
return cx->runtime();
|
||||||
|
}
|
||||||
|
|
||||||
static JS_CurrentEmbedderTimeFunction currentEmbedderTimeFunction;
|
static JS_CurrentEmbedderTimeFunction currentEmbedderTimeFunction;
|
||||||
|
|
||||||
JS_PUBLIC_API(void)
|
JS_PUBLIC_API(void)
|
||||||
|
|
|
@ -995,6 +995,9 @@ JS_NewContext(uint32_t maxbytes,
|
||||||
extern JS_PUBLIC_API(void)
|
extern JS_PUBLIC_API(void)
|
||||||
JS_DestroyContext(JSContext* cx);
|
JS_DestroyContext(JSContext* cx);
|
||||||
|
|
||||||
|
extern JS_PUBLIC_API(JSRuntime*)
|
||||||
|
JS_GetRuntime(JSContext* cx);
|
||||||
|
|
||||||
typedef double (*JS_CurrentEmbedderTimeFunction)();
|
typedef double (*JS_CurrentEmbedderTimeFunction)();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue