Colin Alworth has posted comments on this change.

Change subject: Use JSON.parse() instead of eval() to deserialize rpc callback payload
......................................................................


Patch Set 1:

(1 comment)

The ServerSerializationStreamWriter will also need modifications, two that I can think of: * writeLong currently is using " instead of ', which isn't valid in JSON. This should be failing in the unit tests, as long as testing something that uses parse instead of eval. * very large payloads will now break when the array concatenating code kicks in, writing ].concat([ to join arrays that are otherwise too big for ie6/7 (and 8?). This isn't valid JSON, so this will break when the object graph reaches a certain size.

Can you make sure to run the unit tests remotely in each IE version to verify that you changes will behave? I believe there is a test for each direction of each primitive, but not a test for very large data sets.

....................................................
File user/src/com/google/gwt/user/client/rpc/impl/AbstractSerializationStreamWriter.java
Line 97:       append("0");
Infinity does actually work round trip in my quick testing in this way, as 1e1000 or the like is a) legal json and b) outside the range of double, so will end up as +Infinity on the JS side after parsing, or when wrapped up in Double.parseDouble. However, 0 being used as NaN won't fly, you're right. One idea is to emit null, then read out the null as a special case - in my testing this behaved well in all browsers.

Sending the strings "+Infinity", "NaN" could also work, but then you need parse those as strings, not as numbers after reading it as json, i think in my first try at this I decided that was more trouble than it was worth.

No need to use >= or <= for infinity checks, == should be sufficient.

writeFloat will also need similar treatment.


--
To view, visit https://gwt-review.googlesource.com/2900
To unsubscribe, visit https://gwt-review.googlesource.com/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I6062180397f5fabed1dd5f08140c2bd43a19fa9f
Gerrit-PatchSet: 1
Gerrit-Project: gwt
Gerrit-Branch: master
Gerrit-Owner: John Ahlroos <j...@vaadin.com>
Gerrit-Reviewer: Brian Slesinsky <skybr...@google.com>
Gerrit-Reviewer: Colin Alworth <niloc...@gmail.com>
Gerrit-Reviewer: Leeroy Jenkins <jenk...@gwtproject.org>
Gerrit-Reviewer: Thomas Broyer <t.bro...@gmail.com>
Gerrit-HasComments: Yes

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors
--- You received this message because you are subscribed to the Google Groups "GWT Contributors" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit-contributors+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to