swf reference removed from ABC class

This commit is contained in:
2015-01-18 17:44:57 +01:00
parent 1c4afe5ea3
commit b3880ab5de
6 changed files with 20 additions and 24 deletions
@@ -90,8 +90,6 @@ public class ABC {
private static final Logger logger = Logger.getLogger(ABC.class.getName());
private AVM2Deobfuscation deobfuscation;
@Internal
public SWF swf;
@Internal
public ABCContainerTag parentTag;
/* Map from multiname index of namespace value to namespace name**/
@@ -99,7 +97,6 @@ public class ABC {
public ABC(SWF swf) {
this.deobfuscation = null;
this.swf = swf;
constants.constant_double.add(null);
constants.constant_int.add(null);
constants.constant_uint.add(null);
@@ -109,6 +106,10 @@ public class ABC {
constants.constant_namespace_set.add(null);
}
public SWF getSwf() {
return parentTag.getSwf();
}
public int addMethodBody(MethodBody body) {
bodies.add(body);
bodyIdxFromMethodIdx = null;
@@ -339,7 +340,6 @@ public class ABC {
}
public ABC(ABCInputStream ais, SWF swf, ABCContainerTag tag) throws IOException {
this.swf = swf;
this.parentTag = tag;
minor_version = ais.readU16("minor_version");
major_version = ais.readU16("major_version");
@@ -1207,7 +1207,7 @@ public class ABC {
String scriptName = pack.getPathScriptName() + ".as";
int oldIndex = pack.scriptIndex;
int newIndex = script_info.size();
String documentClass = swf.getDocumentClass();
String documentClass = getSwf().getDocumentClass();
boolean isDocumentClass = documentClass != null && documentClass.equals(pack.getClassPath().toString());
ScriptInfo si = script_info.get(oldIndex);
@@ -12,7 +12,8 @@
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.␍ */
* License along with this library.
*/
package com.jpexs.decompiler.flash.abc;
import com.jpexs.decompiler.flash.SWF;
@@ -54,7 +55,7 @@ public class ScriptPack extends AS3ClassTreeItem {
@Override
public SWF getSwf() {
return abc.swf;
return abc.getSwf();
}
public ClassPath getClassPath() {