* @param {Object} data * @return {Promise } same object
(data)
| 64 | * @return {Promise<Object>} same object |
| 65 | */ |
| 66 | async set(data) { |
| 67 | if (process.env.DEV && !isObject(data)) { |
| 68 | throw 'VMStorageArea.set: data is not an object'; |
| 69 | } |
| 70 | await api.set(this.prefix |
| 71 | ? data::mapEntry(null, this.toKey, this) |
| 72 | : data); |
| 73 | return data; |
| 74 | } |
| 75 | } |
| 76 | |
| 77 | // TODO: add Firefox version to the comment when https://bugzil.la/1910669 is fixed |
no test coverage detected