diff options
author | Benjamin Jones <bjones@galois.com> | 2012-10-02 15:02:07 -0700 |
---|---|---|
committer | Benjamin Jones <bjones@galois.com> | 2012-10-02 15:02:07 -0700 |
commit | 55fd35dbff7f611f2f04abdd6d86fada0be4d353 (patch) | |
tree | e51a7a1b2e270f9ba53c71099d51acf2391a3405 /contexts/data | |
parent | 5aebc7f2590883c27a7c942d9b89316ddd8d8cca (diff) |
added toEmit() method to TabState -> fixes bug with Chrome extension no showing injected UI
Diffstat (limited to 'contexts/data')
-rw-r--r-- | contexts/data/fiveui/background.js | 2 | ||||
-rw-r--r-- | contexts/data/fiveui/state.js | 9 |
2 files changed, 10 insertions, 1 deletions
diff --git a/contexts/data/fiveui/background.js b/contexts/data/fiveui/background.js index 108a0af..6b623fe 100644 --- a/contexts/data/fiveui/background.js +++ b/contexts/data/fiveui/background.js @@ -103,7 +103,7 @@ fiveui.Background.prototype.connect = function(tabId, port, url, isUiPort) { if (isUiPort) { tabState.uiPort = port; this._registerUiListeners(port, tabState); - port.emit('RestoreUI', tabState); + port.emit('RestoreUI', tabState.toEmit()); this.updateWidget(tabState); } else { tabState.computePorts.push(port); diff --git a/contexts/data/fiveui/state.js b/contexts/data/fiveui/state.js index 18b7154..b1d99a0 100644 --- a/contexts/data/fiveui/state.js +++ b/contexts/data/fiveui/state.js @@ -97,6 +97,15 @@ fiveui.TabState.prototype.clearProblems = function() { this.seenProblems = new goog.structs.Set(); }; +/* + * Returns a copy of only the attributes in a TabState that are needed for + * interpage communication. + */ +fiveui.TabState.prototype.toEmit = function() { + // return jQuery.extend(true, {}, { winState: this.winState, problems: this.problems }); + return { winState: this.winState, problems: this.problems }; +} + /** * @constructor * @param {!fiveui.Settings} settings The settings object to obtain |