Matthew Dempsky has posted comments on this change.

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


Patch Set 3:

(2 comments)

....................................................
File user/src/com/google/gwt/core/client/JsonUtils.java
Line 129:   public static native boolean hasJsonParse() /*-{
com.google.gwt.json.client.JSONParser already uses JSNI to bypass the private, so there's precedent for this hack.


....................................................
File user/super/com/google/gwt/user/translatable/com/google/gwt/user/client/rpc/impl/ClientSerializationStreamReader.java Line 57: if(!JsonUtils.hasJsonParse() || encoded.contains("].concat([")){ Hm, actually if we don't care about IE6/IE7 anymore anyway, why are we even worrying about whether JsonUtils.safeEval() is fast on IE6/IE7? Can't we just do:

    try {
      results = JsonUtils.safeEval(encoded);
    } catch (IllegalArgumentException iae) {
// Input was invalid JSON; e.g., using ].concat([ or non-stringified NaN/Infinity.
      results = eval(encoded);
    }


--
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: 3
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: Matthew Dempsky <mdemp...@google.com>
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