Function script::dom::bindings::import::module::jsapi::HideScriptedCaller

source ยท
pub unsafe extern "C" fn HideScriptedCaller(cx: *mut JSContext)
Expand description

Informs the JS engine that the scripted caller should be hidden. This can be used by the embedding to maintain an override of the scripted caller in its calculations, by hiding the scripted caller in the JS engine and pushing data onto a separate stack, which it inspects when DescribeScriptedCaller returns null.

We maintain a counter on each activation record. Add() increments the counter of the topmost activation, and Remove() decrements it. The count may never drop below zero, and must always be exactly zero when the activation is popped from the stack.