Status: Started
Owner: erights
Labels: Type-Enhancement Priority-Medium Maintainability Client-CajaCapTP

New issue 1099 by erights: cajita.newTable(true) should become basis for  
trademarking and sealer-unsealer pairs
http://code.google.com/p/google-caja/issues/detail?id=1099

Even though cajita.newTable(true) makes a table that is not even a weak-key
table much less an EphemeronTable, the Trademarking pattern shown at
http://wiki.ecmascript.org/doku.php?id=strawman:weak_references#trademarking  
and
the Sealer / Unsealer pattern shown at
http://wiki.ecmascript.org/doku.php?id=strawman:weak_references#sealer_unsealer_pairs
should work fine as built on these tables.

The "true" parameter means "If you have to choose (as we do today) use the
key's lifetime rather the table's lifetime as the basis for the associated
value's lifetime. Concretely, this means that such tables are essentially
unique unmentionable property names, with the table's storage distributed
among the table's keys. The values are stored on the keys as the value of
this unmentionable property.

The only value hung off the key by the Trademarking pattern is "true", and
the only value hung off the box by the Sealer / Unsealer pattern is the
cargo "sealed within" this box. In both cases, the storage leak that
results from using cajita.newTable(true) is that these values stick around
as long as the trademarked object or box do, even if the trademark checker
or the unsealer, respectively, have already been dropped. This is exactly
as leaky as the current special case implementation of these services.

We should then use this trademarking service to trademark various records
made either by cajita.js itself or by various bits of code written in
Cajita. For example, the tables made by newTable() could themselves be
trademarked to indicate that they are such a table.

--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Caja Discuss" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/google-caja-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to