This project is archived and is in readonly mode.

#609 ✓resolved
Heston Liebowitz

Safari 4 deprecated arguments.callee.caller

Reported by Heston Liebowitz | February 27th, 2009 @ 05:59 PM | in 2.0 (closed)

Arguments.callee.caller has been deprecated in Safari 4. This breaks Class.Mutators.Extends with the following error: "TypeError: Result of expression 'arguments.callee.caller' [null] is not an object."

This occurs in the following function:


self.parent = function(){
  		return arguments.callee.caller._parent_.apply(this, arguments);
TypeError: Result of expression 'arguments.callee.caller' [null] is not an object.
  	};

Comments and changes to this ticket

  • Garrick Cheung

    Garrick Cheung March 1st, 2009 @ 06:06 AM

    For a fix like this, it seems that all the functions would have to be slightly modified/corrected if they are doing arguments.callee.caller.

    Modified like:

    self.parent = function(){

    return self.parent.caller._parent_.apply(this,arguments);
    
    

    }

  • Garrick Cheung

    Garrick Cheung March 1st, 2009 @ 06:08 AM

    Oops, I forgot the js formatting:

    
    self.parent = function(){
        return self.parent.caller._parent_.apply(this,arguments);
    }
    
  • Brad Kellett

    Brad Kellett March 2nd, 2009 @ 11:23 PM

    Modifying like you posted doesn't seem to help, it still returns with the same error (null or not an object).

    Any other ideas as to something that could fix this up? We're looking to patch our current MooTools version.

  • Aaron Newton

    Aaron Newton March 17th, 2009 @ 08:46 PM

    There's a simple work around you can implement until this gets a real fix:

    line #65:

    
    var caller = arguments.callee.caller && !Browser.Features.air; // caller support is broken in air 1.5
    

    Change to

    
    var caller = arguments.callee.caller && !Browser.Features.air && !Browser.Engine.webkit; // caller support is broken in air 1.5
    
  • Heston Liebowitz

    Heston Liebowitz April 6th, 2009 @ 11:08 PM

    I'm not sure what anutron's workaround is getting at. I don't see that code anywhere.

    Also, this same function dies in Opera 9.64. I'm not sure if it worked in earlier versions.

    Are there any plans to correct this? As more Mac users are installing Safari 4, it's becoming more and more of a problem.

  • Valerio

    Valerio April 7th, 2009 @ 01:25 AM

    The bug is fixed in master, will be available when MooTools 1.2.2 is released. You can test the code by downloading the branch master on github.

  • jan (at misker)

    jan (at misker) May 19th, 2009 @ 03:47 PM

    I think that this bug is still not solved in MooTools 1.2.2, I run into problems with a Request.JSON with link:'chain'. The request is sent, but the onSuccess is never called. In the Safari 4 debugger I can see that this.caller = undefined.

  • jan (at misker)

    jan (at misker) May 19th, 2009 @ 03:58 PM

    Sorry, seems that this.caller does get set, but still the onSuccess is not called... I will do some more digging.

  • Valerio

    Valerio June 14th, 2009 @ 03:01 AM

    • State changed from “new” to “resolved”

    This is fixed in 1.2.2.

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

Shared Ticket Bins

Pages