Ticket #2532322 (accepted defect)

Reporter


Satyen Desai
Opened: 05/15/12
Last modified: 09/19/12
Status: accepted
Type: defect

Owner


Luke Smith
Target Release: BACKLOG
Priority: P3 (normal)
Summary: YUI().using the same module twice, results in an async 2nd use - maybe only when the module has conditional modules
Description:

Test case attached. If you change the YUI().use("node") to something like use("oop") for example, I believe the 2nd use is sync, maybe because oop doesn't have conditional modules.

[ NOTE: Hit this originally in the testMultipleInstances test in src/widget/tests/widget.html ]

Type: defect Observed in Version: development master
Component: Event Severity: S3 (normal)
Assigned To: Luke Smith Target Release: BACKLOG
Location: Library Code Priority: P3 (normal)
Tags: Relates To:
Browsers: N/A
URL:
Test Information:

Attachments

Attachment #1: Ydestroy.html (download)

Change History

Dav Glass

Posted: 05/15/12
  • milestone changed to 3.6.0
  • status changed from new to accepted

Dav Glass

Posted: 05/15/12
  • sprint changed to backlog

Dav Glass

Posted: 05/21/12
  • component changed from YUI Global Object to Event
  • owner changed from Dav Glass to Luke Smith
  • status changed from accepted to assigned

After debugging this, it appears that the domready event in IE is not cancelled when the instance is created. The callback is truly sync (console.log's added before, after and inside the callback show the proper order). After getting the error in IE, you can look at the local variables and see that the event that's being fired is "domready". Event needs to either know that it's destroyed and stop the async event, or it should already know globally that this event has already fired and not do the logic again.

I added a simple if to prevent the throwing of the error (if Y.config && Y.config.throwFail), but that doesn't fix the root issue.

Handing over to Luke to investigate a proper fix.

Dav Glass

Posted: 05/21/12

/instance is created/instance is destroyed/

Dav Glass

Posted: 05/21/12

Ref #2532322 - Temporarily fix the throw
View Commit: cd991bf83612e17818142b9c8e0231819706bab2

Luke Smith

YUI Contributor

Posted: 05/24/12
  • status changed from assigned to accepted

Luke Smith

YUI Contributor

Posted: 05/24/12

Satyen, if you have the time to look into this, please reassign the ticket. I'm buried in DT.

Jenny Donnelly

YUI Developer

Posted: 07/24/12
  • milestone changed from 3.6.0 to 3.NEXT

Moving from 3.6.0 backlog to 3.NEXT.

Jenny Donnelly

YUI Developer

Posted: 09/19/12
  • milestone changed from 3.NEXT to BACKLOG

Moving from 3.NEXT to BACKLOG.