if(!this.db){ try{ this.db = google.gears.factory.create('beta.database', '1.0'); }catch(exp){ dojo.setObject("google.gears.denied", true); dojox.off.onFrameworkEvent("coreOperationFailed"); throw "Google Gears must be allowed to run"; } }