Changeset 185322 in webkit
- Timestamp:
- Jun 8, 2015, 9:49:57 AM (10 years ago)
- Location:
- trunk
- Files:
-
- 5 added
- 25 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r185318 r185322 1 2015-06-08 Brady Eidson <beidson@apple.com> 2 3 Completely remove all IDB properties/constructors when it is disabled at runtime. 4 rdar://problem/18429374 and https://bugs.webkit.org/show_bug.cgi?id=137034 5 6 Reviewed by Geoffrey Garen. 7 8 * platform/mac-mavericks/TestExpectations: Disable global-constructors-attributes on Mavericks as 9 there is no way to have different WK1 and WK2 results. 10 * platform/mac-wk1/TestExpectations: Enable the new "properties are missing" test for Mac WK1. 11 * platform/mac-wk1/js/dom/global-constructors-attributes-expected.txt: Added. 12 * platform/win/TestExpectations: Enable the new "properties are missing" test for Win WK1 13 * platform/wk2/TestExpectations: Disable the new "properties are missing" test for all WK2. 14 * storage/indexeddb/properties-disabled-at-runtime-expected.txt: Added. 15 * storage/indexeddb/properties-disabled-at-runtime.html: Added. 16 1 17 2015-06-08 Sergio Villar Senin <svillar@igalia.com> 2 18 -
trunk/LayoutTests/platform/mac-mavericks/TestExpectations
r184899 r185322 19 19 platform/mac/fast/ruby/ruby-expansion-cjk-3.html [ Skip ] 20 20 platform/mac/fast/ruby/ruby-expansion-cjk-4.html [ Skip ] 21 22 # Need to have Mavericks WK1 and Mavericks WK2 compare to different results which is not currently possible 23 js/dom/global-constructors-attributes.html [ Skip ] -
trunk/LayoutTests/platform/mac-wk1/TestExpectations
r185181 r185322 42 42 43 43 # IndexedDB is not yet enabled in Mac WK1 44 storage/indexeddb 44 45 fast/history/page-cache-indexed-closed-db.html 45 46 fast/history/page-cache-indexed-opened-db.html 46 storage/indexeddb47 47 http/tests/security/cross-origin-indexeddb-allowed.html 48 48 http/tests/security/cross-origin-indexeddb.html … … 52 52 crypto/subtle/rsa-indexeddb.html 53 53 crypto/subtle/rsa-indexeddb-non-exportable.html 54 55 # But since it is disabled at runtime, we should make sure it is correctly disabled 56 storage/indexeddb/properties-disabled-at-runtime.html [ Pass ] 54 57 55 58 # Fails with WebKit1 only. -
trunk/LayoutTests/platform/win/TestExpectations
r185286 r185322 243 243 fast/history/page-cache-indexed-closed-db.html [ Skip ] 244 244 fast/history/page-cache-indexed-opened-db.html [ Skip ] 245 246 # But since it is disabled at runtime, we should make sure it is correctly disabled 247 storage/indexeddb/properties-disabled-at-runtime.html [ Pass ] 248 245 249 fast/history/page-cache-webdatabase-no-transaction-db.html [ Skip ] 246 250 fast/history/page-cache-webdatabase-pending-transaction.html [ Skip ] -
trunk/LayoutTests/platform/wk2/TestExpectations
r185310 r185322 679 679 fast/text/shaping 680 680 681 # WebKit2 should always have IndexedDB enabled 682 storage/indexeddb/properties-disabled-at-runtime.html [ Skip ] 683 681 684 ### END OF (4) Features that are not supported in WebKit2 and likely never will be 682 685 ######################################## -
trunk/Source/JavaScriptCore/ChangeLog
r185286 r185322 1 2015-06-08 Brady Eidson <beidson@apple.com> 2 3 Completely remove all IDB properties/constructors when it is disabled at runtime. 4 rdar://problem/18429374 and https://bugs.webkit.org/show_bug.cgi?id=137034 5 6 Reviewed by Geoffrey Garen. 7 8 * runtime/CommonIdentifiers.h: 9 1 10 2015-06-06 Mark Lam <mark.lam@apple.com> 2 11 -
trunk/Source/JavaScriptCore/runtime/CommonIdentifiers.h
r184828 r185322 119 119 macro(ignoreCase) \ 120 120 macro(index) \ 121 macro(indexedDB) \ 121 122 macro(inferredName) \ 122 123 macro(input) \ … … 177 178 macro(values) \ 178 179 macro(webkit) \ 180 macro(webkitIndexedDB) \ 179 181 macro(window) \ 180 182 macro(writable) -
trunk/Source/WebCore/ChangeLog
r185320 r185322 1 2015-06-08 Brady Eidson <beidson@apple.com> 2 3 Completely remove all IDB properties/constructors when it is disabled at runtime. 4 rdar://problem/18429374 and https://bugs.webkit.org/show_bug.cgi?id=137034 5 6 Reviewed by Geoffrey Garen. 7 8 Test: storage/indexeddb/properties-disabled-at-runtime.html 9 10 - Make constructors all runtime enabled. 11 - Remove autogeneration of the window.(webkit)indexedDB accessors. 12 - Add manual overrides for the (webkit)indexedDB accessors at runtime. 13 14 * Modules/indexeddb/DOMWindowIndexedDatabase.idl: 15 * Modules/indexeddb/IDBAny.idl: 16 * Modules/indexeddb/IDBCursor.idl: 17 * Modules/indexeddb/IDBCursorWithValue.idl: 18 * Modules/indexeddb/IDBDatabase.idl: 19 * Modules/indexeddb/IDBFactory.idl: 20 * Modules/indexeddb/IDBIndex.idl: 21 * Modules/indexeddb/IDBKeyRange.idl: 22 * Modules/indexeddb/IDBObjectStore.idl: 23 * Modules/indexeddb/IDBOpenDBRequest.idl: 24 * Modules/indexeddb/IDBRequest.idl: 25 * Modules/indexeddb/IDBTransaction.idl: 26 * Modules/indexeddb/IDBVersionChangeEvent.idl: 27 * page/DOMWindow.idl: 28 29 * bindings/js/JSDOMWindowCustom.cpp: 30 (WebCore::jsDOMWindowIndexedDB): 31 (WebCore::JSDOMWindow::getOwnPropertySlot): 32 1 33 2015-06-08 Michael Catanzaro <mcatanzaro@igalia.com> 2 34 -
trunk/Source/WebCore/Modules/indexeddb/DOMWindowIndexedDatabase.idl
r165676 r185322 28 28 Conditional=INDEXED_DATABASE, 29 29 ] partial interface DOMWindow { 30 [ImplementedAs=indexedDB] readonly attribute IDBFactory webkitIndexedDB; 31 32 readonly attribute IDBFactory indexedDB; 30 // This space is intentionally left blank. 33 31 }; 34 32 -
trunk/Source/WebCore/Modules/indexeddb/IDBAny.idl
r171824 r185322 28 28 Conditional=INDEXED_DATABASE, 29 29 CustomToJSObject, 30 EnabledAtRuntime=IndexedDB, 30 31 ] interface IDBAny { 31 32 // This space is intentionally left blank. -
trunk/Source/WebCore/Modules/indexeddb/IDBCursor.idl
r171824 r185322 26 26 [ 27 27 Conditional=INDEXED_DATABASE, 28 EnabledAtRuntime=IndexedDB, 28 29 ] interface IDBCursor { 29 30 readonly attribute IDBAny source; -
trunk/Source/WebCore/Modules/indexeddb/IDBCursorWithValue.idl
r171824 r185322 26 26 [ 27 27 Conditional=INDEXED_DATABASE, 28 EnabledAtRuntime=IndexedDB, 28 29 ] interface IDBCursorWithValue : IDBCursor { 29 30 readonly attribute any value; -
trunk/Source/WebCore/Modules/indexeddb/IDBDatabase.idl
r181507 r185322 31 31 JSGenerateToJSObject, 32 32 JSGenerateToNativeObject, 33 EnabledAtRuntime=IndexedDB, 33 34 ] interface IDBDatabase : EventTarget { 34 35 readonly attribute DOMString name; -
trunk/Source/WebCore/Modules/indexeddb/IDBFactory.idl
r171824 r185322 27 27 Conditional=INDEXED_DATABASE, 28 28 ImplementationLacksVTable, 29 EnabledAtRuntime=IndexedDB, 29 30 ] interface IDBFactory { 30 31 [CallWith=ScriptExecutionContext, RaisesException] IDBOpenDBRequest open(DOMString name, [EnforceRange] optional unsigned long long version); -
trunk/Source/WebCore/Modules/indexeddb/IDBIndex.idl
r171824 r185322 27 27 Conditional=INDEXED_DATABASE, 28 28 ImplementationLacksVTable, 29 EnabledAtRuntime=IndexedDB, 29 30 ] interface IDBIndex { 30 31 readonly attribute DOMString name; -
trunk/Source/WebCore/Modules/indexeddb/IDBKeyRange.idl
r171824 r185322 27 27 Conditional=INDEXED_DATABASE, 28 28 ImplementationLacksVTable, 29 EnabledAtRuntime=IndexedDB, 29 30 ] interface IDBKeyRange { 30 31 [ImplementedAs=lowerValue,CallWith=ScriptExecutionContext] readonly attribute any lower; -
trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.idl
r171824 r185322 27 27 Conditional=INDEXED_DATABASE, 28 28 ImplementationLacksVTable, 29 EnabledAtRuntime=IndexedDB, 29 30 ] interface IDBObjectStore { 30 31 [TreatReturnedNullStringAs=Null] readonly attribute DOMString name; -
trunk/Source/WebCore/Modules/indexeddb/IDBOpenDBRequest.idl
r181507 r185322 28 28 EventTarget, 29 29 JSGenerateToJSObject, 30 JSGenerateToNativeObject 30 JSGenerateToNativeObject, 31 EnabledAtRuntime=IndexedDB, 31 32 ] interface IDBOpenDBRequest : IDBRequest { 32 33 attribute EventHandler onblocked; -
trunk/Source/WebCore/Modules/indexeddb/IDBRequest.idl
r181507 r185322 30 30 [ 31 31 Conditional=INDEXED_DATABASE, 32 EnabledAtRuntime=IndexedDB, 32 33 ActiveDOMObject, 33 34 EventTarget, -
trunk/Source/WebCore/Modules/indexeddb/IDBTransaction.idl
r181507 r185322 31 31 JSGenerateToJSObject, 32 32 JSGenerateToNativeObject, 33 EnabledAtRuntime=IndexedDB, 33 34 ] interface IDBTransaction : EventTarget { 34 35 readonly attribute DOMString mode; -
trunk/Source/WebCore/Modules/indexeddb/IDBVersionChangeEvent.idl
r171824 r185322 26 26 [ 27 27 Conditional=INDEXED_DATABASE, 28 EnabledAtRuntime=IndexedDB, 28 29 ] interface IDBVersionChangeEvent : Event { 29 30 readonly attribute unsigned long long oldVersion; -
trunk/Source/WebCore/bindings/js/JSDOMWindowCustom.cpp
r184828 r185322 22 22 #include "JSDOMWindowCustom.h" 23 23 24 #include "DOMWindowIndexedDatabase.h" 24 25 #include "Frame.h" 25 26 #include "HTMLCollection.h" … … 30 31 #include "JSHTMLCollection.h" 31 32 #include "JSHTMLOptionElement.h" 33 #include "JSIDBFactory.h" 32 34 #include "JSImageConstructor.h" 33 35 #include "JSMessagePortCustom.h" 34 36 #include "JSWorker.h" 35 37 #include "Location.h" 38 #include "RuntimeEnabledFeatures.h" 36 39 #include "ScheduledAction.h" 37 40 #include "Settings.h" … … 97 100 return JSValue::encode(jsUndefined()); 98 101 return JSValue::encode(toJS(exec, castedThis->globalObject(), castedThis->impl().webkitNamespace())); 102 } 103 #endif 104 105 #if ENABLE(INDEXED_DATABASE) 106 static EncodedJSValue jsDOMWindowIndexedDB(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName) 107 { 108 UNUSED_PARAM(exec); 109 UNUSED_PARAM(slotBase); 110 UNUSED_PARAM(thisValue); 111 auto* castedThis = toJSDOMWindow(JSValue::decode(thisValue)); 112 if (!RuntimeEnabledFeatures::sharedFeatures().indexedDBEnabled()) 113 return JSValue::encode(jsUndefined()); 114 if (!BindingSecurity::shouldAllowAccessToDOMWindow(exec, castedThis->impl())) 115 return JSValue::encode(jsUndefined()); 116 auto& impl = castedThis->impl(); 117 JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(DOMWindowIndexedDatabase::indexedDB(&impl))); 118 return JSValue::encode(result); 99 119 } 100 120 #endif … … 168 188 } 169 189 } 190 191 #if ENABLE(INDEXED_DATABASE) 192 // FIXME: With generated JS bindings built on static property tables there is no way to 193 // completely remove a generated property at runtime. 194 // So to completely disable IndexedDB at runtime we have to not generate these accessors 195 // and have to handle them specially here. 196 // Once https://webkit.org/b/145669 is resolved, they can once again be auto generated. 197 if (RuntimeEnabledFeatures::sharedFeatures().indexedDBEnabled() && (propertyName == exec->propertyNames().indexedDB || propertyName == exec->propertyNames().webkitIndexedDB)) { 198 slot.setCustom(thisObject, allowsAccess ? DontDelete | ReadOnly | CustomAccessor : ReadOnly | DontDelete | DontEnum, jsDOMWindowIndexedDB); 199 return true; 200 } 201 #endif 170 202 171 203 const HashTableValue* entry = JSDOMWindow::info()->staticPropHashTable->entry(propertyName); -
trunk/Source/WebCore/page/DOMWindow.idl
r184616 r185322 208 208 attribute DOMURLConstructor webkitURL; // FIXME: deprecate this. 209 209 attribute MutationObserverConstructor WebKitMutationObserver; // FIXME: Add metrics to determine when we can remove this. 210 [Conditional=INDEXED_DATABASE ] attribute IDBCursorConstructor webkitIDBCursor;211 [Conditional=INDEXED_DATABASE ] attribute IDBDatabaseConstructor webkitIDBDatabase;212 [Conditional=INDEXED_DATABASE ] attribute IDBFactoryConstructor webkitIDBFactory;213 [Conditional=INDEXED_DATABASE ] attribute IDBIndexConstructor webkitIDBIndex;214 [Conditional=INDEXED_DATABASE ] attribute IDBKeyRangeConstructor webkitIDBKeyRange;215 [Conditional=INDEXED_DATABASE ] attribute IDBObjectStoreConstructor webkitIDBObjectStore;216 [Conditional=INDEXED_DATABASE ] attribute IDBRequestConstructor webkitIDBRequest;217 [Conditional=INDEXED_DATABASE ] attribute IDBTransactionConstructor webkitIDBTransaction;210 [Conditional=INDEXED_DATABASE, EnabledAtRuntime=IndexedDB] attribute IDBCursorConstructor webkitIDBCursor; 211 [Conditional=INDEXED_DATABASE, EnabledAtRuntime=IndexedDB] attribute IDBDatabaseConstructor webkitIDBDatabase; 212 [Conditional=INDEXED_DATABASE, EnabledAtRuntime=IndexedDB] attribute IDBFactoryConstructor webkitIDBFactory; 213 [Conditional=INDEXED_DATABASE, EnabledAtRuntime=IndexedDB] attribute IDBIndexConstructor webkitIDBIndex; 214 [Conditional=INDEXED_DATABASE, EnabledAtRuntime=IndexedDB] attribute IDBKeyRangeConstructor webkitIDBKeyRange; 215 [Conditional=INDEXED_DATABASE, EnabledAtRuntime=IndexedDB] attribute IDBObjectStoreConstructor webkitIDBObjectStore; 216 [Conditional=INDEXED_DATABASE, EnabledAtRuntime=IndexedDB] attribute IDBRequestConstructor webkitIDBRequest; 217 [Conditional=INDEXED_DATABASE, EnabledAtRuntime=IndexedDB] attribute IDBTransactionConstructor webkitIDBTransaction; 218 218 #endif // defined(LANGUAGE_JAVASCRIPT) 219 219 -
trunk/Source/WebKit2/ChangeLog
r185320 r185322 1 2015-06-08 Brady Eidson <beidson@apple.com> 2 3 Completely remove all IDB properties/constructors when it is disabled at runtime. 4 rdar://problem/18429374 and https://bugs.webkit.org/show_bug.cgi?id=137034 5 6 Reviewed by Geoffrey Garen. 7 8 * WebProcess/WebProcess.cpp: 9 (WebKit::WebProcess::WebProcess): Enable IDB at runtime if it's enabled at compile time. 10 1 11 2015-06-08 Michael Catanzaro <mcatanzaro@igalia.com> 2 12 -
trunk/Source/WebKit2/WebProcess/WebProcess.cpp
r185251 r185322 87 87 #include <WebCore/PageGroup.h> 88 88 #include <WebCore/ResourceHandle.h> 89 #include <WebCore/RuntimeEnabledFeatures.h> 89 90 #include <WebCore/SchemeRegistry.h> 90 91 #include <WebCore/SecurityOrigin.h> … … 204 205 #endif 205 206 m_plugInAutoStartOriginHashes.add(SessionID::defaultSessionID(), HashMap<unsigned, double>()); 207 208 #if ENABLE(INDEXED_DATABASE) 209 RuntimeEnabledFeatures::sharedFeatures().setWebkitIndexedDBEnabled(true); 210 #endif 206 211 } 207 212
Note:
See TracChangeset
for help on using the changeset viewer.