Title: [190731] trunk/Source/WebCore
- Revision
- 190731
- Author
- [email protected]
- Date
- 2015-10-08 10:35:25 -0700 (Thu, 08 Oct 2015)
Log Message
Update Inspector to only work with Legacy IDB (for now).
https://bugs.webkit.org/show_bug.cgi?id=149928.
Reviewed by Tim Horton.
* Modules/indexeddb/IDBAny.h:
(WebCore::IDBAny::isLegacy):
* Modules/indexeddb/legacy/LegacyAny.h:
* inspector/InspectorIndexedDBAgent.cpp:
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (190730 => 190731)
--- trunk/Source/WebCore/ChangeLog 2015-10-08 17:07:37 UTC (rev 190730)
+++ trunk/Source/WebCore/ChangeLog 2015-10-08 17:35:25 UTC (rev 190731)
@@ -1,3 +1,16 @@
+2015-10-08 Brady Eidson <[email protected]>
+
+ Update Inspector to only work with Legacy IDB (for now).
+ https://bugs.webkit.org/show_bug.cgi?id=149928.
+
+ Reviewed by Tim Horton.
+
+ * Modules/indexeddb/IDBAny.h:
+ (WebCore::IDBAny::isLegacy):
+
+ * Modules/indexeddb/legacy/LegacyAny.h:
+ * inspector/InspectorIndexedDBAgent.cpp:
+
2015-10-08 Antti Koivisto <[email protected]>
CrashTracer: [USER] com.apple.WebKit.WebContent at …Core::SelectorChecker::checkScrollbarPseudoClass const + 217
Modified: trunk/Source/WebCore/Modules/indexeddb/IDBAny.h (190730 => 190731)
--- trunk/Source/WebCore/Modules/indexeddb/IDBAny.h 2015-10-08 17:07:37 UTC (rev 190730)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBAny.h 2015-10-08 17:35:25 UTC (rev 190731)
@@ -68,6 +68,10 @@
KeyPath,
};
+ // FIXME: This is a temporary hack to allow casts in WebInspector code while Modern IDB and Legacy IDB live side-by-side.
+ // It should be removed when the legacy implementation is removed as part of https://bugs.webkit.org/show_bug.cgi?id=149117
+ virtual bool isLegacy() const { return false; }
+
virtual Type type() const = 0;
virtual RefPtr<DOMStringList> domStringList() = 0;
virtual RefPtr<IDBCursor> idbCursor() = 0;
Modified: trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyAny.h (190730 => 190731)
--- trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyAny.h 2015-10-08 17:07:37 UTC (rev 190730)
+++ trunk/Source/WebCore/Modules/indexeddb/legacy/LegacyAny.h 2015-10-08 17:35:25 UTC (rev 190731)
@@ -84,6 +84,10 @@
}
~LegacyAny();
+ // FIXME: This is a temporary hack to allow casts in WebInspector code while Modern IDB and Legacy IDB live side-by-side.
+ // It should be removed when the legacy implementation is removed as part of https://bugs.webkit.org/show_bug.cgi?id=149117
+ virtual bool isLegacy() const override final { return true; }
+
virtual Type type() const override final { return m_type; }
// Use type() to figure out which one of these you're allowed to call.
virtual RefPtr<DOMStringList> domStringList() override final;
Modified: trunk/Source/WebCore/inspector/InspectorIndexedDBAgent.cpp (190730 => 190731)
--- trunk/Source/WebCore/inspector/InspectorIndexedDBAgent.cpp 2015-10-08 17:07:37 UTC (rev 190730)
+++ trunk/Source/WebCore/inspector/InspectorIndexedDBAgent.cpp 2015-10-08 17:35:25 UTC (rev 190731)
@@ -61,6 +61,7 @@
#include "IDBTransaction.h"
#include "InspectorPageAgent.h"
#include "InstrumentingAgents.h"
+#include "LegacyDatabase.h"
#include "SecurityOrigin.h"
#include <inspector/InjectedScript.h>
#include <inspector/InjectedScriptManager.h>
@@ -149,7 +150,7 @@
: m_context(context) { }
virtual ~ExecutableWithDatabase() { };
void start(IDBFactory*, SecurityOrigin*, const String& databaseName);
- virtual void execute(RefPtr<IDBDatabase>&&) = 0;
+ virtual void execute(RefPtr<LegacyDatabase>&&) = 0;
virtual RequestCallback& requestCallback() = 0;
ScriptExecutionContext* context() { return m_context; };
private:
@@ -188,8 +189,12 @@
m_executableWithDatabase->requestCallback().sendFailure("Unexpected result type.");
return;
}
+ if (!requestResult->isLegacy()) {
+ m_executableWithDatabase->requestCallback().sendFailure("Only Legacy IDB is supported right now.");
+ return;
+ }
- RefPtr<IDBDatabase> idbDatabase = requestResult->idbDatabase();
+ RefPtr<LegacyDatabase> idbDatabase = adoptRef(static_cast<LegacyDatabase*>(requestResult->idbDatabase().leakRef()));
m_executableWithDatabase->execute(WTF::move(idbDatabase));
IDBPendingTransactionMonitor::deactivateNewTransactions();
idbDatabase->close();
@@ -283,7 +288,7 @@
virtual ~DatabaseLoader() { }
- virtual void execute(RefPtr<IDBDatabase>&& database) override
+ virtual void execute(RefPtr<LegacyDatabase>&& database) override
{
if (!requestCallback().isActive())
return;
@@ -512,7 +517,7 @@
virtual ~DataLoader() { }
- virtual void execute(RefPtr<IDBDatabase>&& database) override
+ virtual void execute(RefPtr<LegacyDatabase>&& database) override
{
if (!requestCallback().isActive())
return;
@@ -728,7 +733,7 @@
{
}
- virtual void execute(RefPtr<IDBDatabase>&& database) override
+ virtual void execute(RefPtr<LegacyDatabase>&& database) override
{
if (!requestCallback().isActive())
return;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes