summaryrefslogtreecommitdiffstats
path: root/WebCore/bindings/js/JSHTMLIFrameElementCustom.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/bindings/js/JSHTMLIFrameElementCustom.cpp')
-rw-r--r--WebCore/bindings/js/JSHTMLIFrameElementCustom.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/WebCore/bindings/js/JSHTMLIFrameElementCustom.cpp b/WebCore/bindings/js/JSHTMLIFrameElementCustom.cpp
index 8e32381..60ea45e 100644
--- a/WebCore/bindings/js/JSHTMLIFrameElementCustom.cpp
+++ b/WebCore/bindings/js/JSHTMLIFrameElementCustom.cpp
@@ -32,12 +32,15 @@
#include "CSSHelper.h"
#include "Document.h"
#include "HTMLIFrameElement.h"
+#include "HTMLNames.h"
#include "JSDOMBinding.h"
using namespace JSC;
namespace WebCore {
+using namespace HTMLNames;
+
void JSHTMLIFrameElement::setSrc(ExecState* exec, JSValue value)
{
HTMLIFrameElement* imp = static_cast<HTMLIFrameElement*>(impl());
@@ -45,11 +48,12 @@ void JSHTMLIFrameElement::setSrc(ExecState* exec, JSValue value)
String srcValue = valueToStringWithNullCheck(exec, value);
if (protocolIsJavaScript(deprecatedParseURL(srcValue))) {
- if (!checkNodeSecurity(exec, imp->contentDocument()))
+ Document* contentDocument = imp->contentDocument();
+ if (contentDocument && !checkNodeSecurity(exec, contentDocument))
return;
}
- imp->setSrc(srcValue);
+ imp->setAttribute(srcAttr, srcValue);
}
} // namespace WebCore