Remove unnecessary exceptions from storage code
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 31 Jul 2017 18:05:09 +0000 (18:05 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 31 Jul 2017 18:05:09 +0000 (18:05 +0000)
https://bugs.webkit.org/show_bug.cgi?id=174572

Patch by Sam Weinig <sam@webkit.org> on 2017-07-31
Reviewed by Chris Dumez.

Source/WebCore:

Remove checks for canAccessStorage() and the exceptions they would cause.
These were used for Storage in ephemeral sessions, but they are now supported.
Add checks for a null frame to functions that can mutate the storage, as the
frame is needed for that, and it retains our existing behavior for disconnected
frames. By removing these checks / exceptions, we can fully generate Storage.idl.

* CMakeLists.txt:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSBindingsAllInOne.cpp:
* bindings/js/JSStorageCustom.cpp: Removed.
Remove JSStorageCustom.cpp

* loader/EmptyClients.cpp:
* page/DOMWindow.cpp:
(WebCore::DOMWindow::sessionStorage):
(WebCore::DOMWindow::localStorage):
* storage/StorageArea.h:
Remove canAccessStorage.

* storage/Storage.cpp:
(WebCore::Storage::length):
(WebCore::Storage::key):
(WebCore::Storage::getItem):
(WebCore::Storage::setItem):
(WebCore::Storage::removeItem):
(WebCore::Storage::clear):
(WebCore::Storage::contains):
(WebCore::Storage::isSupportedPropertyName):
(WebCore::Storage::supportedPropertyNames):
* storage/Storage.h:
* storage/Storage.idl:
Remove canAccessStorage checks and corresponding exceptions. Add supportedPropertyNames
to allow the removal of the [CustomGetOwnPropertyNames].

Source/WebKit:

* WebProcess/Storage/StorageAreaImpl.cpp:
(WebKit::StorageAreaImpl::canAccessStorage): Deleted.
* WebProcess/Storage/StorageAreaImpl.h:
* WebProcess/Storage/StorageNamespaceImpl.cpp:
Remove canAccessStorage. It is no longer called.

Source/WebKitLegacy:

* Storage/StorageAreaImpl.cpp:
(WebKit::StorageAreaImpl::canAccessStorage): Deleted.
* Storage/StorageAreaImpl.h:
Remove canAccessStorage. It is no longer called.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@220071 268f45cc-cd09-0410-ab3c-d52691b4dbfc

18 files changed:
Source/WebCore/CMakeLists.txt
Source/WebCore/ChangeLog
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/bindings/js/JSBindingsAllInOne.cpp
Source/WebCore/bindings/js/JSStorageCustom.cpp [deleted file]
Source/WebCore/loader/EmptyClients.cpp
Source/WebCore/page/DOMWindow.cpp
Source/WebCore/storage/Storage.cpp
Source/WebCore/storage/Storage.h
Source/WebCore/storage/Storage.idl
Source/WebCore/storage/StorageArea.h
Source/WebKit/ChangeLog
Source/WebKit/WebProcess/WebStorage/StorageAreaImpl.cpp
Source/WebKit/WebProcess/WebStorage/StorageAreaImpl.h
Source/WebKit/WebProcess/WebStorage/StorageNamespaceImpl.cpp
Source/WebKitLegacy/ChangeLog
Source/WebKitLegacy/Storage/StorageAreaImpl.cpp
Source/WebKitLegacy/Storage/StorageAreaImpl.h

index 37407b8..37a2aa7 100644 (file)
@@ -1222,7 +1222,6 @@ set(WebCore_SOURCES
     bindings/js/JSReadableStreamPrivateConstructors.cpp
     bindings/js/JSReadableStreamSourceCustom.cpp
     bindings/js/JSSVGPathSegCustom.cpp
-    bindings/js/JSStorageCustom.cpp
     bindings/js/JSStyleSheetCustom.cpp
     bindings/js/JSSubtleCryptoCustom.cpp
     bindings/js/JSTextCustom.cpp
index c1d43b4..761676e 100644 (file)
@@ -1,3 +1,44 @@
+2017-07-31  Sam Weinig  <sam@webkit.org>
+
+        Remove unnecessary exceptions from storage code
+        https://bugs.webkit.org/show_bug.cgi?id=174572
+
+        Reviewed by Chris Dumez.
+
+        Remove checks for canAccessStorage() and the exceptions they would cause.
+        These were used for Storage in ephemeral sessions, but they are now supported.
+        Add checks for a null frame to functions that can mutate the storage, as the
+        frame is needed for that, and it retains our existing behavior for disconnected
+        frames. By removing these checks / exceptions, we can fully generate Storage.idl.
+
+        * CMakeLists.txt:
+        * WebCore.xcodeproj/project.pbxproj:
+        * bindings/js/JSBindingsAllInOne.cpp:
+        * bindings/js/JSStorageCustom.cpp: Removed.
+        Remove JSStorageCustom.cpp
+
+        * loader/EmptyClients.cpp:
+        * page/DOMWindow.cpp:
+        (WebCore::DOMWindow::sessionStorage):
+        (WebCore::DOMWindow::localStorage):
+        * storage/StorageArea.h:
+        Remove canAccessStorage.
+
+        * storage/Storage.cpp:
+        (WebCore::Storage::length):
+        (WebCore::Storage::key):
+        (WebCore::Storage::getItem):
+        (WebCore::Storage::setItem):
+        (WebCore::Storage::removeItem):
+        (WebCore::Storage::clear):
+        (WebCore::Storage::contains):
+        (WebCore::Storage::isSupportedPropertyName):
+        (WebCore::Storage::supportedPropertyNames):
+        * storage/Storage.h:
+        * storage/Storage.idl:
+        Remove canAccessStorage checks and corresponding exceptions. Add supportedPropertyNames
+        to allow the removal of the [CustomGetOwnPropertyNames].
+
 2017-07-31  Matt Lewis  <jlewis3@apple.com>
 
         Unreviewed, rolling out r220060.
index fbf742a..6bbbaa2 100644 (file)
                51C81B890C4422F70019ECE3 /* FTPDirectoryParser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51C81B870C4422F70019ECE3 /* FTPDirectoryParser.cpp */; };
                51C81B8A0C4422F70019ECE3 /* FTPDirectoryParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 51C81B880C4422F70019ECE3 /* FTPDirectoryParser.h */; };
                51CBFC990D10E483002DBF51 /* CachedFramePlatformData.h in Headers */ = {isa = PBXBuildFile; fileRef = 51CBFC980D10E483002DBF51 /* CachedFramePlatformData.h */; settings = {ATTRIBUTES = (Private, ); }; };
-               51D0C5160DAA90B7003B3831 /* JSStorageCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51D0C5150DAA90B7003B3831 /* JSStorageCustom.cpp */; };
                51D1248B1E73627F002B2820 /* NetworkStorageSessionCocoa.mm in Sources */ = {isa = PBXBuildFile; fileRef = 51D1248A1E73625C002B2820 /* NetworkStorageSessionCocoa.mm */; };
                51D1248D1E7364AA002B2820 /* CookieCocoa.mm in Sources */ = {isa = PBXBuildFile; fileRef = 51D1248C1E736456002B2820 /* CookieCocoa.mm */; };
                51D7236C1BB6174900478CA3 /* IDBResultData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51D7236A1BB60BFE00478CA3 /* IDBResultData.cpp */; };
                51C81B870C4422F70019ECE3 /* FTPDirectoryParser.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = FTPDirectoryParser.cpp; sourceTree = "<group>"; };
                51C81B880C4422F70019ECE3 /* FTPDirectoryParser.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = FTPDirectoryParser.h; sourceTree = "<group>"; };
                51CBFC980D10E483002DBF51 /* CachedFramePlatformData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CachedFramePlatformData.h; sourceTree = "<group>"; };
-               51D0C5150DAA90B7003B3831 /* JSStorageCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSStorageCustom.cpp; sourceTree = "<group>"; };
                51D1248A1E73625C002B2820 /* NetworkStorageSessionCocoa.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = NetworkStorageSessionCocoa.mm; sourceTree = "<group>"; };
                51D1248C1E736456002B2820 /* CookieCocoa.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = CookieCocoa.mm; sourceTree = "<group>"; };
                51D7196C181106DF0016DC51 /* DOMWindowIndexedDatabase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DOMWindowIndexedDatabase.cpp; sourceTree = "<group>"; };
                                C6F0917E143A2BB900685849 /* JSMutationObserverCustom.cpp */,
                                A85F22081430377D007CC884 /* JSPopStateEventCustom.cpp */,
                                418C395D1C8F0AAB0051C8A3 /* JSReadableStreamSourceCustom.cpp */,
-                               51D0C5150DAA90B7003B3831 /* JSStorageCustom.cpp */,
                                57A9C88D1DA70BF800BC7305 /* JSSubtleCryptoCustom.cpp */,
                                E1FF8F661807460800132674 /* JSWebKitSubtleCryptoCustom.cpp */,
                                BC348BBD0DB7F531004ABAB9 /* JSXMLHttpRequestCustom.cpp */,
                                B59DD6A211902A52007E9684 /* JSSQLTransactionErrorCallback.cpp in Sources */,
                                A86629D409DA2B48009633A7 /* JSStaticRange.cpp in Sources */,
                                51E3F9D60DA05E1D00250911 /* JSStorage.cpp in Sources */,
-                               51D0C5160DAA90B7003B3831 /* JSStorageCustom.cpp in Sources */,
                                51E0BAEA0DA55D4A00A9E417 /* JSStorageEvent.cpp in Sources */,
                                0FF50269102BA9430066F39A /* JSStyleMedia.cpp in Sources */,
                                BCE0139A0C0BEF180043860A /* JSStyleSheet.cpp in Sources */,
index 2666454..2e3812d 100644 (file)
@@ -85,7 +85,6 @@
 #include "JSPopStateEventCustom.cpp"
 #include "JSReadableStreamPrivateConstructors.cpp"
 #include "JSSVGPathSegCustom.cpp"
-#include "JSStorageCustom.cpp"
 #include "JSStyleSheetCustom.cpp"
 #include "JSTextCustom.cpp"
 #include "JSTextTrackCueCustom.cpp"
diff --git a/Source/WebCore/bindings/js/JSStorageCustom.cpp b/Source/WebCore/bindings/js/JSStorageCustom.cpp
deleted file mode 100644 (file)
index 739b6c7..0000000
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Copyright (C) 2008 Apple Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
- */
-
-#include "config.h"
-#include "JSStorage.h"
-
-#include "JSDOMConvertStrings.h"
-#include "JSDOMExceptionHandling.h"
-#include <runtime/JSCInlines.h>
-#include <runtime/PropertyNameArray.h>
-#include <wtf/text/WTFString.h>
-
-using namespace JSC;
-
-namespace WebCore {
-
-void JSStorage::getOwnPropertyNames(JSObject* object, ExecState* state, PropertyNameArray& propertyNames, EnumerationMode mode)
-{
-    VM& vm = state->vm();
-    auto scope = DECLARE_THROW_SCOPE(vm);
-
-    auto& thisObject = *jsCast<JSStorage*>(object);
-    auto lengthResult = thisObject.wrapped().length();
-    if (lengthResult.hasException()) {
-        propagateException(*state, scope, lengthResult.releaseException());
-        return;
-    }
-    unsigned length = lengthResult.releaseReturnValue();
-    for (unsigned i = 0; i < length; ++i) {
-        auto keyResult = thisObject.wrapped().key(i);
-        if (keyResult.hasException()) {
-            propagateException(*state, scope, lengthResult.releaseException());
-            return;
-        }
-        propertyNames.add(Identifier::fromString(state, keyResult.releaseReturnValue()));
-    }
-        
-    Base::getOwnPropertyNames(&thisObject, state, propertyNames, mode);
-}
-
-} // namespace WebCore
index 05fdf11..f864258 100644 (file)
@@ -549,7 +549,6 @@ class EmptyStorageNamespaceProvider final : public StorageNamespaceProvider {
         void removeItem(Frame*, const String&) final { }
         void clear(Frame*) final { }
         bool contains(const String&) final { return false; }
-        bool canAccessStorage(Frame*) final { return false; }
         StorageType storageType() const final { return StorageType::Local; }
         size_t memoryBytesUsedByCache() final { return 0; }
         SecurityOriginData securityOrigin() const final { return { }; }
index 5c6c03c..3e4ad11 100644 (file)
@@ -864,20 +864,14 @@ ExceptionOr<Storage*> DOMWindow::sessionStorage() const
     if (!document->securityOrigin().canAccessSessionStorage(document->topOrigin()))
         return Exception { SecurityError };
 
-    if (m_sessionStorage) {
-        if (!m_sessionStorage->area().canAccessStorage(m_frame))
-            return Exception { SecurityError };
+    if (m_sessionStorage)
         return m_sessionStorage.get();
-    }
 
     auto* page = document->page();
     if (!page)
         return nullptr;
 
     auto storageArea = page->sessionStorage()->storageArea(SecurityOriginData::fromSecurityOrigin(document->securityOrigin()));
-    if (!storageArea->canAccessStorage(m_frame))
-        return Exception { SecurityError };
-
     m_sessionStorage = Storage::create(m_frame, WTFMove(storageArea));
     return m_sessionStorage.get();
 }
@@ -898,11 +892,8 @@ ExceptionOr<Storage*> DOMWindow::localStorage() const
     // FIXME: We should consider supporting access/modification to local storage
     // after calling window.close(). See <https://bugs.webkit.org/show_bug.cgi?id=135330>.
     if (!page || !page->isClosing()) {
-        if (m_localStorage) {
-            if (!m_localStorage->area().canAccessStorage(m_frame))
-                return Exception { SecurityError };
+        if (m_localStorage)
             return m_localStorage.get();
-        }
     }
 
     if (!page)
@@ -915,10 +906,6 @@ ExceptionOr<Storage*> DOMWindow::localStorage() const
         return nullptr;
 
     auto storageArea = page->storageNamespaceProvider().localStorageArea(*document);
-
-    if (!storageArea->canAccessStorage(m_frame))
-        return Exception { SecurityError };
-
     m_localStorage = Storage::create(m_frame, WTFMove(storageArea));
     return m_localStorage.get();
 }
index ac9a166..adb1954 100644 (file)
@@ -57,34 +57,25 @@ Storage::~Storage()
     m_storageArea->decrementAccessCount();
 }
 
-ExceptionOr<unsigned> Storage::length() const
+unsigned Storage::length() const
 {
-    if (!m_storageArea->canAccessStorage(m_frame))
-        return Exception { SecurityError };
-
     return m_storageArea->length();
 }
 
-ExceptionOr<String> Storage::key(unsigned index) const
+String Storage::key(unsigned index) const
 {
-    if (!m_storageArea->canAccessStorage(m_frame))
-        return Exception { SecurityError };
-
     return m_storageArea->key(index);
 }
 
-ExceptionOr<String> Storage::getItem(const String& key) const
+String Storage::getItem(const String& key) const
 {
-    if (!m_storageArea->canAccessStorage(m_frame))
-        return Exception { SecurityError };
-
     return m_storageArea->item(key);
 }
 
 ExceptionOr<void> Storage::setItem(const String& key, const String& value)
 {
-    if (!m_storageArea->canAccessStorage(m_frame))
-        return Exception { SecurityError };
+    if (!m_frame)
+        return Exception { InvalidAccessError };
 
     bool quotaException = false;
     m_storageArea->setItem(m_frame, key, value, quotaException);
@@ -95,8 +86,8 @@ ExceptionOr<void> Storage::setItem(const String& key, const String& value)
 
 ExceptionOr<void> Storage::removeItem(const String& key)
 {
-    if (!m_storageArea->canAccessStorage(m_frame))
-        return Exception { SecurityError };
+    if (!m_frame)
+        return Exception { InvalidAccessError };
 
     m_storageArea->removeItem(m_frame, key);
     return { };
@@ -104,27 +95,34 @@ ExceptionOr<void> Storage::removeItem(const String& key)
 
 ExceptionOr<void> Storage::clear()
 {
-    if (!m_storageArea->canAccessStorage(m_frame))
-        return Exception { SecurityError };
+    if (!m_frame)
+        return Exception { InvalidAccessError };
 
     m_storageArea->clear(m_frame);
     return { };
 }
 
-ExceptionOr<bool> Storage::contains(const String& key) const
+bool Storage::contains(const String& key) const
 {
-    if (!m_storageArea->canAccessStorage(m_frame))
-        return Exception { SecurityError };
-
     return m_storageArea->contains(key);
 }
 
 bool Storage::isSupportedPropertyName(const String& propertyName) const
 {
-    if (!m_storageArea->canAccessStorage(m_frame))
-        return false;
-
     return m_storageArea->contains(propertyName);
 }
 
+Vector<AtomicString> Storage::supportedPropertyNames() const
+{
+    unsigned length = m_storageArea->length();
+
+    Vector<AtomicString> result;
+    result.reserveInitialCapacity(length);
+
+    for (unsigned i = 0; i < length; ++i)
+        result.uncheckedAppend(m_storageArea->key(i));
+
+    return result;
+}
+
 } // namespace WebCore
index 8de44fa..89c4781 100644 (file)
@@ -39,16 +39,17 @@ public:
     static Ref<Storage> create(Frame*, RefPtr<StorageArea>&&);
     ~Storage();
 
-    ExceptionOr<unsigned> length() const;
-    ExceptionOr<String> key(unsigned index) const;
-    ExceptionOr<String> getItem(const String& key) const;
+    unsigned length() const;
+    String key(unsigned index) const;
+    String getItem(const String& key) const;
     ExceptionOr<void> setItem(const String& key, const String& value);
     ExceptionOr<void> removeItem(const String& key);
     ExceptionOr<void> clear();
-    ExceptionOr<bool> contains(const String& key) const;
+    bool contains(const String& key) const;
 
     // Bindings support functions.
     bool isSupportedPropertyName(const String&) const;
+    Vector<AtomicString> supportedPropertyNames() const;
 
     StorageArea& area() const { return *m_storageArea; }
 
index 302952d..a3e370e 100644 (file)
  */
 
 [
-    CustomGetOwnPropertyNames,
     GenerateIsReachable=ImplFrame,
     SkipVTableValidation,
 ] interface Storage {
-    [GetterMayThrowException] readonly attribute unsigned long length;
-    [MayThrowException] DOMString? key(unsigned long index);
-    [MayThrowException] getter DOMString? getItem(DOMString key);
+    readonly attribute unsigned long length;
+    DOMString? key(unsigned long index);
+    getter DOMString? getItem(DOMString key);
     [MayThrowException] setter void setItem(DOMString key, DOMString data);
     [MayThrowException] deleter void removeItem(DOMString key);
     [MayThrowException] void clear();
 };
-
index 9743fde..78997a9 100644 (file)
@@ -51,7 +51,6 @@ public:
     virtual void clear(Frame* sourceFrame) = 0;
     virtual bool contains(const String& key) = 0;
 
-    virtual bool canAccessStorage(Frame*) = 0;
     virtual StorageType storageType() const = 0;
 
     virtual size_t memoryBytesUsedByCache() = 0;
index e203283..a5c00f2 100644 (file)
@@ -1,3 +1,16 @@
+2017-07-31  Sam Weinig  <sam@webkit.org>
+
+        Remove unnecessary exceptions from storage code
+        https://bugs.webkit.org/show_bug.cgi?id=174572
+
+        Reviewed by Chris Dumez.
+
+        * WebProcess/Storage/StorageAreaImpl.cpp:
+        (WebKit::StorageAreaImpl::canAccessStorage): Deleted.
+        * WebProcess/Storage/StorageAreaImpl.h:
+        * WebProcess/Storage/StorageNamespaceImpl.cpp:
+        Remove canAccessStorage. It is no longer called.
+
 2017-07-30  Brady Eidson  <beidson@apple.com>
 
         Add URLSchemeHandler API tests that verify the lack of URLSchemeTask object leaks.
index be8507a..c30dfed 100644 (file)
@@ -96,11 +96,6 @@ bool StorageAreaImpl::contains(const String& key)
     return m_storageAreaMap->contains(key);
 }
 
-bool StorageAreaImpl::canAccessStorage(Frame* frame)
-{
-    return frame && frame->page();
-}
-
 StorageType StorageAreaImpl::storageType() const
 {
     return m_storageAreaMap->storageType();
index 98b6b3f..b55369a 100644 (file)
@@ -56,7 +56,6 @@ private:
     void removeItem(WebCore::Frame* sourceFrame, const String& key) override;
     void clear(WebCore::Frame* sourceFrame) override;
     bool contains(const String& key) override;
-    bool canAccessStorage(WebCore::Frame*) override;
     WebCore::StorageType storageType() const override;
     size_t memoryBytesUsedByCache() override;
     void incrementAccessCount() override;
index 2abbc5c..21fd587 100644 (file)
@@ -163,11 +163,6 @@ private:
         return m_storageMap->contains(key);
     }
 
-    bool canAccessStorage(Frame* frame)
-    {
-        return frame && frame->page();
-    }
-
     StorageType storageType() const
     {
         return StorageType::EphemeralLocal;
index b2d360b..6229166 100644 (file)
@@ -1,3 +1,15 @@
+2017-07-31  Sam Weinig  <sam@webkit.org>
+
+        Remove unnecessary exceptions from storage code
+        https://bugs.webkit.org/show_bug.cgi?id=174572
+
+        Reviewed by Chris Dumez.
+
+        * Storage/StorageAreaImpl.cpp:
+        (WebKit::StorageAreaImpl::canAccessStorage): Deleted.
+        * Storage/StorageAreaImpl.h:
+        Remove canAccessStorage. It is no longer called.
+
 2017-07-14  Filip Pizlo  <fpizlo@apple.com>
 
         It should be easy to decide how WebKit yields
index ebb80f2..fc9562f 100644 (file)
@@ -98,11 +98,6 @@ StorageAreaImpl::StorageAreaImpl(const StorageAreaImpl& area)
     ASSERT(!m_isShutdown);
 }
 
-bool StorageAreaImpl::canAccessStorage(Frame* frame)
-{
-    return frame && frame->page();
-}
-
 StorageType StorageAreaImpl::storageType() const
 {
     return m_storageType;
index d8cd2f8..1647722 100644 (file)
@@ -53,7 +53,6 @@ public:
     void clear(WebCore::Frame* sourceFrame) override;
     bool contains(const String& key) override;
 
-    bool canAccessStorage(WebCore::Frame* sourceFrame) override;
     WebCore::StorageType storageType() const override;
 
     size_t memoryBytesUsedByCache() override;