Mark S. Miller (2013-11-12T18:00:43.000Z)
See getCWStack() at <
https://code.google.com/p/google-caja/source/browse/trunk/src/com/google/caja/ses/debug.js#128
>.

Of course, we should choose a better name than getCWStack.

On the string form, see getStack() at <
https://code.google.com/p/google-caja/source/browse/trunk/src/com/google/caja/ses/debug.js#221
>.

These avoid the information leakage problem of err.stack, since the
getStack and getCWStack functions can be denied to untrusted guests, and
can only reveal the stacks of errors from their own realm. As with
makeWeakRef, we could also provide a combiner to combine multiple getStack
functions into one that could unseal the errors from any of the originating
realms.




On Tue, Nov 12, 2013 at 9:23 AM, Erik Arvidsson <erik.arvidsson at gmail.com>wrote:

> When I started investigating this I had the hope that stack could be
> standardized. However, the format of the string is cannot be changed
> without breaking the web so the way forward is to introduce a new property
> name. But since we are introducing a new property name we should return
> structured data instead of a plain old string.
>
> I haven't had the time to work on this since my initial analysis of the
> state of the stack property.
>
>
> On Mon, Nov 11, 2013 at 7:51 PM, John Barton <johnjbarton at google.com>wrote:
>
>> Note that in Chrome the devtools are remote and error.stack is a getter
>> which issues a remote method call to the backend.  Only when the stack
>> property is accessed will the internal representation be converted to a
>> string. Anything else is too expensive.
>>
>> A plain JS object format would be much more useful for development tools
>> developers.
>>
>> jjb
>>
>> _______________________________________________
>> es-discuss mailing list
>> es-discuss at mozilla.org
>> https://mail.mozilla.org/listinfo/es-discuss
>>
>>
>
>
> --
> erik
>
> _______________________________________________
> es-discuss mailing list
> es-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss
>
>


-- 
    Cheers,
    --MarkM
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20131112/14b876d5/attachment.html>
domenic at domenicdenicola.com (2013-11-13T17:21:53.355Z)
See [getCWStack()](https://code.google.com/p/google-caja/source/browse/trunk/src/com/google/caja/ses/debug.js#128).

Of course, we should choose a better name than getCWStack.

On the string form, see [getStack()](https://code.google.com/p/google-caja/source/browse/trunk/src/com/google/caja/ses/debug.js#221).

These avoid the information leakage problem of err.stack, since the
getStack and getCWStack functions can be denied to untrusted guests, and
can only reveal the stacks of errors from their own realm. As with
makeWeakRef, we could also provide a combiner to combine multiple getStack
functions into one that could unseal the errors from any of the originating
realms.