Permalink
Browse files

Unwrap Synchronizer in BaseFunction.toSource().

  • Loading branch information...
1 parent 49648dc commit 430456ff2fb0edfa2b74c67248d44f8e4b48b923 @hns hns committed Nov 20, 2012
Showing with 3 additions and 0 deletions.
  1. +3 −0 src/org/mozilla/javascript/BaseFunction.java
@@ -293,6 +293,9 @@ public Object execIdCall(IdFunctionObject f, Context cx, Scriptable scope,
private BaseFunction realFunction(Scriptable thisObj, IdFunctionObject f)
{
Object x = thisObj.getDefaultValue(ScriptRuntime.FunctionClass);
+ if (x instanceof Delegator) {
+ x = ((Delegator)x).getDelegee();
+ }
if (x instanceof BaseFunction) {
return (BaseFunction)x;
}

0 comments on commit 430456f

Please sign in to comment.