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

Delta Between Two Patch Sets: safari/content.js

Issue 16067002: Added Safari Support (Closed)
Left Patch Set: Addressed comments Created Nov. 12, 2013, 10:28 a.m.
Right Patch Set: Bugfixes Created Nov. 15, 2013, 8:58 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « safari/common.js ('k') | stats.js » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
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-2013 Eyeo GmbH 3 * Copyright (C) 2006-2013 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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 obj.apply( 59 obj.apply(
60 this.getObject(event.message.contextId), 60 this.getObject(event.message.contextId),
61 this.deserializeSequence(event.message.args) 61 this.deserializeSequence(event.message.args)
62 ); 62 );
63 }.bind(this)); 63 }.bind(this));
64 } 64 }
65 65
66 return {type: "callback", callbackId: callbackId}; 66 return {type: "callback", callbackId: callbackId};
67 } 67 }
68 68
69 if (typeof obj == "object") 69 if (typeof obj == "object" &&
70 if (obj != null) 70 obj != null &&
71 if (obj.constructor != Date) 71 obj.constructor != Date &&
72 if (obj.constructor != RegExp) 72 obj.constructor != RegExp)
73 { 73 {
74 if (!memo) 74 if (!memo)
75 memo = {specs: [], objects: []}; 75 memo = {specs: [], objects: []};
76 76
77 var idx = memo.objects.indexOf(obj); 77 var idx = memo.objects.indexOf(obj);
78 if (idx != -1) 78 if (idx != -1)
79 return memo.specs[idx]; 79 return memo.specs[idx];
80 80
81 var spec = {}; 81 var spec = {};
82 memo.specs.push(spec); 82 memo.specs.push(spec);
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
292 ext.backgroundPage = { 292 ext.backgroundPage = {
293 _eventTarget: safari.self, 293 _eventTarget: safari.self,
294 _messageDispatcher: safari.self.tab, 294 _messageDispatcher: safari.self.tab,
295 295
296 sendMessage: sendMessage, 296 sendMessage: sendMessage,
297 getWindow: function() { return proxy.getObject(0); } 297 getWindow: function() { return proxy.getObject(0); }
298 }; 298 };
299 299
300 ext.onMessage = new MessageEventTarget(safari.self); 300 ext.onMessage = new MessageEventTarget(safari.self);
301 })(); 301 })();
LEFTRIGHT

Powered by Google App Engine
This is Rietveld