Skip to main content

Bug Tracker

Side navigation

#13966 closed bug (notabug)

Opened May 30, 2013 12:51PM UTC

Closed May 30, 2013 01:17PM UTC

Deferred done handler’s context has changed

Reported by: marlun78@hotmail.com Owned by:
Priority: undecided Milestone: None
Component: unfiled Version: 1.9.1
Keywords: Cc:
Blocked by: Blocking:
Description

The context (”this”) in the done handler has changed.

Example: http://jsfiddle.net/AL7B2/

The problem seem to be at line 1237 (in the Deferred function).

Code in 1.8:

// deferred[ resolve | reject | notify ] = list.fire
deferred[ tuple[0] ] = list.fire;

Code in 1.9+:

// deferred[ resolve | reject | notify ]
deferred[ tuple[0] ] = function() {
	deferred[ tuple[0] + "With" ]( this === deferred ? promise : this, arguments );
	return this;
};

I found this issue in 1.9.1, but it seem to be pressent in 1.10 and 1.0 too.

Attachments (0)
Change History (2)

Changed May 30, 2013 12:56PM UTC by marlun78@hotmail.com comment:1

I ment ... it seem to be pressent in 1.10 and 2.0 too.

Changed May 30, 2013 01:17PM UTC by dmethvin comment:2

resolution: → notabug
status: newclosed

See #11405. Custom data could be attached to the promise.