- Revision
- 100041
- Author
- [email protected]
- Date
- 2011-11-11 15:54:14 -0800 (Fri, 11 Nov 2011)
Log Message
Remove no-op StorageNamespace::unlock method
https://bugs.webkit.org/show_bug.cgi?id=72181
Reviewed by Darin Adler.
Source/WebCore:
The method was meant to support the localStorage mutex,
but the approach of using a mutex for localStorage has never been
implemented (and almost certainly won't be). Even if it were implemented,
it's not being called at the right time, due to bugs in the V8 bindings'
use of V8Proxy (see http://webkit.org/b/72063 for details).
If, in the future, some replacement for a mutex is used to synchronize
localStorage access, it can easily be re-added to the (hopefully
fixed-by-then) replacement for V8Proxy::didLeaveScriptContext.
* bindings/v8/V8Proxy.cpp:
(WebCore::V8Proxy::didLeaveScriptContext): Stop calling unlock().
* page/Navigator.cpp:
(WebCore::Navigator::getStorageUpdates): Remove implementation (a call to unlock), but leave code as it's exposed to the platform.
* page/Navigator.idl: Added a FIXME to remove getStorageUpdates from the platform.
* storage/StorageNamespace.h:
* storage/StorageNamespaceImpl.cpp:
* storage/StorageNamespaceImpl.h:
Source/WebKit/chromium:
* src/StorageNamespaceProxy.cpp:
* src/StorageNamespaceProxy.h:
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (100040 => 100041)
--- trunk/Source/WebCore/ChangeLog 2011-11-11 23:52:09 UTC (rev 100040)
+++ trunk/Source/WebCore/ChangeLog 2011-11-11 23:54:14 UTC (rev 100041)
@@ -1,3 +1,29 @@
+2011-11-11 Adam Klein <[email protected]>
+
+ Remove no-op StorageNamespace::unlock method
+ https://bugs.webkit.org/show_bug.cgi?id=72181
+
+ Reviewed by Darin Adler.
+
+ The method was meant to support the localStorage mutex,
+ but the approach of using a mutex for localStorage has never been
+ implemented (and almost certainly won't be). Even if it were implemented,
+ it's not being called at the right time, due to bugs in the V8 bindings'
+ use of V8Proxy (see http://webkit.org/b/72063 for details).
+
+ If, in the future, some replacement for a mutex is used to synchronize
+ localStorage access, it can easily be re-added to the (hopefully
+ fixed-by-then) replacement for V8Proxy::didLeaveScriptContext.
+
+ * bindings/v8/V8Proxy.cpp:
+ (WebCore::V8Proxy::didLeaveScriptContext): Stop calling unlock().
+ * page/Navigator.cpp:
+ (WebCore::Navigator::getStorageUpdates): Remove implementation (a call to unlock), but leave code as it's exposed to the platform.
+ * page/Navigator.idl: Added a FIXME to remove getStorageUpdates from the platform.
+ * storage/StorageNamespace.h:
+ * storage/StorageNamespaceImpl.cpp:
+ * storage/StorageNamespaceImpl.h:
+
2011-11-11 Alexis Menard <[email protected]>
[Qt][WK2] Make sure Scrollbars are in their own layer.
Modified: trunk/Source/WebCore/bindings/v8/V8Proxy.cpp (100040 => 100041)
--- trunk/Source/WebCore/bindings/v8/V8Proxy.cpp 2011-11-11 23:52:09 UTC (rev 100040)
+++ trunk/Source/WebCore/bindings/v8/V8Proxy.cpp 2011-11-11 23:54:14 UTC (rev 100041)
@@ -45,12 +45,10 @@
#include "IDBPendingTransactionMonitor.h"
#include "InspectorInstrumentation.h"
#include "Page.h"
-#include "PageGroup.h"
#include "PlatformSupport.h"
#include "ScriptSourceCode.h"
#include "SecurityOrigin.h"
#include "Settings.h"
-#include "StorageNamespace.h"
#include "V8Binding.h"
#include "V8BindingState.h"
#include "V8Collection.h"
@@ -589,22 +587,15 @@
void V8Proxy::didLeaveScriptContext()
{
- Page* page = m_frame->page();
- if (!page)
- return;
- // If we've just left a top level script context and local storage has been
- // instantiated, we must ensure that any storage locks have been freed.
- // Per http://dev.w3.org/html5/spec/Overview.html#storage-mutex
if (m_recursion)
return;
+
#if ENABLE(INDEXED_DATABASE)
// If we've just left a script context and indexed database has been
// instantiated, we must let its transaction coordinator know so it can terminate
// any not-yet-started transactions.
IDBPendingTransactionMonitor::abortPendingTransactions();
#endif // ENABLE(INDEXED_DATABASE)
- if (page->group().hasLocalStorage())
- page->group().localStorage()->unlock();
#if ENABLE(MUTATION_OBSERVERS)
WebCore::WebKitMutationObserver::deliverAllMutations();
Modified: trunk/Source/WebCore/page/Navigator.cpp (100040 => 100041)
--- trunk/Source/WebCore/page/Navigator.cpp 2011-11-11 23:52:09 UTC (rev 100040)
+++ trunk/Source/WebCore/page/Navigator.cpp 2011-11-11 23:54:14 UTC (rev 100041)
@@ -172,16 +172,7 @@
void Navigator::getStorageUpdates()
{
- if (!m_frame)
- return;
-
- Page* page = m_frame->page();
- if (!page)
- return;
-
- StorageNamespace* localStorage = page->group().localStorage();
- if (localStorage)
- localStorage->unlock();
+ // FIXME: Remove this method or rename to yieldForStorageUpdates.
}
#if ENABLE(REGISTER_PROTOCOL_HANDLER)
Modified: trunk/Source/WebCore/page/Navigator.idl (100040 => 100041)
--- trunk/Source/WebCore/page/Navigator.idl 2011-11-11 23:52:09 UTC (rev 100040)
+++ trunk/Source/WebCore/page/Navigator.idl 2011-11-11 23:54:14 UTC (rev 100041)
@@ -44,7 +44,7 @@
readonly attribute [EnabledAtRuntime] Geolocation geolocation;
#endif
- void getStorageUpdates();
+ void getStorageUpdates(); // FIXME: Remove this method or rename to yieldForStorageUpdates.
#if defined(ENABLE_REGISTER_PROTOCOL_HANDLER) && ENABLE_REGISTER_PROTOCOL_HANDLER
void registerProtocolHandler(in DOMString scheme, in DOMString url, in DOMString title)
Modified: trunk/Source/WebCore/storage/StorageNamespace.h (100040 => 100041)
--- trunk/Source/WebCore/storage/StorageNamespace.h 2011-11-11 23:52:09 UTC (rev 100040)
+++ trunk/Source/WebCore/storage/StorageNamespace.h 2011-11-11 23:54:14 UTC (rev 100041)
@@ -47,7 +47,6 @@
virtual PassRefPtr<StorageArea> storageArea(PassRefPtr<SecurityOrigin>) = 0;
virtual PassRefPtr<StorageNamespace> copy() = 0;
virtual void close() = 0;
- virtual void unlock() = 0;
virtual void clearOriginForDeletion(SecurityOrigin*) = 0;
virtual void clearAllOriginsForDeletion() = 0;
virtual void sync() = 0;
Modified: trunk/Source/WebCore/storage/StorageNamespaceImpl.cpp (100040 => 100041)
--- trunk/Source/WebCore/storage/StorageNamespaceImpl.cpp 2011-11-11 23:52:09 UTC (rev 100040)
+++ trunk/Source/WebCore/storage/StorageNamespaceImpl.cpp 2011-11-11 23:54:14 UTC (rev 100041)
@@ -139,11 +139,6 @@
m_isShutdown = true;
}
-void StorageNamespaceImpl::unlock()
-{
- // Because there's a single event loop per-process, this is a no-op.
-}
-
void StorageNamespaceImpl::clearOriginForDeletion(SecurityOrigin* origin)
{
ASSERT(isMainThread());
Modified: trunk/Source/WebCore/storage/StorageNamespaceImpl.h (100040 => 100041)
--- trunk/Source/WebCore/storage/StorageNamespaceImpl.h 2011-11-11 23:52:09 UTC (rev 100040)
+++ trunk/Source/WebCore/storage/StorageNamespaceImpl.h 2011-11-11 23:54:14 UTC (rev 100041)
@@ -47,7 +47,6 @@
virtual PassRefPtr<StorageArea> storageArea(PassRefPtr<SecurityOrigin>);
virtual PassRefPtr<StorageNamespace> copy();
virtual void close();
- virtual void unlock();
// Not removing the origin's StorageArea from m_storageAreaMap because
// we're just deleting the underlying db file. If an item is added immediately
Modified: trunk/Source/WebKit/chromium/ChangeLog (100040 => 100041)
--- trunk/Source/WebKit/chromium/ChangeLog 2011-11-11 23:52:09 UTC (rev 100040)
+++ trunk/Source/WebKit/chromium/ChangeLog 2011-11-11 23:54:14 UTC (rev 100041)
@@ -1,3 +1,13 @@
+2011-11-11 Adam Klein <[email protected]>
+
+ Remove no-op StorageNamespace::unlock method
+ https://bugs.webkit.org/show_bug.cgi?id=72181
+
+ Reviewed by Darin Adler.
+
+ * src/StorageNamespaceProxy.cpp:
+ * src/StorageNamespaceProxy.h:
+
2011-11-11 Stephen Chenney <[email protected]>
[Chromium] DRT does not have LayoutTestController.pageSizeAndMarginsInPixels
Modified: trunk/Source/WebKit/chromium/src/StorageNamespaceProxy.cpp (100040 => 100041)
--- trunk/Source/WebKit/chromium/src/StorageNamespaceProxy.cpp 2011-11-11 23:52:09 UTC (rev 100040)
+++ trunk/Source/WebKit/chromium/src/StorageNamespaceProxy.cpp 2011-11-11 23:54:14 UTC (rev 100041)
@@ -85,11 +85,6 @@
m_storageNamespace->close();
}
-void StorageNamespaceProxy::unlock()
-{
- // FIXME: Implement.
-}
-
void StorageNamespaceProxy::clearOriginForDeletion(SecurityOrigin* origin)
{
ASSERT_NOT_REACHED();
Modified: trunk/Source/WebKit/chromium/src/StorageNamespaceProxy.h (100040 => 100041)
--- trunk/Source/WebKit/chromium/src/StorageNamespaceProxy.h 2011-11-11 23:52:09 UTC (rev 100040)
+++ trunk/Source/WebKit/chromium/src/StorageNamespaceProxy.h 2011-11-11 23:54:14 UTC (rev 100041)
@@ -40,7 +40,6 @@
virtual PassRefPtr<StorageArea> storageArea(PassRefPtr<SecurityOrigin>);
virtual PassRefPtr<StorageNamespace> copy();
virtual void close();
- virtual void unlock();
virtual void clearOriginForDeletion(SecurityOrigin*);
virtual void clearAllOriginsForDeletion();