• adamk@chromium.org's avatar
    Add access check for observed objects · ebd4b61f
    adamk@chromium.org authored
    This change is mostly straightforward: for 'normal' sorts of change records,
    simply don't deliver a changeRecord to a given observer callback if an access
    the callback's Context is not allowed to "GET" or "HAS" changeRecord.name on
    changeRecord.object, or if ACCESS_KEYS is disallowed.
    
    For 'splice' records, the question of whether to hand it to an observer is trickier, since
    there are multiple properties involved, and multiple types of possible information leakage.
    Given that access-checked objects are very rare (only two in Blink, Window and Location),
    and that they are not normally used as Arrays, it seems better to simply not emit any splice
    records for such objects rather than spending lots of logic to attempt to avoid information
    leakage for something that may never happen.
    
    BUG=v8:2778
    R=rossberg@chromium.org
    
    Review URL: https://codereview.chromium.org/22962009
    
    git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16663 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
    ebd4b61f
object-observe.js 18.2 KB