Changeset 141621 in webkit
- Timestamp:
- Feb 1, 2013 11:58:47 AM (11 years ago)
- Location:
- trunk
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r141618 r141621 1 2013-02-01 Mike West <mkwst@chromium.org> 2 3 Remove call to SecurityOrigin::canAccessDatabase from IDB constructor. 4 https://bugs.webkit.org/show_bug.cgi?id=108477 5 6 Reviewed by Adam Barth. 7 8 * http/tests/security/no-indexeddb-from-sandbox-expected.txt: 9 * http/tests/security/no-indexeddb-from-sandbox.html: 10 This test expected the 'webkitIndexedDB' property to be missing 11 entirely inside a sandbox. The expectation has been updated to 12 expect 'webkitIndexedDB.open()' to throw a SECURITY_ERR. 13 * platform/efl/TestExpectations: 14 * platform/mac-snowleopard/TestExpectations: 15 * platform/mac/TestExpectations: 16 * platform/qt/TestExpectations: 17 * platform/win/TestExpectations: 18 * platform/wincairo/TestExpectations: 19 This test was accidentally passing on a variety of platforms that 20 don't yet implement IndexedDB. Now that failure is distinguishable 21 we should skip it on a variety of platforms. 22 1 23 2013-02-01 Ryosuke Niwa <rniwa@webkit.org> 2 24 -
trunk/LayoutTests/http/tests/security/no-indexeddb-from-sandbox-expected.txt
r86458 r141621 1 ALERT: PASS 1 ALERT: PASS: db.open() threw a SECURITY_ERR! 2 2 -
trunk/LayoutTests/http/tests/security/no-indexeddb-from-sandbox.html
r120174 r141621 6 6 src="data:text/html, 7 7 <script> 8 var db = window.webkitIndexedDB; 9 alert(db ? 'FAIL' : 'PASS'); 8 var db = window.webkitIndexedDB; 9 try { 10 db.open('test'); 11 alert('FAIL: db.open() should throw a SECURITY_ERR in a sandbox.'); 12 } catch (e) { 13 if (e.code === DOMException.SECURITY_ERR) 14 alert('PASS: db.open() threw a SECURITY_ERR!'); 15 else 16 alert('FAIL: db.open() threw a ' + e.name); 17 } 10 18 </script>" 11 19 ></iframe> -
trunk/LayoutTests/platform/efl/TestExpectations
r141584 r141621 1126 1126 Bug(EFL) http/tests/security/cross-origin-worker-indexeddb-allowed.html 1127 1127 Bug(EFL) http/tests/security/cross-origin-worker-indexeddb.html 1128 Bug(EFL) http/tests/security/no-indexeddb-from-sandbox.html 1128 1129 1129 1130 # Quota API is not supported. -
trunk/LayoutTests/platform/mac-snowleopard/TestExpectations
r141418 r141621 139 139 http/tests/security/cross-origin-worker-indexeddb-allowed.html 140 140 http/tests/security/cross-origin-worker-indexeddb.html 141 http/tests/security/no-indexeddb-from-sandbox.html 141 142 142 143 # Philip's canvas tests that fail on SnowLeopard only -
trunk/LayoutTests/platform/mac/TestExpectations
r141615 r141621 140 140 http/tests/security/cross-origin-worker-indexeddb-allowed.html 141 141 http/tests/security/cross-origin-worker-indexeddb.html 142 http/tests/security/no-indexeddb-from-sandbox.html 142 143 143 144 # Remove from list after enabling CANVAS_PATH -
trunk/LayoutTests/platform/qt/TestExpectations
r141576 r141621 122 122 http/tests/security/cross-origin-worker-indexeddb-allowed.html 123 123 http/tests/security/cross-origin-worker-indexeddb.html 124 http/tests/security/no-indexeddb-from-sandbox.html 124 125 125 126 inspector/timeline/timeline-animation-frame.html -
trunk/LayoutTests/platform/win/TestExpectations
r141456 r141621 1101 1101 http/tests/security/cross-origin-worker-indexeddb-allowed.html 1102 1102 http/tests/security/cross-origin-worker-indexeddb.html 1103 http/tests/security/no-indexeddb-from-sandbox.html 1103 1104 1104 1105 # StorageTracker is not enabled. -
trunk/LayoutTests/platform/wincairo/TestExpectations
r141418 r141621 1623 1623 http/tests/security/cross-origin-worker-indexeddb-allowed.html 1624 1624 http/tests/security/cross-origin-worker-indexeddb.html 1625 http/tests/security/no-indexeddb-from-sandbox.html 1625 1626 1626 1627 # StorageTracker is not enabled. -
trunk/Source/WebCore/ChangeLog
r141620 r141621 1 2013-02-01 Mike West <mkwst@chromium.org> 2 3 Remove call to SecurityOrigin::canAccessDatabase from IDB constructor. 4 https://bugs.webkit.org/show_bug.cgi?id=108477 5 6 Reviewed by Adam Barth. 7 8 This change removes the 'SecurityOrigin::canAccessDatabase' check from 9 the constructor for the 'indexedDB' property on both DOMWindow and 10 WorkerContext. After the patch for http://wkbug.com/94171 this check 11 is redundant, as all the entry points to IDB are now gated on access 12 being granted. 13 14 As a side-effect, dropping the check in WorkerContextIndexedDatabase 15 allows us to stop holding a pointer to the ScriptExecutionContext we're 16 extending, which can only be a good thing. 17 18 The tests in storage/indexeddb should continue to pass. 19 20 * Modules/indexeddb/DOMWindowIndexedDatabase.cpp: 21 (WebCore::DOMWindowIndexedDatabase::indexedDB): 22 Drop the SecurityOrigin::canAccessDatabase check. 23 * Modules/indexeddb/WorkerContextIndexedDatabase.cpp: 24 (WebCore::WorkerContextIndexedDatabase::WorkerContextIndexedDatabase): 25 (WebCore::WorkerContextIndexedDatabase::from): 26 Drop the ScriptExecutionContext parameter from the class's 27 constructor and callsites. 28 (WebCore::WorkerContextIndexedDatabase::indexedDB): 29 Drop the SecurityOrigin::canAccessDatabase check. 30 * Modules/indexeddb/WorkerContextIndexedDatabase.h: 31 (WorkerContextIndexedDatabase): 32 Drop the stored pointer to ScriptExecutionContext, as we no longer 33 need it in ::indexedDB. 34 1 35 2013-02-01 Beth Dakin <bdakin@apple.com> 2 36 -
trunk/Source/WebCore/Modules/indexeddb/DOMWindowIndexedDatabase.cpp
r140509 r141621 108 108 return 0; 109 109 110 if (!document->securityOrigin()->canAccessDatabase())111 return 0;112 113 110 if (!m_window->isCurrentlyDisplayedInFrame()) 114 111 return 0; -
trunk/Source/WebCore/Modules/indexeddb/WorkerContextIndexedDatabase.cpp
r140509 r141621 39 39 namespace WebCore { 40 40 41 WorkerContextIndexedDatabase::WorkerContextIndexedDatabase(ScriptExecutionContext* context) 42 : m_context(context) 41 WorkerContextIndexedDatabase::WorkerContextIndexedDatabase() 43 42 { 44 43 } … … 57 56 WorkerContextIndexedDatabase* supplement = static_cast<WorkerContextIndexedDatabase*>(Supplement<ScriptExecutionContext>::from(context, supplementName())); 58 57 if (!supplement) { 59 supplement = new WorkerContextIndexedDatabase( context);58 supplement = new WorkerContextIndexedDatabase(); 60 59 provideTo(context, supplementName(), adoptPtr(supplement)); 61 60 } … … 70 69 IDBFactory* WorkerContextIndexedDatabase::indexedDB() 71 70 { 72 if (!m_context->securityOrigin()->canAccessDatabase())73 return 0;74 71 if (!m_factoryBackend) 75 72 m_factoryBackend = IDBFactoryBackendInterface::create(); -
trunk/Source/WebCore/Modules/indexeddb/WorkerContextIndexedDatabase.h
r140509 r141621 46 46 47 47 private: 48 explicit WorkerContextIndexedDatabase(ScriptExecutionContext*);48 WorkerContextIndexedDatabase(); 49 49 50 50 IDBFactory* indexedDB(); 51 51 static const char* supplementName(); 52 52 53 ScriptExecutionContext* m_context;54 53 RefPtr<IDBFactoryBackendInterface> m_factoryBackend; 55 54 RefPtr<IDBFactory> m_idbFactory;
Note: See TracChangeset
for help on using the changeset viewer.