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

Delta Between Two Patch Sets: chrome/content/tests/tests/suffixTreeManipulation.js

Issue 8450003: Reimplemented whitelist handling (Closed)
Left Patch Set: Created Sept. 25, 2012, 3:48 p.m.
Right Patch Set: Modifications only, different base revision Created Sept. 27, 2012, 2:54 p.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 | « no previous file | lib/rules.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 (function() 1 (function()
2 { 2 {
Thomas Greiner 2012/09/26 15:49:13 bracket on first line (as seen on last line)
Wladimir Palant 2012/09/27 14:55:06 Not really how I usually write it...
3 function getModuleGlobal(module) 3 function getModuleGlobal(module)
4 { 4 {
5 let result = Cu.getGlobalForObject(require(module)); 5 let result = Cu.getGlobalForObject(require(module));
6 if (result == window) 6 if (result == window)
7 { 7 {
8 // Work-around for bug 736316 - getGlobalForObject gave us our own window 8 // Work-around for bug 736316 - getGlobalForObject gave us our own window
9 let {XPIProvider} = Cu.import("resource://gre/modules/XPIProvider.jsm", nu ll); 9 let {XPIProvider} = Cu.import("resource://gre/modules/XPIProvider.jsm", nu ll);
10 let addonID = "{d10d0bf8-f5b5-c8b4-a8b2-2b9879e08c5d}" 10 let addonID = "{0fa2149e-bb2c-4ac2-a8d3-479599819475}";
Thomas Greiner 2012/09/26 15:49:13 semicolon is missing
Wladimir Palant 2012/09/27 14:55:06 Bigger issue actually - that's the ID for Adblock
11 if (addonID in XPIProvider.bootstrapScopes) 11 if (addonID in XPIProvider.bootstrapScopes)
12 result = XPIProvider.bootstrapScopes[addonID]; 12 result = XPIProvider.bootstrapScopes[addonID];
13 } 13 }
14 14
15 if ("require" in result) 15 if ("require" in result)
16 result = result.require.scopes[module]; 16 result = result.require.scopes[module];
17 return result; 17 return result;
18 } 18 }
19 19
20 let {onWhitelistEntryAdded, onWhitelistEntryRemoved} = require("rules"); 20 let {onWhitelistEntryAdded, onWhitelistEntryRemoved} = require("rules");
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 "o": { 196 "o": {
197 "o": { 197 "o": {
198 "f": { 198 "f": {
199 }, 199 },
200 "g": " 1234" 200 "g": " 1234"
201 } 201 }
202 } 202 }
203 }, "Attempted to remove goo"); 203 }, "Attempted to remove goo");
204 }); 204 });
205 })(); 205 })();
LEFTRIGHT
« no previous file | lib/rules.js » ('j') | Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Toggle Comments ('s')

Powered by Google App Engine
This is Rietveld