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:
q.onerror=k}catch(x){null!=k&&k(x)}}),k)};EditorUi.prototype.getDatabaseItems=function(d,g,k){this.openDatabase(mxUtils.bind(this,function(l){try{k=k||"objects";var p=l.transaction([k],"readonly").objectStore(k).openCursor(IDBKeyRange.lowerBound(0)),q=[];p.onsuccess=function(x){null==x.target.result?d(q):(q.push(x.target.result.value),x.target.result.continue())};p.onerror=g}catch(x){null!=g&&g(x)}}),g)};EditorUi.prototype.getDatabaseItemKeys=function(d,g,k){this.openDatabase(mxUtils.bind(this,function(l){try{k=