Thomas Broyer has posted comments on this change.

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


Patch Set 2:

(1 comment)

As Colin said, this change is not backwards-compatible when transmitting large payloads (which will use array .concat()). Could this be handled dynamically? (look for ").concat(" in the payload and use eval() in this case –could lead to some false positives but that should be rare enough, and relatively harmless–, otherwise use JSON.parse if available or eval() otherwise). As a side note, JsonUtils.safeEval has some overhead in the non-JSON.parse case compared to the bare eval() done in ClientSerializationStreamReader, and even JsonUtils.unsafeEval has a small overhead.

I also wonder if changing the serialization of Infinity and NaN isn't enough to necessitate a bump of protocol version.

If it were just me, I'd drop IE6/7 support as soon as the next version (and IE8 by fall next year, or no later than in 2 years from now), then we could simply remove the .concat() workaround and switch everyone to JSON.parse (and bumping the protocol version to 8). I'd be happy to discuss that again on gwt-steering.

....................................................
File user/super/com/google/gwt/user/translatable/com/google/gwt/user/client/rpc/impl/ClientSerializationStreamReader.java Line 83: return new Number(th...@com.google.gwt.user.client.rpc.impl.ClientSerializationStreamReader::results[--th...@com.google.gwt.user.client.rpc.impl.ClientSerializationStreamReader::index]); Not 'new Number(x)' (which will return a Number *object*), rather just 'Number(x)' (which will return a Number *value*)


--
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: 2
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: John Ahlroos <j...@vaadin.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