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

Side by Side Diff: src/org/adblockplus/android/AdblockPlus.java

Issue 8956033: android: fixed crash on calling callback (Closed)
Patch Set: Created Nov. 27, 2012, 1:54 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 | « no previous file | no next file » | 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, 2 * This file is part of the Adblock Plus,
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
(...skipping 953 matching lines...) Expand 10 before | Expand all | Expand 10 after
964 { 964 {
965 headers[i][0] = header; 965 headers[i][0] = header;
966 headers[i][1] = StringUtils.join(result.headers.get(header).toArray( ), "; "); 966 headers[i][1] = StringUtils.join(result.headers.get(header).toArray( ), "; ");
967 i++; 967 i++;
968 } 968 }
969 } 969 }
970 params[0] = result.code; 970 params[0] = result.code;
971 params[1] = result.message; 971 params[1] = result.message;
972 params[2] = headers; 972 params[2] = headers;
973 params[3] = result.data; 973 params[3] = result.data;
974
975 // Do not run callback if engine was stopped
976 if (js == null)
977 return;
978
974 js.execute(new Runnable() 979 js.execute(new Runnable()
975 { 980 {
976 @Override 981 @Override
977 public void run() 982 public void run()
978 { 983 {
979 js.callback(callback, params); 984 js.callback(callback, params);
980 } 985 }
981 986
982 }); 987 });
983 } 988 }
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
1038 } 1043 }
1039 return result; 1044 return result;
1040 } 1045 }
1041 1046
1042 protected void onProgressUpdate(Integer... progress) 1047 protected void onProgressUpdate(Integer... progress)
1043 { 1048 {
1044 Log.d("HTTP", "Progress: " + progress[0].intValue()); 1049 Log.d("HTTP", "Progress: " + progress[0].intValue());
1045 } 1050 }
1046 } 1051 }
1047 } 1052 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld