Changeset 26830 in webkit


Ignore:
Timestamp:
Oct 20, 2007 2:00:53 PM (16 years ago)
Author:
bdash
Message:

2007-10-20 Mark Rowe <mrowe@apple.com>

Reviewed by Tim Hatcher.

Workaround for http://bugs.webkit.org/show_bug.cgi?id=15574
Bug 15574: Web Inspector doesn't work with the new Database feature

The executeSql callback is executed in the security domain of the web page that owns the database,
while the inspector's window object is in the callback functions scope chain. This is leading to a
security violation when the callback attempts to access "document". We can work around this by
ensuring that "document" can be found in the scope chain before the window object.

  • page/inspector/DatabasePanel.js:
Location:
trunk/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r26827 r26830  
     12007-10-20  Mark Rowe  <mrowe@apple.com>
     2
     3        Reviewed by Tim Hatcher.
     4
     5        Workaround for http://bugs.webkit.org/show_bug.cgi?id=15574
     6        Bug 15574: Web Inspector doesn't work with the new Database feature
     7
     8        The executeSql callback is executed in the security domain of the web page that owns the database,
     9        while the inspector's window object is in the callback functions scope chain.  This is leading to a
     10        security violation when the callback attempts to access "document".  We can work around this by
     11        ensuring that "document" can be found in the scope chain before the window object.
     12
     13        * page/inspector/DatabasePanel.js:
     14
    1152007-10-20  Darin Adler  <darin@apple.com>
    216
  • trunk/WebCore/page/inspector/DatabasePanel.js

    r26799 r26830  
    124124}
    125125
    126 WebInspector.DatabasePanel.prototype = {
     126// FIXME: The function and local variables are a workaround for http://bugs.webkit.org/show_bug.cgi?id=15574.
     127WebInspector.DatabasePanel.prototype = (function() {
     128var document = window.document;
     129var Math = window.Math;
     130return {
    127131    show: function()
    128132    {
     
    507511    }
    508512}
     513})();
    509514
    510515WebInspector.DatabasePanel.prototype.__proto__ = WebInspector.Panel.prototype;
Note: See TracChangeset for help on using the changeset viewer.