Reviewers: rossberg, abarth,

Message:
Note that this is my first attempt to add anything to the V8 API, and I realize it's something of an unfortunate change. Willing to consider other options as they're suggested, but the existing security callbacks just aren't sufficient to
ask the right question.

Description:
Add API for access checks on observed objects

When calling Object.observe on an object, if that object has access
checks enabled, call out to the embedder asking if observing the object
is allowed and throw if it is not.

In order to accomplish this, a new version of SetAccessCheckCallbacks()
has been added to the API, with the old version to be V8_DEPRECATED()
once Chromium/WebKit is updated to use the new API.

An alternate approach would have been to filter out objectionable
change records either when enqueueing or delivering them, but this
would have likely been much slower and would have required some gymnastics
to get the proper context info for the access check on the WebKit side.


Please review this at https://codereview.chromium.org/11802003/

SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge

Affected files:
  M include/v8.h
  M src/api.cc
  M src/isolate.h
  M src/isolate.cc
  M src/messages.js
  M src/object-observe.js
  M src/objects-debug.cc
  M src/objects-inl.h
  M src/objects-printer.cc
  M src/objects.h
  M src/runtime.h
  M src/runtime.cc
  M test/cctest/test-object-observe.cc


--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to