Function mozjs_sys::jsapi::JS_GetFunctionDisplayId

source ·
pub unsafe extern "C" fn JS_GetFunctionDisplayId(
    cx: *mut JSContext,
    fun: Handle<*mut JSFunction>,
    name: MutableHandle<*mut JSString>,
) -> bool
Expand description

Return a function’s display name as name out-parameter.

This is the defined name if one was given where the function was defined, or it could be an inferred name by the JS engine in the case that the function was defined to be anonymous.

This can still return nullptr as name out-parameter if a useful display name could not be inferred.

This function returns false if any error happens while generating the function name string for a function with lazy name.