Opened 8 years ago

Closed 8 years ago

Last modified 7 years ago

#17691 closed defect (fixed)

Cloning JsonRest crashes in IE8

Reported by: savola28 Owned by:
Priority: undecided Milestone: 1.11
Component: General Version: 1.8.3
Keywords: Cc:
Blocked By: Blocking:


When cloning JsonRest? object with lang.clone, constructor of the JsonRest? is called with undefined options.

Inside the constructor declare.safeMixin(this, options); is called.

This will crash in IE8 because inside safeMixin has("bug-for-in-skips-shadowed")-if-clause is ran and inside that clause target-parameter is referred without checking if it is undefined. In this case it is undefined because options was undefined.

Is the root of the problem in JsonRest? or in safeMixin?

This problem is mentioned also here:

There is also this ticket:

Change History (3)

comment:1 Changed 8 years ago by xMartin

I ran into the same problem by just doing new Pretty nasty to debug. Only happens in real IE8, not emulated. I think the thread in the mailing list makes a good point. declare.safeMixin should do the check if source is undefined or an object.

Using Dojo 1.9.2

The title should be changed. It's not about cloning.

comment:2 Changed 8 years ago by Kris Zyp

Milestone: tbd1.11
Resolution: fixed
Status: newclosed

Apparently the commit to fix this was truncated right before the number:

I am open to backporting this, since this is really about declare's inconsistent handling of safeMixin behavior across browsers.

comment:3 Changed 7 years ago by flet

Is it possible to get this fix in a patch release? We just got burned by attempting to update our Dojo version and forgetting to manually apply this patch.

Note: See TracTickets for help on using tickets.