aboutsummaryrefslogtreecommitdiff
path: root/ext/js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/js')
-rw-r--r--ext/js/display/display.js24
1 files changed, 12 insertions, 12 deletions
diff --git a/ext/js/display/display.js b/ext/js/display/display.js
index 4148cd84..7ede1384 100644
--- a/ext/js/display/display.js
+++ b/ext/js/display/display.js
@@ -380,16 +380,6 @@ class Display extends EventDispatcher {
}
}
- authenticateMessageData(data) {
- if (this._frameEndpoint === null) {
- return data;
- }
- if (!this._frameEndpoint.authenticate(data)) {
- throw new Error('Invalid authentication');
- }
- return data.data;
- }
-
setQueryPostProcessor(func) {
this._queryPostProcessor = func;
}
@@ -454,7 +444,7 @@ class Display extends EventDispatcher {
// Message handlers
_onDirectMessage(data) {
- data = this.authenticateMessageData(data);
+ data = this._authenticateMessageData(data);
const {action, params} = data;
const handlerInfo = this._directMessageHandlers.get(action);
if (typeof handlerInfo === 'undefined') {
@@ -468,7 +458,7 @@ class Display extends EventDispatcher {
_onWindowMessage({data}) {
try {
- data = this.authenticateMessageData(data);
+ data = this._authenticateMessageData(data);
} catch (e) {
return;
}
@@ -518,6 +508,16 @@ class Display extends EventDispatcher {
// Private
+ _authenticateMessageData(data) {
+ if (this._frameEndpoint === null) {
+ return data;
+ }
+ if (!this._frameEndpoint.authenticate(data)) {
+ throw new Error('Invalid authentication');
+ }
+ return data.data;
+ }
+
async _onStateChanged() {
if (this._historyChangeIgnore) { return; }