Commit 9899d7db authored by jorlow@chromium.org's avatar jorlow@chromium.org

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):


git-svn-id: svn://svn.chromium.org/blink/trunk@54046 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent b0622f8e
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):
2010-01-28 Michael Nordman <michaeln@google.com>
Reviewed by Alexey Proskuryakov.
......
......@@ -65,7 +65,9 @@ class WebViewClient : virtual public WebWidgetClient {
public:
// Factory methods -----------------------------------------------------
// Create a new related WebView.
// Create a new related WebView. This method must clone its session storage
// so any subsequent calls to createSessionStorageNamespace conform to the
// WebStorage specification.
virtual WebView* createView(WebFrame* creator) { return 0; }
// Create a new WebPopupMenu. In the second form, the client is
......@@ -73,7 +75,7 @@ public:
virtual WebWidget* createPopupMenu(bool activatable) { return 0; }
virtual WebWidget* createPopupMenu(const WebPopupMenuInfo&) { return 0; }
// Create a session storage namespace associated with this WebView.
// Create a session storage namespace object associated with this WebView.
virtual WebStorageNamespace* createSessionStorageNamespace() { return 0; }
// Misc ----------------------------------------------------------------
......
......@@ -66,7 +66,14 @@ StorageNamespaceProxy::~StorageNamespaceProxy()
PassRefPtr<StorageNamespace> StorageNamespaceProxy::copy()
{
return adoptRef(new StorageNamespaceProxy(m_storageNamespace->copy(), m_storageType));
ASSERT(m_storageType == SessionStorage);
// The WebViewClient knows what its session storage namespace id is but we
// do not. Returning 0 here causes it to be fetched (via the WebViewClient)
// on its next use. Note that it is WebViewClient::createView's
// responsibility to clone the session storage namespace id and that the
// only time copy() is called is directly after the createView call...which
// is why all of this is safe.
return 0;
}
PassRefPtr<StorageArea> StorageNamespaceProxy::storageArea(PassRefPtr<SecurityOrigin> origin)
......
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