Commit 345d17f8 authored by abarth@webkit.org's avatar abarth@webkit.org
Browse files

2009-12-01 Adam Barth <abarth@webkit.org>

        https://bugs.webkit.org/show_bug.cgi?id=21288

        Unreviewed port of @sandbox to V8.

        * bindings/v8/ScriptController.cpp:
        (WebCore::ScriptController::isEnabled):
        * bindings/v8/custom/V8DOMWindowCustom.cpp:
        (WebCore::createWindow):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@51580 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 8c5918e6
2009-12-01 Adam Barth <abarth@webkit.org>
https://bugs.webkit.org/show_bug.cgi?id=21288
Unreviewed port of @sandbox to V8.
* bindings/v8/ScriptController.cpp:
(WebCore::ScriptController::isEnabled):
* bindings/v8/custom/V8DOMWindowCustom.cpp:
(WebCore::createWindow):
2009-12-01 Patrik Persson <patrik.j.persson@ericsson.com>
 
Reviewed by Darin Adler.
......@@ -294,7 +294,7 @@ bool ScriptController::haveInterpreter() const
bool ScriptController::isEnabled() const
{
Settings* settings = m_proxy->frame()->settings();
return m_proxy->frame()->loader()->client()->allowJavaScript(settings && settings->isJavaScriptEnabled());
return m_proxy->frame()->loader()->client()->allowJavaScript(settings && settings->settings->isJavaScriptEnabled() && !m_frame->loader()->isSandboxed(SandboxScripts));
}
PassScriptInstance ScriptController::createScriptInstanceForWidget(Widget* widget)
......
......@@ -550,6 +550,10 @@ static Frame* createWindow(Frame* callingFrame,
ASSERT(callingFrame);
ASSERT(enteredFrame);
// Sandboxed iframes cannot open new auxiliary browsing contexts.
if (callingFrame && callingFrame->loader()->isSandboxed(SandboxNavigation))
return 0;
ResourceRequest request;
// For whatever reason, Firefox uses the entered frame to determine
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment