FLUID-4399: Corruption of options material caused by non-recognition of "Array" type after passage through iframe boundary

Metadata

Source
FLUID-4399
Type
Bug
Priority
Blocker
Status
Closed
Resolution
Fixed
Assignee
Antranig Basman
Reporter
Antranig Basman
Created
2011-08-12T02:36:07.752-0400
Updated
2011-08-25T14:49:04.582-0400
Versions
  1. 1.3.1
Fixed Versions
  1. 1.4
Component
  1. Framework

Description

Through accident, one remaining call to "instanceof" remains in the core framework - as part of options merging, the following test is made to determine the type of a fresh container constructed whilst copying options:

(Fluid.js line 1186)
target[name] = thisTarget = thisSource instanceof Array ? [] : {};

If the options material has arrived from a different iframe, the "Array" prototype type will be unrecognisable, leading to incorrect selection of {} as the new base type. This corrupts options during this process (first observed in UIOptions through corruption of an "args" entry for a boiled event). This should be replaced by standard framework primitive fluid.freshContainer which is used elsewhere in the file.

Comments