Skip to content
  • andersca@apple.com's avatar
    Clone storage namespaces for window.open · 55fda687
    andersca@apple.com authored
    https://bugs.webkit.org/show_bug.cgi?id=114703
    
    Reviewed by Sam Weinig.
    
    Source/WebCore:
    
    Pass the new page to StorageNamespace::copy.
    
    * page/Chrome.cpp:
    (WebCore::Chrome::createWindow):
    * storage/StorageNamespace.h:
    (StorageNamespace):
    * storage/StorageNamespaceImpl.cpp:
    (WebCore::StorageNamespaceImpl::copy):
    * storage/StorageNamespaceImpl.h:
    (WebCore):
    (StorageNamespaceImpl):
    
    Source/WebKit2:
    
    * UIProcess/Storage/StorageManager.cpp:
    (WebKit::StorageManager::StorageArea::clone):
    New helper function for cloning a storage area.
    
    (WebKit::StorageManager::StorageArea::setItem):
    Correctly handle the copy-on-write feature of StorageMap if it has multiple storage areas pointing to it.
    
    (WebKit::StorageManager::StorageArea::removeItem):
    Ditto.
    
    (WebKit::StorageManager::SessionStorageNamespace::cloneTo):
    Add cloned storage areas.
    
    * WebProcess/Storage/StorageNamespaceImpl.cpp:
    (WebKit::StorageNamespaceImpl::copy):
    Create a new session storage namespace for the new page.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@148585 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    55fda687