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

Unified Diff: chrome/common.js

Issue 6184947589054464: Don't wrap tab info in Tab if Tab is not defined (Closed)
Patch Set: Created Jan. 14, 2014, 11:48 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | safari/common.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common.js
===================================================================
--- a/chrome/common.js
+++ b/chrome/common.js
@@ -70,7 +70,7 @@
_wrapListener: function(listener) {
return function(message, sender, sendResponse)
{
- if (sender.tab && sender.tab.id >= 0)
+ if ("Tab" in window && sender.tab && sender.tab.id >= 0)
Wladimir Palant 2014/01/16 08:01:10 So we have content scripts receive messages where
Thomas Greiner 2014/01/16 10:15:30 Yes, that is the case and it seems like it's inten
Wladimir Palant 2014/01/16 10:44:49 Ok, this actually makes sense then.
sender.tab = new Tab(sender.tab);
return listener(message, sender, sendResponse);
};
« no previous file with comments | « no previous file | safari/common.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld