void V8HTMLFrameElement::locationAttributeSetterCustom(v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
HTMLFrameElement* frame = V8HTMLFrameElement::toNative(info.Holder());
- String locationValue = toWebCoreStringWithNullCheck(value);
+ V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<WithNullCheck>, locationValue, value);
- ExceptionState es(info.GetIsolate());
- if (protocolIsJavaScript(stripLeadingAndTrailingHTMLSpaces(locationValue)) && !BindingSecurity::shouldAllowAccessToFrame(frame->contentFrame(), es)) {
- es.throwIfNeeded();
+ ExceptionState exceptionState(ExceptionState::SetterContext, "location", "HTMLFrameElement", info.Holder(), info.GetIsolate());
+ if (protocolIsJavaScript(stripLeadingAndTrailingHTMLSpaces(locationValue)) && !BindingSecurity::shouldAllowAccessToFrame(info.GetIsolate(), frame->contentFrame(), exceptionState)) {
+ exceptionState.throwIfNeeded();
return;
}