Bob, Changes look really good.
Some review notes: This code will terminate early if you have two anonymous functions in your call stack (possible for some DOM stack traces), since both will have name == "anonymous": + // Avoid infinite loop: caller is not an activation record + if (seen['_' + name]) { + break; + } else { + seen['_' + name] = 1; + callee = callee.caller; + } Re: the JSON string escaping function. I filed a bug a while back where unicode line separators would trip up RPC because they weren't being escaped: http://code.google.com/p/google-web-toolkit/issues/detail?id=2270&q=json According to my tests, Firefox 3, Opera 9 and Safari 3 all require \u2028 and \u2029 to be escaped. I haven't tested with IE for a while, but it may have additional characters that require escaping on top of those. Here's my test script: <script> for (i = 0x0; i <= 0xffff; i++) { try { if (eval("\"" + String.fromCharCode(i) + "\"") != String.fromCharCode(i)) document.write(i.toString(16) + ": not equal!<br>"); } catch (e) { document.write(i.toString(16) + ": "+ e + "<br>"); } } </script> On 17-Feb-09, at 3:02 AM, BobV wrote: > > I've created a branch to track future changes to this patch. > > svn merge -r4761:HEAD > http://google-web-toolkit.googlecode.com/svn/changes/bobv/web_mode_stack_traces_r4761 > > > Changes from previous patch: > - Added web-mode stack-trace inference for JavaScriptExceptions with > additional methods in StackTraceCreator.Collector. This only works > for Mozilla and Opera. Other browsers will return zero-length arrays > for JavaScriptException.getStackTrace(). > - Fixed extractName() to be more robust. > - Fixed loop condition in Collector.collect() and added a > Mozilla/Opera variant to use stack inference to improve accuracy. > - The symbol map no longer attempts to de-staticify static methods. > This caused a map collision when a polymorphic-dispatch version of a > methods exists alongside a static-dispatch version. > > -- > Bob Vawter > Google Web Toolkit Team > > > --~--~---------~--~----~------------~-------~--~----~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~----------~----~----~----~------~----~------~--~---