Opened 11 years ago

Closed 11 years ago

#8797 closed defect (fixed)

Base _loader needless code

Reported by: dante Owned by: James Burke
Priority: high Milestone: 1.3
Component: Core Version: 1.3.0b2
Keywords: Cc:
Blocked By: Blocking:

Description

The _fakeLoader call currently passes a fake 'type:"load"' object to _loadInit. This is unnecessary as _loadInit defaults to "load" if no event was passed.

saves 15 bytes or so.

patch attached.

Attachments (1)

loader.diff (863 bytes) - added by dante 11 years ago.
patch, been in local trunk for months now - forgot to file ticket earlier.

Download all attachments as: .zip

Change History (5)

Changed 11 years ago by dante

Attachment: loader.diff added

patch, been in local trunk for months now - forgot to file ticket earlier.

comment:1 Changed 11 years ago by dante

Component: GeneralCore

I did not check to see if:

dojo._fakeLoadInit = dojo._loadInit

would work. I assumed _fadeLoadInit was bound to some actual event, and in doing the above we would be passing a different event than expected to the real _loadInit. Either way _loadInit is setup to handle the null event case.

comment:2 Changed 11 years ago by James Burke

Milestone: tbd1.3

We can get rid of _fakeLoadInit altogether. It is called in util/buildscripts/jslib/dojoGuardEnd.jsfrag. I think I originally had more going on in the fakeInit, and also wanted to call dojo._loadInit with dojo as the "this" object. Although looks like dojo._init internals do not assume, and all the other callers of dojo._loadInit do not perserve dojo as "this". Just useless code. I will remove it now.

comment:3 Changed 11 years ago by James Burke

(In [16914]) Refs #8797. Getting rid of useless code regarding _fakeLoadInit.

comment:4 Changed 11 years ago by James Burke

Resolution: fixed
Status: newclosed

(In [16915]) Fixes #8797, useless code.

Note: See TracTickets for help on using tickets.