Fixed: AS text search - not being able to cancel search over multiple swf files

This commit is contained in:
Jindra Petřík
2025-07-19 07:29:27 +02:00
parent 6a4a489336
commit d23fe66a01
3 changed files with 15 additions and 6 deletions

View File

@@ -757,8 +757,10 @@ public final class SWF implements SWFContainerItem, Timelined, Openable {
}
try {
SWF.initPlayer();
} catch (IOException | InterruptedException ex) {
Logger.getLogger(SWF.class.getName()).log(Level.SEVERE, null, ex);
} catch (IOException ex) {
Logger.getLogger(SWF.class.getName()).log(Level.SEVERE, "IOException during SWF.initplayer", ex);
} catch (InterruptedException ex) {
return new AbcIndexing();
}
abcIndex = new AbcIndexing(air ? SWF.getAirGlobalAbcIndex() : SWF.getPlayerGlobalAbcIndex());
for (Tag tag : tags) {
@@ -784,7 +786,7 @@ public final class SWF implements SWFContainerItem, Timelined, Openable {
*
* @param swfs List of SWFs to set as dependencies
*/
public void setAbcIndexDependencies(List<SWF> swfs) {
public void setAbcIndexDependencies(List<SWF> swfs) throws InterruptedException {
abcIndex = null;
getAbcIndex();
for (SWF swf : swfs) {
@@ -3998,7 +4000,7 @@ public final class SWF implements SWFContainerItem, Timelined, Openable {
* @param renameType Rename type
* @return Number of changes
*/
public int deobfuscateAS3Identifiers(RenameType renameType) {
public int deobfuscateAS3Identifiers(RenameType renameType) throws InterruptedException {
AbcIndexing ai = getAbcIndex();
Map<Tag, Map<Integer, String>> stringUsageTypesMap = new HashMap<>();
Map<Tag, Set<Integer>> stringUsagesMap = new HashMap<>();

View File

@@ -128,7 +128,10 @@ public class ActionScriptSearch {
} catch (CancellationException ex) {
throw new InterruptedException();
} catch (ExecutionException ex) {
Logger.getLogger(ActionScriptSearch.class.getName()).log(Level.SEVERE, null, ex);
if (ex.getCause() instanceof InterruptedException) {
throw (InterruptedException) ex.getCause();
}
Logger.getLogger(ActionScriptSearch.class.getName()).log(Level.SEVERE, "Execution exception during search", ex);
}
}
}
@@ -266,7 +269,10 @@ public class ActionScriptSearch {
} catch (CancellationException ex) {
throw new InterruptedException();
} catch (ExecutionException ex) {
Logger.getLogger(ActionScriptSearch.class.getName()).log(Level.SEVERE, null, ex);
if (ex.getCause() instanceof InterruptedException) {
throw (InterruptedException) ex.getCause();
}
Logger.getLogger(ActionScriptSearch.class.getName()).log(Level.SEVERE, "Execution exception during search", ex);
}
}
} catch (InterruptedException ex) {