Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(322)

Issue 11802003: Add API for access checks on observed objects (Closed)

Created:
7 years, 11 months ago by adamk
Modified:
7 years, 4 months ago
CC:
v8-dev, rafaelw, arv (Not doing code reviews)
Visibility:
Public.

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.

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+154 lines, -5 lines) Patch
M include/v8.h View 2 chunks +18 lines, -0 lines 0 comments Download
M src/api.cc View 3 chunks +14 lines, -0 lines 0 comments Download
M src/isolate.h View 1 chunk +1 line, -0 lines 0 comments Download
M src/isolate.cc View 4 chunks +39 lines, -4 lines 0 comments Download
M src/messages.js View 1 chunk +1 line, -0 lines 0 comments Download
M src/object-observe.js View 1 chunk +4 lines, -0 lines 0 comments Download
M src/objects.h View 2 chunks +4 lines, -1 line 0 comments Download
M src/objects-debug.cc View 1 chunk +1 line, -0 lines 0 comments Download
M src/objects-inl.h View 1 chunk +1 line, -0 lines 0 comments Download
M src/objects-printer.cc View 1 chunk +2 lines, -0 lines 0 comments Download
M src/runtime.h View 1 chunk +1 line, -0 lines 0 comments Download
M src/runtime.cc View 1 chunk +17 lines, -0 lines 0 comments Download
M test/cctest/test-object-observe.cc View 2 chunks +51 lines, -0 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
adamk
Note that this is my first attempt to add anything to the V8 API, and ...
7 years, 11 months ago (2013-01-07 23:19:16 UTC) #1
rossberg
Hm, I'm not sure you can circumvent the filtering you describe as an "alternative approach". ...
7 years, 11 months ago (2013-01-17 17:49:13 UTC) #2
adamk
On 2013/01/17 17:49:13, rossberg wrote: > Hm, I'm not sure you can circumvent the filtering ...
7 years, 11 months ago (2013-01-24 00:02:34 UTC) #3
rossberg
On 2013/01/24 00:02:34, adamk wrote: > On 2013/01/17 17:49:13, rossberg wrote: > > Hm, I'm ...
7 years, 10 months ago (2013-01-28 13:38:29 UTC) #4
adamk
7 years, 4 months ago (2013-08-15 17:39:54 UTC) #5
This has been superseded by https://codereview.chromium.org/22962009/ (which
includes no API changes).

Powered by Google App Engine
This is Rietveld 408576698