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

Side by Side Diff: lib/compat.js

Issue 10213003: Make JsEngine::Evaluate() return a wrapper for v8::Value to accessdifferent variable types easily (Closed)
Patch Set: Unbitrotted patch Created April 16, 2013, 3:30 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 | « lib/api.js ('k') | libadblockplus.gyp » ('j') | 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 the Adblock Plus extension, 2 * This file is part of the Adblock Plus extension,
3 * Copyright (C) 2006-2012 Eyeo GmbH 3 * Copyright (C) 2006-2012 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
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details. 12 * GNU General Public License for more details.
13 * 13 *
14 * You should have received a copy of the GNU General Public License 14 * You should have received a copy of the GNU General Public License
15 * along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>. 15 * along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>.
16 */ 16 */
17 17
18 // TODO: These need to be defined properly 18 // TODO: These need to be defined properly
19 var window = this;
19 function XMLHttpRequest() {}; 20 function XMLHttpRequest() {};
20 21
21 // 22 //
22 // Module framework stuff 23 // Module framework stuff
23 // 24 //
24 25
25 function require(module) 26 function require(module)
26 { 27 {
27 return require.scopes[module]; 28 return require.scopes[module];
28 } 29 }
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 callback: null, 254 callback: null,
254 initWithCallback: function(callback, delay) 255 initWithCallback: function(callback, delay)
255 { 256 {
256 this.callback = callback; 257 this.callback = callback;
257 this.delay = delay; 258 this.delay = delay;
258 this.scheduleTimeout(); 259 this.scheduleTimeout();
259 }, 260 },
260 scheduleTimeout: function() 261 scheduleTimeout: function()
261 { 262 {
262 var me = this; 263 var me = this;
263 window.setTimeout(function() 264 setTimeout(function()
264 { 265 {
265 try 266 try
266 { 267 {
267 me.callback(); 268 me.callback();
268 } 269 }
269 catch(e) 270 catch(e)
270 { 271 {
271 Cu.reportError(e); 272 Cu.reportError(e);
272 } 273 }
273 me.scheduleTimeout(); 274 me.scheduleTimeout();
(...skipping 10 matching lines...) Expand all
284 status: -1, 285 status: -1,
285 notificationCallbacks: {}, 286 notificationCallbacks: {},
286 loadFlags: 0, 287 loadFlags: 0,
287 INHIBIT_CACHING: 0, 288 INHIBIT_CACHING: 0,
288 VALIDATE_ALWAYS: 0, 289 VALIDATE_ALWAYS: 0,
289 QueryInterface: function() 290 QueryInterface: function()
290 { 291 {
291 return this; 292 return this;
292 } 293 }
293 }; 294 };
OLDNEW
« no previous file with comments | « lib/api.js ('k') | libadblockplus.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld