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

Delta Between Two Patch Sets: libadblockplus-android/jni/Utils.h

Issue 29422558: Issue 5167 - Update to use libadblockplus revision dca8df9af1a7 (Closed)
Left Patch Set: updated dependencies (..-binaries) Created May 3, 2017, 2:08 p.m.
Right Patch Set: updated dependencies (..-binaries) Created May 10, 2017, 6:54 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 | « libadblockplus-android/jni/JniSubscription.cpp ('k') | libadblockplus-android/jni/Utils.cpp » ('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 <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 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 return (int64_t)env->GetLongField(jObj, env->GetFieldID(clazz, name, "J")); 180 return (int64_t)env->GetLongField(jObj, env->GetFieldID(clazz, name, "J"));
181 } 181 }
182 182
183 inline jobjectArray JniGetStringArrayField(JNIEnv* env, jclass clazz, jobject jO bj, const char* name) 183 inline jobjectArray JniGetStringArrayField(JNIEnv* env, jclass clazz, jobject jO bj, const char* name)
184 { 184 {
185 return (jobjectArray)env->GetObjectField(jObj, env->GetFieldID(clazz, name, "[ Ljava/lang/String;")); 185 return (jobjectArray)env->GetObjectField(jObj, env->GetFieldID(clazz, name, "[ Ljava/lang/String;"));
186 } 186 }
187 187
188 jobject NewJniArrayList(JNIEnv* env); 188 jobject NewJniArrayList(JNIEnv* env);
189 189
190 jobject NewJniFilter(JNIEnv* env, const AdblockPlus::Filter& filter); 190 jobject NewJniFilter(JNIEnv* env, AdblockPlus::Filter&& filter);
191 191
192 jobject NewJniSubscription(JNIEnv* env, const AdblockPlus::Subscription& subscri ption); 192 jobject NewJniSubscription(JNIEnv* env, AdblockPlus::Subscription&& subscription );
193 193
194 jobject NewJniNotification(JNIEnv* env, const AdblockPlus::Notification& notific ation); 194 jobject NewJniNotification(JNIEnv* env, AdblockPlus::Notification&& notification );
195 195
196 #define CATCH_AND_THROW(jEnv) \ 196 #define CATCH_AND_THROW(jEnv) \
197 catch (const std::exception& except) \ 197 catch (const std::exception& except) \
198 { \ 198 { \
199 JniThrowException(jEnv, except); \ 199 JniThrowException(jEnv, except); \
200 } \ 200 } \
201 catch (...) \ 201 catch (...) \
202 { \ 202 { \
203 JniThrowException(jEnv); \ 203 JniThrowException(jEnv); \
204 } 204 }
205 205
206 #define CATCH_THROW_AND_RETURN(jEnv, retVal) \ 206 #define CATCH_THROW_AND_RETURN(jEnv, retVal) \
207 catch (const std::exception& except) \ 207 catch (const std::exception& except) \
208 { \ 208 { \
209 JniThrowException(jEnv, except); \ 209 JniThrowException(jEnv, except); \
210 return retVal; \ 210 return retVal; \
211 } \ 211 } \
212 catch (...) \ 212 catch (...) \
213 { \ 213 { \
214 JniThrowException(jEnv); \ 214 JniThrowException(jEnv); \
215 return retVal; \ 215 return retVal; \
216 } 216 }
217 217
218 #endif 218 #endif
LEFTRIGHT

Powered by Google App Engine
This is Rietveld