|
|
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.
|
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
|
Total messages: 5 (0 generated)
|