Skip to content

Commit

Permalink
Bugfixes in AS2Utils
Browse files Browse the repository at this point in the history
Lets the ad from mozilla#471 get slightly further
  • Loading branch information
tschneidereit committed Oct 30, 2013
1 parent 54ccce0 commit 38361db
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/flash/avm1lib/AS2Utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,13 @@ var AS2UtilsDefinition = (function () {
});
}

var desc = Object.getOwnPropertyDescriptor;

def.__glue__ = {
native: {
static: {
getAS2Object: function (nativeObject) {
return nativeObject ? nativeObject._getAS2Object() : null;
return nativeObject && nativeObject._getAS2Object
? nativeObject._getAS2Object()
: null;
},
addProperty: function (obj, propertyName, getter, setter) {
obj.asDefinePublicProperty(propertyName, {
Expand Down Expand Up @@ -98,6 +98,6 @@ function initDefaultListeners(thisArg) {
}
for (var i = 0; i < defaultListeners.length; i++) {
var p = defaultListeners[i];
p.setter.call(thisArg, p.value);
p.asGetPublicProperty('setter').call(thisArg, p.value);
}
}

0 comments on commit 38361db

Please sign in to comment.