Changeset 109556 in webkit
- Timestamp:
- Mar 2, 2012 4:45:46 AM (12 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 added
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/CMakeLists.txt
r109538 r109556 416 416 Modules/geolocation/NavigatorGeolocation.cpp 417 417 418 Modules/indexeddb/DOMWindowIndexedDatabase.cpp 418 419 Modules/indexeddb/IDBAny.cpp 419 420 Modules/indexeddb/IDBDatabase.cpp … … 433 434 Modules/indexeddb/IDBFactoryBackendInterface.cpp 434 435 Modules/indexeddb/IDBFactoryBackendImpl.cpp 436 Modules/indexeddb/PageGroupIndexedDatabase.cpp 437 Modules/indexeddb/WorkerContextIndexedDatabase.cpp 435 438 436 439 accessibility/AXObjectCache.cpp … … 1540 1543 IF (ENABLE_INDEXED_DATABASE) 1541 1544 LIST(APPEND WebCore_IDL_FILES 1545 Modules/indexeddb/DOMWindowIndexedDatabase.idl 1542 1546 Modules/indexeddb/IDBAny.idl 1543 1547 Modules/indexeddb/IDBCursor.idl … … 1552 1556 Modules/indexeddb/IDBRequest.idl 1553 1557 Modules/indexeddb/IDBTransaction.idl 1558 Modules/indexeddb/WorkerContextIndexedDatabase.idl 1554 1559 ) 1555 1560 ENDIF () -
trunk/Source/WebCore/ChangeLog
r109552 r109556 1 2012-03-02 Adam Barth <abarth@webkit.org> 2 3 WorkerContext shouldn't know about IndexedDB 4 https://bugs.webkit.org/show_bug.cgi?id=80094 5 6 Reviewed by Kentaro Hara. 7 8 There are still a couple IndexedDB stragglers we should clean up in 9 WebCore proper. This patch moves some IndexedDB logic from 10 WorkerContext into the indexeddb module. 11 12 In the process of writing this patch, I noticed that some IndexedDB 13 files were missing from various build systems, so I added them. I 14 suspect that means IndexedDB is only enabled by default on Chromium. 15 16 * CMakeLists.txt: 17 * DerivedSources.make: 18 * DerivedSources.pri: 19 * GNUmakefile.list.am: 20 * Modules/indexeddb/WorkerContextIndexedDatabase.cpp: Added. 21 (WebCore): 22 (WebCore::WorkerContextIndexedDatabase::WorkerContextIndexedDatabase): 23 (WebCore::WorkerContextIndexedDatabase::~WorkerContextIndexedDatabase): 24 (WebCore::WorkerContextIndexedDatabase::from): 25 (WebCore::WorkerContextIndexedDatabase::webkitIndexedDB): 26 * Modules/indexeddb/WorkerContextIndexedDatabase.h: Added. 27 (WebCore): 28 (WorkerContextIndexedDatabase): 29 * Modules/indexeddb/WorkerContextIndexedDatabase.idl: Added. 30 * Target.pri: 31 * WebCore.gypi: 32 * WebCore.vcproj/WebCore.vcproj: 33 * WebCore.xcodeproj/project.pbxproj: 34 * workers/WorkerContext.cpp: 35 (WebCore): 36 * workers/WorkerContext.h: 37 (WebCore): 38 (WorkerContext): 39 * workers/WorkerContext.idl: 40 1 41 2012-03-02 Simon Hausmann <simon.hausmann@nokia.com> 2 42 -
trunk/Source/WebCore/DerivedSources.make
r109493 r109556 63 63 $(WebCore)/Modules/geolocation/PositionError.idl \ 64 64 $(WebCore)/Modules/geolocation/PositionErrorCallback.idl \ 65 $(WebCore)/Modules/indexeddb/DOMWindowIndexedDatabase.idl \ 65 66 $(WebCore)/Modules/indexeddb/IDBAny.idl \ 66 67 $(WebCore)/Modules/indexeddb/IDBCursor.idl \ … … 75 76 $(WebCore)/Modules/indexeddb/IDBRequest.idl \ 76 77 $(WebCore)/Modules/indexeddb/IDBTransaction.idl \ 78 $(WebCore)/Modules/indexeddb/WorkerContextIndexedDatabase.idl \ 77 79 $(WebCore)/Modules/websockets/CloseEvent.idl \ 78 80 $(WebCore)/Modules/websockets/DOMWindowWebSocket.idl \ -
trunk/Source/WebCore/DerivedSources.pri
r109493 r109556 93 93 $$PWD/Modules/geolocation/PositionError.idl \ 94 94 $$PWD/Modules/geolocation/PositionErrorCallback.idl \ 95 $$PWD/Modules/indexeddb/DOMWindowIndexedDatabase.idl \ 95 96 $$PWD/Modules/indexeddb/IDBAny.idl \ 96 97 $$PWD/Modules/indexeddb/IDBCursor.idl \ … … 105 106 $$PWD/Modules/indexeddb/IDBRequest.idl \ 106 107 $$PWD/Modules/indexeddb/IDBTransaction.idl \ 108 $$PWD/Modules/indexeddb/WorkerContextIndexedDatabase.idl \ 107 109 $$PWD/Modules/websockets/CloseEvent.idl \ 108 110 $$PWD/Modules/websockets/DOMWindowWebSocket.idl \ -
trunk/Source/WebCore/GNUmakefile.list.am
r109538 r109556 971 971 Source/WebCore/Modules/geolocation/PositionErrorCallback.h \ 972 972 Source/WebCore/Modules/geolocation/PositionOptions.h \ 973 Source/WebCore/Modules/indexeddb/DOMWindowIndexedDatabase.cpp \ 974 Source/WebCore/Modules/indexeddb/DOMWindowIndexedDatabase.h \ 973 975 Source/WebCore/Modules/indexeddb/IDBAny.cpp \ 974 976 Source/WebCore/Modules/indexeddb/IDBAny.h \ … … 1027 1029 Source/WebCore/Modules/indexeddb/IDBVersionChangeEvent.h \ 1028 1030 Source/WebCore/Modules/indexeddb/IDBVersionChangeRequest.h \ 1031 Source/WebCore/Modules/indexeddb/PageGroupIndexedDatabase.cpp \ 1032 Source/WebCore/Modules/indexeddb/PageGroupIndexedDatabase.h \ 1033 Source/WebCore/Modules/indexeddb/WorkerContextIndexedDatabase.cpp \ 1034 Source/WebCore/Modules/indexeddb/WorkerContextIndexedDatabase.h \ 1029 1035 Source/WebCore/Modules/mediastream/LocalMediaStream.cpp \ 1030 1036 Source/WebCore/Modules/mediastream/LocalMediaStream.h \ … … 4791 4797 4792 4798 dom_binding_idls += \ 4799 $(WebCore)/Modules/indexeddb/DOMWindowIndexedDatabase.idl \ 4793 4800 $(WebCore)/Modules/indexeddb/IDBAny.idl \ 4794 4801 $(WebCore)/Modules/indexeddb/IDBDatabase.idl \ … … 4800 4807 $(WebCore)/Modules/indexeddb/IDBObjectStore.idl \ 4801 4808 $(WebCore)/Modules/indexeddb/IDBRequest.idl \ 4802 $(WebCore)/Modules/indexeddb/IDBTransaction.idl 4809 $(WebCore)/Modules/indexeddb/IDBTransaction.idl \ 4810 $(WebCore)/Modules/indexeddb/WorkerContextIndexedDatabase.idl 4803 4811 endif # END ENABLE_INDEXED_DATABASE 4804 4812 -
trunk/Source/WebCore/Target.pri
r109552 r109556 3015 3015 3016 3016 SOURCES += \ 3017 Modules/indexeddb/DOMWindowIndexedDatabase.cpp \ 3017 3018 Modules/indexeddb/IDBAny.cpp \ 3018 3019 Modules/indexeddb/IDBCursor.cpp \ … … 3032 3033 Modules/indexeddb/IDBObjectStoreBackendImpl.cpp \ 3033 3034 Modules/indexeddb/IDBRequest.cpp \ 3034 Modules/indexeddb/IDBTransaction.cpp 3035 Modules/indexeddb/IDBTransaction.cpp \ 3036 Modules/indexeddb/PageGroupIndexedDatabase.cpp \ 3037 Modules/indexeddb/WorkerContextIndexedDatabase.cpp 3035 3038 } 3036 3039 -
trunk/Source/WebCore/WebCore.gypi
r109538 r109556 746 746 'Modules/indexeddb/IDBVersionChangeEvent.idl', 747 747 'Modules/indexeddb/IDBVersionChangeRequest.idl', 748 'Modules/indexeddb/WorkerContextIndexedDatabase.idl', 748 749 'Modules/intents/DOMWindowIntents.idl', 749 750 'Modules/intents/Intent.idl', … … 1369 1370 'Modules/indexeddb/PageGroupIndexedDatabase.cpp', 1370 1371 'Modules/indexeddb/PageGroupIndexedDatabase.h', 1372 'Modules/indexeddb/WorkerContextIndexedDatabase.cpp', 1373 'Modules/indexeddb/WorkerContextIndexedDatabase.h', 1371 1374 'Modules/intents/Intent.cpp', 1372 1375 'Modules/intents/Intent.h', -
trunk/Source/WebCore/WebCore.vcproj/WebCore.vcproj
r109538 r109556 24114 24114 > 24115 24115 <File 24116 RelativePath="..\Modules\indexeddb\DOMWindowIndexedDatabase.cpp" 24117 > 24118 </File> 24119 <File 24120 RelativePath="..\Modules\indexeddb\DOMWindowIndexedDatabase.h" 24121 > 24122 </File> 24123 <File 24116 24124 RelativePath="..\Modules\indexeddb\IDBAny.cpp" 24117 24125 > … … 24267 24275 <File 24268 24276 RelativePath="..\Modules\indexeddb\IDBTransaction.h" 24277 > 24278 </File> 24279 <File 24280 RelativePath="..\Modules\indexeddb\PageGroupIndexedDatabase.cpp" 24281 > 24282 </File> 24283 <File 24284 RelativePath="..\Modules\indexeddb\PageGroupIndexedDatabase.h" 24285 > 24286 </File> 24287 <File 24288 RelativePath="..\Modules\indexeddb\WorkerContextIndexedDatabase.cpp" 24289 > 24290 </File> 24291 <File 24292 RelativePath="..\Modules\indexeddb\WorkerContextIndexedDatabase.h" 24269 24293 > 24270 24294 </File> -
trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj
r109538 r109556 3376 3376 9712A60415004EDA0048AF10 /* PageGroupIndexedDatabase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9712A5AB15004EDA0048AF10 /* PageGroupIndexedDatabase.cpp */; }; 3377 3377 9712A60515004EDA0048AF10 /* PageGroupIndexedDatabase.h in Headers */ = {isa = PBXBuildFile; fileRef = 9712A5AC15004EDA0048AF10 /* PageGroupIndexedDatabase.h */; }; 3378 9712A611150090CE0048AF10 /* WorkerContextIndexedDatabase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9712A60E150090CE0048AF10 /* WorkerContextIndexedDatabase.cpp */; }; 3379 9712A612150090CE0048AF10 /* WorkerContextIndexedDatabase.h in Headers */ = {isa = PBXBuildFile; fileRef = 9712A60F150090CE0048AF10 /* WorkerContextIndexedDatabase.h */; }; 3378 3380 97205AAF123928CA00B17380 /* FTPDirectoryDocument.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 97205AAD123928CA00B17380 /* FTPDirectoryDocument.cpp */; }; 3379 3381 97205AB0123928CA00B17380 /* FTPDirectoryDocument.h in Headers */ = {isa = PBXBuildFile; fileRef = 97205AAE123928CA00B17380 /* FTPDirectoryDocument.h */; }; … … 10295 10297 9712A5AB15004EDA0048AF10 /* PageGroupIndexedDatabase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PageGroupIndexedDatabase.cpp; path = Modules/indexeddb/PageGroupIndexedDatabase.cpp; sourceTree = "<group>"; }; 10296 10298 9712A5AC15004EDA0048AF10 /* PageGroupIndexedDatabase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PageGroupIndexedDatabase.h; path = Modules/indexeddb/PageGroupIndexedDatabase.h; sourceTree = "<group>"; }; 10299 9712A60E150090CE0048AF10 /* WorkerContextIndexedDatabase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = WorkerContextIndexedDatabase.cpp; path = Modules/indexeddb/WorkerContextIndexedDatabase.cpp; sourceTree = "<group>"; }; 10300 9712A60F150090CE0048AF10 /* WorkerContextIndexedDatabase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WorkerContextIndexedDatabase.h; path = Modules/indexeddb/WorkerContextIndexedDatabase.h; sourceTree = "<group>"; }; 10301 9712A610150090CE0048AF10 /* WorkerContextIndexedDatabase.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = WorkerContextIndexedDatabase.idl; path = Modules/indexeddb/WorkerContextIndexedDatabase.idl; sourceTree = "<group>"; }; 10297 10302 97205AAD123928CA00B17380 /* FTPDirectoryDocument.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FTPDirectoryDocument.cpp; sourceTree = "<group>"; }; 10298 10303 97205AAE123928CA00B17380 /* FTPDirectoryDocument.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FTPDirectoryDocument.h; sourceTree = "<group>"; }; … … 17206 17211 9712A5AB15004EDA0048AF10 /* PageGroupIndexedDatabase.cpp */, 17207 17212 9712A5AC15004EDA0048AF10 /* PageGroupIndexedDatabase.h */, 17213 9712A60E150090CE0048AF10 /* WorkerContextIndexedDatabase.cpp */, 17214 9712A60F150090CE0048AF10 /* WorkerContextIndexedDatabase.h */, 17215 9712A610150090CE0048AF10 /* WorkerContextIndexedDatabase.idl */, 17208 17216 ); 17209 17217 name = indexeddb; … … 24443 24451 F3820897147D35F90010BC06 /* WorkerConsoleAgent.h in Headers */, 24444 24452 2E4346490F546A8200B0F1BA /* WorkerContext.h in Headers */, 24453 9712A612150090CE0048AF10 /* WorkerContextIndexedDatabase.h in Headers */, 24445 24454 2E43464B0F546A8200B0F1BA /* WorkerContextProxy.h in Headers */, 24446 24455 F34742E11343631F00531BC2 /* WorkerDebuggerAgent.h in Headers */, … … 27418 27427 F3820896147D35F90010BC06 /* WorkerConsoleAgent.cpp in Sources */, 27419 27428 2E4346480F546A8200B0F1BA /* WorkerContext.cpp in Sources */, 27429 9712A611150090CE0048AF10 /* WorkerContextIndexedDatabase.cpp in Sources */, 27420 27430 F34742E01343631F00531BC2 /* WorkerDebuggerAgent.cpp in Sources */, 27421 27431 A3E2643014748991005A8588 /* WorkerEventQueue.cpp in Sources */, -
trunk/Source/WebCore/workers/WorkerContext.cpp
r109133 r109556 70 70 71 71 #include "ExceptionCode.h" 72 #include "IDBFactory.h"73 72 74 73 namespace WebCore { … … 408 407 } 409 408 410 #if ENABLE(INDEXED_DATABASE)411 IDBFactory* WorkerContext::webkitIndexedDB() const412 {413 if (!securityOrigin()->canAccessDatabase())414 return 0;415 if (!m_idbFactoryBackendInterface)416 m_idbFactoryBackendInterface = IDBFactoryBackendInterface::create();417 if (!m_idbFactory)418 m_idbFactory = IDBFactory::create(m_idbFactoryBackendInterface.get());419 return m_idbFactory.get();420 }421 #endif422 423 409 WorkerEventQueue* WorkerContext::eventQueue() const 424 410 { -
trunk/Source/WebCore/workers/WorkerContext.h
r109133 r109556 52 52 class DatabaseCallback; 53 53 class DatabaseSync; 54 class IDBFactory;55 54 class NotificationCenter; 56 55 class ScheduledAction; … … 155 154 void unregisterObserver(Observer*); 156 155 void notifyObserversOfStop(); 157 #if ENABLE(INDEXED_DATABASE)158 IDBFactory* webkitIndexedDB() const;159 #endif160 156 161 157 protected: … … 205 201 206 202 OwnPtr<WorkerEventQueue> m_eventQueue; 207 208 #if ENABLE(INDEXED_DATABASE)209 mutable RefPtr<IDBFactory> m_idbFactory;210 mutable RefPtr<IDBFactoryBackendInterface> m_idbFactoryBackendInterface;211 #endif212 213 203 }; 214 204 -
trunk/Source/WebCore/workers/WorkerContext.idl
r109133 r109556 116 116 attribute Float64ArrayConstructor Float64Array; // Usable with new operator 117 117 attribute DataViewConstructor DataView; // Usable with new operator 118 #if defined(ENABLE_INDEXED_DATABASE) && ENABLE_INDEXED_DATABASE119 readonly attribute [V8EnabledAtRuntime] IDBFactory webkitIndexedDB;120 121 attribute [V8EnabledAtRuntime] IDBCursorConstructor webkitIDBCursor;122 attribute [V8EnabledAtRuntime] IDBDatabaseConstructor webkitIDBDatabase;123 attribute [V8EnabledAtRuntime] IDBDatabaseErrorConstructor webkitIDBDatabaseError;124 attribute [V8EnabledAtRuntime] IDBDatabaseExceptionConstructor webkitIDBDatabaseException;125 attribute [V8EnabledAtRuntime] IDBFactoryConstructor webkitIDBFactory;126 attribute [V8EnabledAtRuntime] IDBIndexConstructor webkitIDBIndex;127 attribute [V8EnabledAtRuntime] IDBKeyRangeConstructor webkitIDBKeyRange;128 attribute [V8EnabledAtRuntime] IDBObjectStoreConstructor webkitIDBObjectStore;129 attribute [V8EnabledAtRuntime] IDBRequestConstructor webkitIDBRequest;130 attribute [V8EnabledAtRuntime] IDBTransactionConstructor webkitIDBTransaction;131 #endif132 118 }; 133 119
Note: See TracChangeset
for help on using the changeset viewer.