Language: JavaScript
Label: vulnerable
CWE: CWE-400 \u2014 Uncontrolled Resource Consumption
The product does not properly control the allocation and maintenance of a limited resource, thereby enabling an actor to influence the amount of resources consumed, eventually leading to the exhaustion of available resources.

Code:
k&&k(x)}}),k)};EditorUi.prototype.removeDatabaseItem=function(c,e,g,k){this.openDatabase(mxUtils.bind(this,function(m){k=k||"objects";Array.isArray(k)||(k=[k],c=[c]);m=m.transaction(k,"readwrite");m.oncomplete=e;m.onerror=g;for(var p=0;p<k.length;p++)m.objectStore(k[p]).delete(c[p])}),g)};EditorUi.prototype.getDatabaseItem=function(c,e,g,k){this.openDatabase(mxUtils.bind(this,function(m){try{k=k||"objects";var p=m.transaction([k],"readonly").objectStore(k).get(c);p.onsuccess=function(){e(p.result)};
p.onerror=g}catch(v){null!=g&&g(v)}}),g)};EditorUi.prototype.getDatabaseItems=function(c,e,g){this.openDatabase(mxUtils.bind(this,function(k){try{g=g||"objects";var m=k.transaction([g],"readonly").objectStore(g).openCursor(IDBKeyRange.lowerBound(0)),p=[];m.onsuccess=function(v){null==v.target.result?c(p):(p.push(v.target.result.value),v.target.result.continue())};m.onerror=e}catch(v){null!=e&&e(v)}}),e)};EditorUi.prototype.getDatabaseItemKeys=function(c,e,g){this.openDatabase(mxUtils.bind(this,function(k){try{g=