Web Inspector: breakpoint actions should work regardless of Content Security Policy
https://bugs.webkit.org/show_bug.cgi?id=136542

Patch by Matt Baker <mattbaker@apple.com> on 2014-09-05
Reviewed by Mark Lam.

Source/JavaScriptCore:

Added JSC::DebuggerEvalEnabler, an RAII object which enables eval on a
JSGlobalObject for the duration of a scope, returning the eval enabled state to its
original value when the scope exits. Used by JSC::DebuggerCallFrame::evaluate
to allow breakpoint actions to execute JS in pages with a Content Security Policy
that would normally prohibit this (such as Inspector's Main.html).

Refactored Inspector::InjectedScriptBase to use the RAII object instead of manually
setting eval enabled and then resetting the original eval enabled state.

NOTE: The JS::DebuggerEvalEnabler constructor checks the passed in ExecState pointer
for null to be equivalent with the original code in Inspector::InjectedScriptBase.
InjectedScriptBase is getting the ExecState from ScriptObject::scriptState(), which
can currently be null.

* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
* JavaScriptCore.xcodeproj/project.pbxproj:
* debugger/DebuggerCallFrame.cpp:
(JSC::DebuggerCallFrame::evaluate):
* debugger/DebuggerEvalEnabler.h: Added.
(JSC::DebuggerEvalEnabler::DebuggerEvalEnabler):
(JSC::DebuggerEvalEnabler::~DebuggerEvalEnabler):
* inspector/InjectedScriptBase.cpp:
(Inspector::InjectedScriptBase::callFunctionWithEvalEnabled):

LayoutTests:

Added test for "Evaluate JavaScript" breakpoint actions for breakpoints set on
pages with a CSP that does not allow 'unsafe-eval'.

* inspector/debugger/breakpoint-action-eval-expected.txt: Added.
* inspector/debugger/breakpoint-action-eval.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@173333 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2014-09-05  Geoffrey Garen  <ggaren@apple.com>

        Rolled out <http://trac.webkit.org/changeset/173313>.

        It seems to have broken the PLT bot.

                Do the bmalloc.
                https://bugs.webkit.org/show_bug.cgi?id=132629

                * wtf/FastMalloc.cpp:




git-svn-id: http://svn.webkit.org/repository/webkit/trunk@173334 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove statically used varyings from packing restrictions check.
https://bugs.webkit.org/show_bug.cgi?id=136585.
<rdar://problem/16308409>

Reviewed by Dean Jackson.

* src/compiler/translator/Compiler.cpp:
(TCompiler::enforcePackingRestrictions):
* platform/mac/TestExpectations: Unskip build_009_to_016.html conformance test.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@173335 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Allow pages with unload handlers in the page cache
<rdar://problem/11084669> and https://bugs.webkit.org/show_bug.cgi?id=136535

Reviewed by Oliver Hunt.

Source/WebCore:

This will match what iOS has been doing for some time.

Updated tests for new behavior.

* history/PageCache.cpp:
(WebCore::logCanCacheFrameDecision):
(WebCore::PageCache::canCachePageContainingThisFrame):

LayoutTests:

* fast/frames/frame-crash-with-page-cache-expected.txt:
* fast/frames/resources/cached-page-1.html:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@173336 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed GTK build fix; include StringPrintStream to pull in toString().

* html/HTMLMediaElement.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@173337 268f45cc-cd09-0410-ab3c-d52691b4dbfc