Changeset 54046 in webkit


Ignore:
Timestamp:
Jan 28, 2010 11:15:20 PM (14 years ago)
Author:
jorlow@chromium.org
Message:

2010-01-28 Jeremy Orlow <jorlow@chromium.org>

Reviewed by Darin Fisher.

StorageNamespaceProxy::copy() should be a no-op
https://bugs.webkit.org/show_bug.cgi?id=34298

The comment in the code should make clear why.

  • public/WebViewClient.h:
  • src/StorageNamespaceProxy.cpp: (WebCore::StorageNamespaceProxy::copy):
Location:
trunk/WebKit/chromium
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKit/chromium/ChangeLog

    r54044 r54046  
     12010-01-28  Jeremy Orlow  <jorlow@chromium.org>
     2
     3        Reviewed by Darin Fisher.
     4
     5        StorageNamespaceProxy::copy() should be a no-op
     6        https://bugs.webkit.org/show_bug.cgi?id=34298
     7
     8        The comment in the code should make clear why.
     9
     10        * public/WebViewClient.h:
     11        * src/StorageNamespaceProxy.cpp:
     12        (WebCore::StorageNamespaceProxy::copy):
     13
    1142010-01-28  Michael Nordman  <michaeln@google.com>
    215
  • trunk/WebKit/chromium/public/WebViewClient.h

    r53389 r54046  
    6666    // Factory methods -----------------------------------------------------
    6767
    68     // Create a new related WebView.
     68    // Create a new related WebView.  This method must clone its session storage
     69    // so any subsequent calls to createSessionStorageNamespace conform to the
     70    // WebStorage specification.
    6971    virtual WebView* createView(WebFrame* creator) { return 0; }
    7072
     
    7476    virtual WebWidget* createPopupMenu(const WebPopupMenuInfo&) { return 0; }
    7577
    76     // Create a session storage namespace associated with this WebView.
     78    // Create a session storage namespace object associated with this WebView.
    7779    virtual WebStorageNamespace* createSessionStorageNamespace() { return 0; }
    7880
  • trunk/WebKit/chromium/src/StorageNamespaceProxy.cpp

    r53710 r54046  
    6767PassRefPtr<StorageNamespace> StorageNamespaceProxy::copy()
    6868{
    69     return adoptRef(new StorageNamespaceProxy(m_storageNamespace->copy(), m_storageType));
     69    ASSERT(m_storageType == SessionStorage);
     70    // The WebViewClient knows what its session storage namespace id is but we
     71    // do not.  Returning 0 here causes it to be fetched (via the WebViewClient)
     72    // on its next use.  Note that it is WebViewClient::createView's
     73    // responsibility to clone the session storage namespace id and that the
     74    // only time copy() is called is directly after the createView call...which
     75    // is why all of this is safe.
     76    return 0;
    7077}
    7178
Note: See TracChangeset for help on using the changeset viewer.