[Pkg-mozext-commits] [tabmixplus] 37/123: [e10s] Collecting scroll position from history on remote tabs break TabmixSessionManager.saveTabHistory
David Prévot
taffit at moszumanska.debian.org
Wed Sep 17 21:16:25 UTC 2014
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository tabmixplus.
commit 1d00373ef07a4f56f2da78e14c02f8d35208e6b3
Author: onemen <tabmix.onemen at gmail.com>
Date: Sun Aug 24 20:18:09 2014 +0300
[e10s] Collecting scroll position from history on remote tabs break TabmixSessionManager.saveTabHistory
---
chrome/content/session/session.js | 19 ++++++++++++-------
1 file changed, 12 insertions(+), 7 deletions(-)
diff --git a/chrome/content/session/session.js b/chrome/content/session/session.js
index fb5f9e5..5ef9f44 100644
--- a/chrome/content/session/session.js
+++ b/chrome/content/session/session.js
@@ -2749,10 +2749,12 @@ try{
saveTabHistory: function(sessionHistory) {
var historyStart = this.enableSaveHistory ? 0 : sessionHistory.index;
var historyEnd = this.enableSaveHistory ? sessionHistory.count : sessionHistory.index+1;
- var j, historyEntry, history = [];
- for (j = historyStart; j < historyEnd; j++) {
+ var history = [];
+ sessionHistory.QueryInterface(Ci.nsISHistoryInternal);
+ for (let j = historyStart; j < historyEnd; j++) {
try {
- historyEntry = sessionHistory.getEntryAtIndex(j, false).QueryInterface(Ci.nsISHEntry);
+ let historyEntry = sessionHistory.getEntryAtIndex(j, false);
+ historyEntry.QueryInterface(Ci.nsISHEntry);
history.push(historyEntry.title);
history.push(historyEntry.URI.spec);
history.push(this.getScrollPosHs(historyEntry)); // not in use yet
@@ -2770,10 +2772,13 @@ try{
getScrollPosHs: function(historyEntry) {
if (this.prefBranch.getBoolPref("save.scrollposition")) {
- var x={}, y={};
- historyEntry.getScrollPosition(x, y);
- return x.value + "," + y.value;
- } return "0,0";
+ try {
+ var x={}, y={};
+ historyEntry.getScrollPosition(x, y);
+ return x.value + "," + y.value;
+ } catch (ex) {}
+ }
+ return "0,0";
},
get canRestoreLastSession() {
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/tabmixplus.git
More information about the Pkg-mozext-commits
mailing list