зеркало из https://github.com/mozilla/shumway.git
Fixed inconsistent usage of the AbcFile constructor.
This commit is contained in:
Родитель
17c506c725
Коммит
1685db125e
|
@ -158,7 +158,7 @@
|
|||
reader.onload = function() {
|
||||
var result = this.result;
|
||||
createAVM2(true, function (avm2) {
|
||||
avm2.applicationDomain.executeAbc(new AbcFile(new Uint8Array(result)), file.name, true);
|
||||
avm2.applicationDomain.executeAbc(new AbcFile(new Uint8Array(result), file.name));
|
||||
});
|
||||
}
|
||||
} else if (file.name.endsWith(".swf")) {
|
||||
|
@ -245,7 +245,7 @@
|
|||
if (rfile.endsWith(".abc")) {
|
||||
createAVM2(true, function(avm2) {
|
||||
new BinaryFileReader(rfile).readAll(null, function(buffer) {
|
||||
avm2.applicationDomain.executeAbc(new AbcFile(new Uint8Array(buffer), rfile, true));
|
||||
avm2.applicationDomain.executeAbc(new AbcFile(new Uint8Array(buffer), rfile));
|
||||
});
|
||||
});
|
||||
} else if (rfile.endsWith(".swf")) {
|
||||
|
|
|
@ -109,7 +109,7 @@ if (file.value.endsWith(".swf")) {
|
|||
for (var i = 0, n = tags.length; i < n; i++) {
|
||||
var tag = tags[i];
|
||||
if (tag.type === "abc") {
|
||||
processAbc(new AbcFile(tag.data, file.value + " [Tag ID: " + i + "]", true));
|
||||
processAbc(new AbcFile(tag.data, file.value + " [Tag ID: " + i + "]"));
|
||||
} else if (tag.type === "symbols") {
|
||||
for (var j = tag.references.length - 1; j >= 0; j--) {
|
||||
if (tag.references[j].id === 0) {
|
||||
|
@ -126,7 +126,7 @@ if (file.value.endsWith(".swf")) {
|
|||
});
|
||||
} else {
|
||||
assert(file.value.endsWith(".abc"));
|
||||
processAbc(new AbcFile(snarf(file.value, "binary"), file.value, true));
|
||||
processAbc(new AbcFile(snarf(file.value, "binary"), file.value));
|
||||
}
|
||||
|
||||
function processAbc(abc) {
|
||||
|
|
|
@ -809,7 +809,9 @@ var Runtime = (function () {
|
|||
defineReadOnlyProperty(mc, "public$prototype", null);
|
||||
defineReadOnlyProperty(this, qn, mc);
|
||||
return mc;
|
||||
}
|
||||
};
|
||||
// TODO: We make the |memoizeMethodClosure| configurable since it may be
|
||||
// overriden by a derivied class. Only do this non final classes.
|
||||
defineMemoizingGetter(obj, qn, memoizeMethodClosure);
|
||||
} else {
|
||||
mc = closure.bind(obj);
|
||||
|
|
|
@ -217,7 +217,7 @@ Loader.prototype = Object.create(baseProto, {
|
|||
var i = 0;
|
||||
var block;
|
||||
while (block = blocks[i++]) {
|
||||
this.avm2.applicationDomain.executeAbc(new AbcFile(block, file, true));
|
||||
this.avm2.applicationDomain.executeAbc(new AbcFile(block));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче