Exemplo n.º 1
0
JSValue jsTestActiveDOMObjectConstructor(ExecState* exec, JSValue slotBase, PropertyName)
{
    JSTestActiveDOMObject* domObject = jsCast<JSTestActiveDOMObject*>(asObject(slotBase));
    if (!BindingSecurity::shouldAllowAccessToDOMWindow(exec, domObject->impl()))
        return jsUndefined();
    return JSTestActiveDOMObject::getConstructor(exec, domObject->globalObject());
}
Exemplo n.º 2
0
EncodedJSValue jsTestActiveDOMObjectConstructor(ExecState* state, JSObject*, EncodedJSValue thisValue, PropertyName)
{
    JSTestActiveDOMObject* domObject = jsDynamicCast<JSTestActiveDOMObject*>(JSValue::decode(thisValue));
    if (!domObject)
        return throwVMTypeError(state);
    if (!BindingSecurity::shouldAllowAccessToDOMWindow(state, domObject->impl()))
        return JSValue::encode(jsUndefined());
    return JSValue::encode(JSTestActiveDOMObject::getConstructor(state->vm(), domObject->globalObject()));
}