Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: safari/ext/background.js

Issue 5153060179410944: Issue 1694 - Fixed error when opening multiple tabs on Safari (Closed)
Patch Set: Created Dec. 13, 2014, 3:49 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * This file is part of Adblock Plus <http://adblockplus.org/>, 2 * This file is part of Adblock Plus <http://adblockplus.org/>,
3 * Copyright (C) 2006-2014 Eyeo GmbH 3 * Copyright (C) 2006-2014 Eyeo GmbH
4 * 4 *
5 * Adblock Plus is free software: you can redistribute it and/or modify 5 * Adblock Plus is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 3 as 6 * it under the terms of the GNU General Public License version 3 as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
8 * 8 *
9 * Adblock Plus is distributed in the hope that it will be useful, 9 * Adblock Plus is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 }, 53 },
54 sendMessage: function(message, responseCallback) 54 sendMessage: function(message, responseCallback)
55 { 55 {
56 this._messageProxy.sendMessage(message, responseCallback, {pageId: this._i d}); 56 this._messageProxy.sendMessage(message, responseCallback, {pageId: this._i d});
57 } 57 }
58 }; 58 };
59 59
60 var isPageActive = function(page) 60 var isPageActive = function(page)
61 { 61 {
62 var tab = page._tab; 62 var tab = page._tab;
63 return tab == tab.browserWindow.activeTab && page == tab._visiblePage; 63 var win = tab.browserWindow;
64 return win && tab == win.activeTab && page == tab._visiblePage;
64 }; 65 };
65 66
66 var forgetPage = function(id) 67 var forgetPage = function(id)
67 { 68 {
68 ext._removeFromAllPageMaps(id); 69 ext._removeFromAllPageMaps(id);
69 70
70 delete pages[id]._tab._pages[id]; 71 delete pages[id]._tab._pages[id];
71 delete pages[id]; 72 delete pages[id];
72 }; 73 };
73 74
(...skipping 596 matching lines...) Expand 10 before | Expand all | Expand 10 after
670 page.activate(); 671 page.activate();
671 if (callback) 672 if (callback)
672 callback(page); 673 callback(page);
673 return; 674 return;
674 } 675 }
675 } 676 }
676 677
677 ext.pages.open(optionsUrl, callback); 678 ext.pages.open(optionsUrl, callback);
678 }; 679 };
679 })(); 680 })();
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld