Upstream version 7.35.144.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / Source / bindings / v8 / custom / V8HTMLFrameElementCustom.cpp
index 7acc533..c9e108b 100644 (file)
@@ -45,11 +45,11 @@ using namespace HTMLNames;
 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;
     }