Function js::jsapi::GetOutermostEnclosingFunctionOfScriptedCaller [] [src]

pub unsafe extern "C" fn GetOutermostEnclosingFunctionOfScriptedCaller(
    cx: *mut JSContext
) -> *mut JSFunction

Return the outermost enclosing function (script) of the scripted caller. This function returns nullptr in several cases: - no script is running on the context - the caller is in global or eval code In particular, this function will "stop" its outermost search at eval() and thus it will really return the outermost enclosing function since the innermost eval.