mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-20 16:55:40 +00:00
Bug 1507229 - Argument sanity check at CreateMutableFile() to avoid assertion failure r=janv
CreateMutableFile() doesn't allow empty name, we should check it before further processing to avoid assertion failure. Differential Revision: https://phabricator.services.mozilla.com/D23999 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
0e0ec3037e
commit
44ea792130
@ -667,6 +667,11 @@ already_AddRefed<IDBRequest> IDBDatabase::CreateMutableFile(
|
||||
ErrorResult& aRv) {
|
||||
AssertIsOnOwningThread();
|
||||
|
||||
if (aName.IsEmpty()) {
|
||||
aRv.Throw(NS_ERROR_DOM_SYNTAX_ERR);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
if (QuotaManager::IsShuttingDown()) {
|
||||
IDB_REPORT_INTERNAL_ERR();
|
||||
aRv.Throw(NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR);
|
||||
|
5
dom/indexedDB/crashtests/1507229-1.html
Normal file
5
dom/indexedDB/crashtests/1507229-1.html
Normal file
@ -0,0 +1,5 @@
|
||||
<script>
|
||||
window.indexedDB.open("hello").onsuccess = function(event) {
|
||||
event.target.result.createMutableFile("");
|
||||
}
|
||||
</script>
|
@ -1 +1,2 @@
|
||||
load 726376-1.html
|
||||
load 1507229-1.html
|
||||
|
Loading…
Reference in New Issue
Block a user