* @return {!Promise<!Store>} * @private
()
| 119 | * @private |
| 120 | */ |
| 121 | getStore_() { |
| 122 | if (!this.storePromise_) { |
| 123 | this.storePromise_ = this.binding_ |
| 124 | .loadBlob(this.origin_) |
| 125 | .then((blob) => (blob ? parseJson(atob(blob)) : {})) |
| 126 | .catch((reason) => { |
| 127 | dev().expectedError(TAG, 'Failed to load store: ', reason); |
| 128 | return {}; |
| 129 | }) |
| 130 | .then((obj) => new Store(obj)); |
| 131 | } |
| 132 | return this.storePromise_; |
| 133 | } |
| 134 | |
| 135 | /** |
| 136 | * @param {function(!Store)} mutator |