|
Eval Limitations in IE7: msg#00226java.dwr.user
DWR uses a lot of evals to de-serialize data into _javascript_ data structures. After experiencing several odd errors in IE7 with DWR and large sets of data, I started to do some digging. It seems that IE7 limits the number of variables that can be assigned in a single eval to 327687 (the max value of a signed short). If you cross that threshold, it gives you a generic 'Syntax Error' message. The following code demonstrates the problem: function StringBuffer() { this.buffer = []; } StringBuffer.prototype.append = function(string) { this.buffer.push(string); return this; } StringBuffer.prototype.toString = function() { return this.buffer.join(""); } var max = 32768; testEval(); function testEval() { var sb = new StringBuffer(); for (var i=0; i < max; i++) { sb.append("s" + i + " = 'foo';"); } eval(sb.toString()); } I've opened a support case with MS but I don't have high hopes of them changing the behavior (I'm assuming that it's intentional). The most I'm hoping for is a little better error message. With that said, is there any hope of seeing DWR less reliant on large evals in the future?
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | RE: Java side Util.setValue problem after upgrading to DWR 2.0 RC1, Nemanja Kostic |
|---|---|
| Next by Date: | Re: Eval Limitations in IE7, David Marginian |
| Previous by Thread: | RE: Java side Util.setValue problem after upgrading to DWR 2.0 RC1, Nemanja Kostic |
| Next by Thread: | Re: Eval Limitations in IE7, David Marginian |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |