Hi Mark,

Sorry for the delay, thank you for that response it was very useful.

Do you think it would make sense to open an API for Error stack that would
be purely based upon user agent implementation? I'm not familiar with the
internals of the traces but I have seen comments mentioning performance
issues of complete parity across browsers due to their implementation
differences.

It would however still be useful to standardise: lineNumber, columnNumber
and fileName.

Perhaps that would be a simpler first step?

Thanks
Jonathan

On Tue, Jan 12, 2016 at 6:32 AM Mark S. Miller <erig...@google.com> wrote:

> On Mon, Jan 11, 2016 at 10:05 PM, Mark S. Miller <erig...@google.com>
> wrote:
>
>> I am very interested. See the extended Causeway stack format in
>> https://github.com/google/caja/blob/master/src/com/google/caja/ses/debug.js
>>
>
> From that page, the JSON Schema-ish in an ad-hoc notation:
>
>
> stacktrace ::= {calls: [frame*]};
> frame ::= {name: functionName,
>            source: source,
>            span: [[startLine, startCol?], [endLine, endCol?]?]};
> functionName ::= STRING;
> startLine, startCol, endLine, endCol ::= INTEGER
> source ::= STRING | frame;
>
>
>
>
> and the logic for scraping this information from the various stacktraces
>> available on today's major platforms.
>>
>> The "extended" is about the multiple source position layers present when
>> an "eval" in one place evals a string that, at some position in the string,
>> does the call. Both FF and Chrome provide these nested positions, but
>> differently.
>>
>
>
> The nesting is represented as the recursion through "frame" in the above
> grammar.
>
>
>
>>
>> See the attachments for the information successfully scraped when
>> visiting <https://rawgit.com/tvcutsem/es-lab/master/src/ses/contract.html>
>> on each of the platforms, converted to Causeway extended stack trace
>> format, and then re-rendered in a common textual format. As you see, even
>> with all the work at canonicalizing this information, it still differs
>> substantially between platforms.
>>
>>
>>
>>
>> On Mon, Jan 11, 2016 at 7:10 PM, Jonathan Kingston <jonat...@jooped.co.uk
>> > wrote:
>>
>>> Hey all,
>>>
>>> Does anyone know if there is an active interest in revisiting the
>>> Error.stack strawman proposal?
>>>
>>> http://wiki.ecmascript.org/doku.php?id=strawman:error_stack
>>>
>>> I ask because CSP wanted an algorithm for getting the non standard
>>> properties defined in Error objects:
>>> https://w3c.github.io/webappsec-csp/#issue-f447ede5
>>>
>>> A simpler start may be possible in standardising just: lineNumber,
>>> columnNumber and fileName
>>>
>>> Kind regards
>>> Jonathan
>>>
>>
>
>
> --
>     Cheers,
>     --MarkM
>
_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to