Opened 10 years ago

Closed 10 years ago

#13360 closed defect (fixed)

setting icon to non-existing resource in iconitem will cause infinite loop in Chrome

Reported by: zhangyp Owned by: ykami
Priority: high Milestone: 1.7
Component: DojoX Mobile Version: 1.7.0b1
Keywords: 1.7-mobile Cc:
Blocked By: Blocking:

Description

If the icon attribute is set to non-existing resource in iconitem, it will trigger onError handler to set iconNode.src to its parent's default icon which is empty string "" in this test case. Chrome will treat this empty string as resource that can not be found and will start the infite loop of triggering onError.

We need to validate the this.getParent().defaultIcon before assign it to iconNode.src in this case to prevent the infinite loop.

Attachments (1)

Icontest.html (1.4 KB) - added by zhangyp 10 years ago.

Download all attachments as: .zip

Change History (4)

Changed 10 years ago by zhangyp

Attachment: Icontest.html added

comment:1 Changed 10 years ago by zhangyp

To reproduce the problem, put the attachment in dojox/mobile/tests. Set the breakpoint at onError of IconItem? and visit the test page.

comment:2 Changed 10 years ago by ykami

Keywords: 1.7-mobile added
Milestone: tbd1.7
Status: newassigned

comment:3 Changed 10 years ago by ykami

Resolution: fixed
Status: assignedclosed

(In [25703]) Fixes #13360 !strict Fixed the problem where onError() sets the parent icon even when it is empty.

Note: See TracTickets for help on using tickets.