| 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 | 
| (...skipping 13 matching lines...) Expand all  Loading... | 
| 24 #include <stdexcept> | 24 #include <stdexcept> | 
| 25 #include <memory> | 25 #include <memory> | 
| 26 | 26 | 
| 27 #include <AdblockPlus.h> | 27 #include <AdblockPlus.h> | 
| 28 | 28 | 
| 29 #define PKG(x) "org/adblockplus/libadblockplus/" x | 29 #define PKG(x) "org/adblockplus/libadblockplus/" x | 
| 30 #define TYP(x) "L" PKG(x) ";" | 30 #define TYP(x) "L" PKG(x) ";" | 
| 31 | 31 | 
| 32 #define ABP_JNI_VERSION JNI_VERSION_1_6 | 32 #define ABP_JNI_VERSION JNI_VERSION_1_6 | 
| 33 | 33 | 
|  | 34 namespace AdblockPlus | 
|  | 35 { | 
|  | 36   namespace Utils | 
|  | 37   { | 
|  | 38     std::string Slurp(std::istream& stream); | 
|  | 39   } | 
|  | 40 } | 
|  | 41 | 
| 34 void JniUtils_OnLoad(JavaVM* vm, JNIEnv* env, void* reserved); | 42 void JniUtils_OnLoad(JavaVM* vm, JNIEnv* env, void* reserved); | 
| 35 | 43 | 
| 36 void JniUtils_OnUnload(JavaVM* vm, JNIEnv* env, void* reserved); | 44 void JniUtils_OnUnload(JavaVM* vm, JNIEnv* env, void* reserved); | 
| 37 | 45 | 
| 38 void JniThrowException(JNIEnv* env, const std::string& message); | 46 void JniThrowException(JNIEnv* env, const std::string& message); | 
| 39 | 47 | 
| 40 void JniThrowException(JNIEnv* env, const std::exception& e); | 48 void JniThrowException(JNIEnv* env, const std::exception& e); | 
| 41 | 49 | 
| 42 void JniThrowException(JNIEnv* env); | 50 void JniThrowException(JNIEnv* env); | 
| 43 | 51 | 
| (...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 211     JniThrowException(jEnv, except); \ | 219     JniThrowException(jEnv, except); \ | 
| 212     return retVal; \ | 220     return retVal; \ | 
| 213   } \ | 221   } \ | 
| 214   catch (...) \ | 222   catch (...) \ | 
| 215   { \ | 223   { \ | 
| 216     JniThrowException(jEnv); \ | 224     JniThrowException(jEnv); \ | 
| 217     return retVal; \ | 225     return retVal; \ | 
| 218   } | 226   } | 
| 219 | 227 | 
| 220 #endif | 228 #endif | 
| OLD | NEW | 
|---|