Пример #1
0
void V8HTMLFrameElement::locationAttrSetterCustom(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
    HTMLFrameElement* frame = V8HTMLFrameElement::toNative(info.Holder());
    String locationValue = toWebCoreStringWithNullCheck(value);

    if (!BindingSecurity::allowSettingFrameSrcToJavascriptUrl(frame, locationValue))
        return;

    frame->setLocation(locationValue);
}
void V8HTMLFrameElement::locationAccessorSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
{
    HTMLFrameElement* frame = V8HTMLFrameElement::toNative(info.Holder());
    String locationValue = toWebCoreStringWithNullCheck(value);

    if (!V8BindingSecurity::allowSettingFrameSrcToJavascriptUrl(V8BindingState::Only(), frame, locationValue))
        return;

    frame->setLocation(locationValue);
}
void JSHTMLFrameElement::setLocation(ExecState* exec, JSValue value)
{
    HTMLFrameElement* imp = impl();
    String locationValue = valueToStringWithNullCheck(exec, value);

    if (!allowSettingJavascriptURL(exec, imp, locationValue))
        return;

    imp->setLocation(locationValue);
}