[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.19-706-ge5415e9

jorlow at chromium.org jorlow at chromium.org
Thu Feb 4 21:31:58 UTC 2010


The following commit has been merged in the webkit-1.1 branch:
commit ce31501866319f40a8fe664f2e1d4b26485f09e3
Author: jorlow at chromium.org <jorlow at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Jan 29 07:15:20 2010 +0000

    2010-01-28  Jeremy Orlow  <jorlow at 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: http://svn.webkit.org/repository/webkit/trunk@54046 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit/chromium/ChangeLog b/WebKit/chromium/ChangeLog
index 5c3950f..791b933 100644
--- a/WebKit/chromium/ChangeLog
+++ b/WebKit/chromium/ChangeLog
@@ -1,3 +1,16 @@
+2010-01-28  Jeremy Orlow  <jorlow at 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 at google.com>
 
         Reviewed by Alexey Proskuryakov.
diff --git a/WebKit/chromium/public/WebViewClient.h b/WebKit/chromium/public/WebViewClient.h
index 98db4b2..964d382 100644
--- a/WebKit/chromium/public/WebViewClient.h
+++ b/WebKit/chromium/public/WebViewClient.h
@@ -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 ----------------------------------------------------------------
diff --git a/WebKit/chromium/src/StorageNamespaceProxy.cpp b/WebKit/chromium/src/StorageNamespaceProxy.cpp
index 8dca4ca..1be1967 100644
--- a/WebKit/chromium/src/StorageNamespaceProxy.cpp
+++ b/WebKit/chromium/src/StorageNamespaceProxy.cpp
@@ -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)

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list