Changeset 85972 in webkit


Ignore:
Timestamp:
May 6, 2011 1:13:43 PM (13 years ago)
Author:
abarth@webkit.org
Message:

2011-05-06 Adam Barth <abarth@webkit.org>

Reviewed by Eric Seidel.

Wire up CSP's eval blocking to V8's new API
https://bugs.webkit.org/show_bug.cgi?id=60384

  • platform/chromium/http/tests/security/contentSecurityPolicy/eval-blocked-expected.txt: Added.
    • Boo different error messages.
  • platform/chromium/test_expectations.txt:
    • Test progression.

2011-05-06 Adam Barth <abarth@webkit.org>

Reviewed by Eric Seidel.

Wire up CSP's eval blocking to V8's new API
https://bugs.webkit.org/show_bug.cgi?id=60384

  • bindings/v8/ScriptController.cpp: (WebCore::ScriptController::disableEval):
Location:
trunk
Files:
1 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r85971 r85972  
     12011-05-06  Adam Barth  <abarth@webkit.org>
     2
     3        Reviewed by Eric Seidel.
     4
     5        Wire up CSP's eval blocking to V8's new API
     6        https://bugs.webkit.org/show_bug.cgi?id=60384
     7
     8        * platform/chromium/http/tests/security/contentSecurityPolicy/eval-blocked-expected.txt: Added.
     9            - Boo different error messages.
     10        * platform/chromium/test_expectations.txt:
     11            - Test progression.
     12
    1132011-05-06  David Hyatt  <hyatt@apple.com>
    214
  • trunk/LayoutTests/platform/chromium/test_expectations.txt

    r85970 r85972  
    32993299// Chrome doesn't load favicons in DRT tests.
    33003300BUGWK57259 : http/tests/misc/link-rel-icon-beforeload.html = FAIL PASS
    3301 
    3302 // We need help from V8 to implement this feature.
    3303 // http://code.google.com/p/v8/issues/detail?id=1258
    3304 BUGV8: http/tests/security/contentSecurityPolicy/eval-blocked.html = TEXT
    33053301
    33063302// These tests appears to timeout every 10 or 20 runs.
  • trunk/Source/WebCore/ChangeLog

    r85971 r85972  
     12011-05-06  Adam Barth  <abarth@webkit.org>
     2
     3        Reviewed by Eric Seidel.
     4
     5        Wire up CSP's eval blocking to V8's new API
     6        https://bugs.webkit.org/show_bug.cgi?id=60384
     7
     8        * bindings/v8/ScriptController.cpp:
     9        (WebCore::ScriptController::disableEval):
     10
    1112011-05-06  David Hyatt  <hyatt@apple.com>
    212
  • trunk/Source/WebCore/bindings/v8/ScriptController.cpp

    r85388 r85972  
    308308void ScriptController::disableEval()
    309309{
    310     // FIXME: We need help from V8 to implement this function:
    311     // http://code.google.com/p/v8/issues/detail?id=1258
     310    m_proxy->windowShell()->initContextIfNeeded();
     311
     312    v8::HandleScope handleScope;
     313    v8::Handle<v8::Context> v8Context = V8Proxy::mainWorldContext(m_frame);
     314    if (v8Context.IsEmpty())
     315        return;
     316
     317    v8Context->AllowCodeGenerationFromStrings(false);
    312318}
    313319
Note: See TracChangeset for help on using the changeset viewer.