| OLD | NEW | 
|   1 /* |   1 /* | 
|   2  * This file is part of Adblock Plus <https://adblockplus.org/>, |   2  * This file is part of Adblock Plus <https://adblockplus.org/>, | 
|   3  * Copyright (C) 2006-2017 eyeo GmbH |   3  * Copyright (C) 2006-2017 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 "use strict"; |  18 "use strict"; | 
|  19  |  19  | 
|  20 "Compiled from https://hg.adblockplus.org/adblockplus/ with Emscripten {{{EMSCRI
    PTEN_VERSION}}}"; |  20 "Compiled from https://hg.adblockplus.org/adblockplus/ with Emscripten {{{EMSCRI
    PTEN_VERSION}}}"; | 
|  21  |  21  | 
|  22 var regexps = |  | 
|  23 { |  | 
|  24   _data: Object.create(null), |  | 
|  25   _counter: 0, |  | 
|  26  |  | 
|  27   create: function(source, matchCase) |  | 
|  28   { |  | 
|  29     var id = ++this._counter; |  | 
|  30     try |  | 
|  31     { |  | 
|  32       this._data[id] = new RegExp(readString(source), matchCase ? "" : "i"); |  | 
|  33       return id; |  | 
|  34     } |  | 
|  35     catch (e) |  | 
|  36     { |  | 
|  37       return -1; |  | 
|  38     } |  | 
|  39   }, |  | 
|  40  |  | 
|  41   delete: function(id) |  | 
|  42   { |  | 
|  43     delete this._data[id]; |  | 
|  44   }, |  | 
|  45  |  | 
|  46   test: function(id, str) |  | 
|  47   { |  | 
|  48     return this._data[id].test(readString(str)); |  | 
|  49   } |  | 
|  50 }; |  | 
|  51  |  | 
|  52 var Module = |  22 var Module = | 
|  53 { |  23 { | 
|  54   preRun: [], |  24   preRun: [], | 
|  55   postRun: [], |  25   postRun: [], | 
|  56   print: console.log.bind(console), |  26   print: console.log.bind(console), | 
|  57   printErr: console.error.bind(console), |  27   printErr: console.error.bind(console), | 
|  58  |  28  | 
|  59   getMemoryLayout: function() |  29   getMemoryLayout: function() | 
|  60   { |  30   { | 
|  61     return { |  31     return { | 
|  62       'static_base':  STATIC_BASE, |  32       'static_base':  STATIC_BASE, | 
|  63       'static_top':   STATICTOP, |  33       'static_top':   STATICTOP, | 
|  64       'stack_base':   STACK_BASE, |  34       'stack_base':   STACK_BASE, | 
|  65       'stack_top':    STACKTOP, |  35       'stack_top':    STACKTOP, | 
|  66       'stack_max':    STACK_MAX, |  36       'stack_max':    STACK_MAX, | 
|  67       'dynamic_base': DYNAMIC_BASE, |  37       'dynamic_base': DYNAMIC_BASE, | 
|  68       'dynamic_top':  HEAP32[DYNAMICTOP_PTR >> 2], |  38       'dynamic_top':  HEAP32[DYNAMICTOP_PTR >> 2], | 
|  69       'total_memory': TOTAL_MEMORY |  39       'total_memory': TOTAL_MEMORY | 
|  70     }; |  40     }; | 
|  71   } |  41   } | 
|  72 }; |  42 }; | 
|  73 var ENVIRONMENT_IS_WEB = false, ENVIRONMENT_IS_NODE = false, |  43 var ENVIRONMENT_IS_WEB = false, ENVIRONMENT_IS_NODE = false, | 
|  74     ENVIRONMENT_IS_WORKER = false, ENVIRONMENT_IS_SHELL = true; |  44     ENVIRONMENT_IS_WORKER = false, ENVIRONMENT_IS_SHELL = true; | 
|  75  |  45  | 
|  76 {{BODY}} |  46 {{BODY}} | 
|  77  |  47  | 
|  78 Object.assign(exports, Module); |  48 Object.assign(exports, Module); | 
| OLD | NEW |