Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#9178 closed defect (fixed)

dojox.json.query, expand is not defined

Reported by: gabehamilton Owned by: Kris Zyp
Priority: high Milestone: 1.4
Component: Dojox Version: 1.3.0
Keywords: Cc:
Blocked By: Blocking:


When using the ".." expression with dojox.json.query, I get an 'expand is not defined' error message with dojo 1.3.0 compressed.

This works in 1.2.3 and with the 1.3.0 src, but breaks with 1.3.0 locally or off of either CDN.

My guess is that the expand function was somehow deleted from query.js before ShrinkSafe? or by ShrinkSafe?.

Error message from Firefox 3.0.8, Firebug 1.3.3

expand is not defined
Line 1

The attached file demonstrates the error using console.log. Running the dojox.json.query unit tests with the CDN distribution should also demonstrate the issue, although I have not tried that.

Attachments (1)

dojox-json-query-bug.html (440 bytes) - added by gabehamilton 13 years ago.
Demonstrates expand is not defined error

Download all attachments as: .zip

Change History (7)

Changed 13 years ago by gabehamilton

Attachment: dojox-json-query-bug.html added

Demonstrates expand is not defined error

comment:1 Changed 13 years ago by Adam Peller

Component: GeneralDojox
Owner: changed from anonymous to Kris Zyp

comment:2 Changed 13 years ago by Adam Peller

confirmed on 1.3.2

comment:3 Changed 13 years ago by Adam Peller

oh, it's not just a CDN thing. Sorry, I misread. It should happen in trunk also.

Ok, so "expand" is a local function that gets 'compressed' by shrinksafe, so when the function is referenced from a string in eval, it's not found. Easiest way out of this, I think, is to make an anonymous hash out of those function definitions then mix them in to the scope chain somehow. Shrinksafe doesn't mess with property names.

comment:4 Changed 13 years ago by Adam Peller

Summary: 1.3.0 dojox.json.query, expand is not defineddojox.json.query, expand is not defined

comment:5 Changed 13 years ago by Kris Zyp

Resolution: fixed
Status: newclosed

(In [20839]) Fixes querying to avoid shrinksafe corruption, fixes #9178

comment:6 Changed 13 years ago by Kris Zyp

Milestone: tbd1.4
Note: See TracTickets for help on using tickets.