Comment #5 on issue 4268 by [email protected]: getEvalOrigin already rendered in violation of spec
https://code.google.com/p/v8/issues/detail?id=4268

It is a desired property. By showing only the string, one has to parse the string *reliably* to recover the structured information. However, property names and soon the .name property of functions can be arbitrary strings. And source locations are either arbitrary strings or at least arbitrary URIs -- I'm not sure. If you present me with only the rendered string, then you need to carefully specify and adhere to escaping rules if one of these strings contains syntax that is also used in this rendering. (We've been through this nightmare over and over again on the web. Let's not repeat it where it isn't already entrenched.)

For example, the code at https://github.com/tvcutsem/es-lab/blob/master/src/ses/debug.js#L129 , which is used at https://github.com/tvcutsem/es-lab/blob/master/src/ses/debug.js#L348 to work around this bug, says:

     // [...] On all, we assume the
     // function name, if any, has no colon (":"), at-sign ("@"), or
     // open paren ("("), as each of these are used to recognize
     // other parts of a debug line.

There is no basis for this assumption, but there's currently no safe alternative. And I doubt that the conditions I enumerate above are sufficient anyway.

Even if you do come out with adequate escaping rules which you carefully specify, many will do what I do there: use regexps to recognize most cases, where these regexps can be misled by bizarre cases, including purposely constructed bizarre cases. The web has a long history of despair built on people using regexps to try to recognize structure in a text encoding of structure.


--
You received this message because this project is configured to send all issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to