Bug 1685680 [wpt PR 27099] - Add missing jsapi tests for wasm reference-types proposa...
[gecko.git] / browser / actors / RefreshBlockerParent.jsm
blob5da938ad14851d2a78a2c1f7dab073cf534f7d43
1 /* This Source Code Form is subject to the terms of the Mozilla Public
2  * License, v. 2.0. If a copy of the MPL was not distributed with this
3  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4 "use strict";
6 var EXPORTED_SYMBOLS = ["RefreshBlockerParent"];
8 class RefreshBlockerParent extends JSWindowActorParent {
9   receiveMessage(message) {
10     if (message.name == "RefreshBlocker:Blocked") {
11       let browser = this.browsingContext.top.embedderElement;
12       if (browser) {
13         let gBrowser = browser.ownerGlobal.gBrowser;
14         if (gBrowser) {
15           gBrowser.refreshBlocked(this, browser, message.data);
16         }
17       }
18     }
19   }