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

Issue 77453002: IDL compiler: [CheckSecurity=Frame] interface + [DoNotCheckSecurity] members (Closed)

Created:
7 years, 1 month ago by Nils Barth (inactive)
Modified:
7 years, 1 month ago
Reviewers:
haraken
CC:
blink-reviews, kojih, arv+blink, jsbell+bindings_chromium.org, abarth-chromium, marja+watch_chromium.org, adamk+blink_chromium.org, Nate Chapin, watchdog-blink-watchlist_google.com, Inactive, kouhei (in TOK)
Visibility:
Public.

Description

IDL compiler: [CheckSecurity=Frame] interface + [DoNotCheckSecurity] members This finishes [CheckSecurity=Frame] interface support. This also refactors tests, moving [DoNotCheckSecurity] members into the separate [CheckSecurity] test, as [DoNotCheckSecurity] on a member is meaningless w/o [CheckSecurity] on the interface. It also adds other tests for various combinations of extended attributes that do appear in actual IDL files (Location.idl and Window.idl). Also removes a gratuitous comment that lists all the extended attributes. I've kept this simple; there are various special cases that are not necessary in general, but may need support in Location.idl and Window.idl, which I'll need to check individually anyway. Followup to: IDL compiler: [CheckSecurity=Frame] interfaces (initial) https://codereview.chromium.org/61523003/ BUG=239771 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=162510

Patch Set 1 #

Patch Set 2 : Other extended attribute combinations #

Total comments: 18

Patch Set 3 : Add FIXME #

Patch Set 4 : More FIXMEs #

Patch Set 5 : Synced to fixes #

Total comments: 17

Patch Set 6 : Revised #

Unified diffs Side-by-side diffs Delta from patch set Stats (+370 lines, -183 lines) Patch
M Source/bindings/scripts/code_generator_v8.pm View 1 2 3 4 5 2 chunks +2 lines, -6 lines 0 comments Download
M Source/bindings/scripts/unstable/v8_attributes.py View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/scripts/unstable/v8_interface.py View 1 2 3 4 5 1 chunk +3 lines, -0 lines 0 comments Download
M Source/bindings/scripts/unstable/v8_methods.py View 2 chunks +4 lines, -2 lines 0 comments Download
M Source/bindings/templates/interface.cpp View 1 2 3 4 5 6 chunks +75 lines, -13 lines 0 comments Download
M Source/bindings/templates/interface_base.cpp View 1 2 3 4 5 2 chunks +5 lines, -1 line 0 comments Download
M Source/bindings/templates/methods.cpp View 1 2 3 4 5 1 chunk +45 lines, -0 lines 0 comments Download
M Source/bindings/tests/idls/TestCheckSecurityInterface.idl View 1 2 3 4 1 chunk +10 lines, -4 lines 0 comments Download
M Source/bindings/tests/idls/TestObjectPython.idl View 1 2 3 4 5 1 chunk +0 lines, -4 lines 0 comments Download
M Source/bindings/tests/results/V8TestCheckSecurityInterface.cpp View 1 2 3 4 5 9 chunks +225 lines, -82 lines 0 comments Download
M Source/bindings/tests/results/V8TestObjectPython.cpp View 1 2 3 4 5 2 chunks +0 lines, -70 lines 0 comments Download

Messages

Total messages: 16 (0 generated)
Nils Barth (inactive)
CL 2/2 for [CheckSecurity=Frame]. https://codereview.chromium.org/77453002/diff/30001/Source/bindings/templates/interface.cpp File Source/bindings/templates/interface.cpp (right): https://codereview.chromium.org/77453002/diff/30001/Source/bindings/templates/interface.cpp#newcode289 Source/bindings/templates/interface.cpp:289: ' | '.join(method.property_attributes or ['v8::DontDelete']) ...
7 years, 1 month ago (2013-11-20 03:39:30 UTC) #1
haraken
https://codereview.chromium.org/77453002/diff/30001/Source/bindings/templates/interface.cpp File Source/bindings/templates/interface.cpp (right): https://codereview.chromium.org/77453002/diff/30001/Source/bindings/templates/interface.cpp#newcode101 Source/bindings/templates/interface.cpp:101: {% block domain_safe_method_setter %} domain_safe_method_setter => attribute_setter_with_security_check https://codereview.chromium.org/77453002/diff/30001/Source/bindings/templates/interface.cpp#newcode102 Source/bindings/templates/interface.cpp:102: ...
7 years, 1 month ago (2013-11-20 05:04:53 UTC) #2
Nils Barth (inactive)
Replies, added FIXMEs to requests. One Q: I'd rather add the SetterCallback in a followup, ...
7 years, 1 month ago (2013-11-20 06:11:03 UTC) #3
haraken
https://codereview.chromium.org/77453002/diff/30001/Source/bindings/templates/interface.cpp File Source/bindings/templates/interface.cpp (right): https://codereview.chromium.org/77453002/diff/30001/Source/bindings/templates/interface.cpp#newcode280 Source/bindings/templates/interface.cpp:280: underlying value, but instead return a new copy of ...
7 years, 1 month ago (2013-11-20 06:35:57 UTC) #4
Nils Barth (inactive)
Replies, CL refs. https://codereview.chromium.org/77453002/diff/30001/Source/bindings/templates/interface.cpp File Source/bindings/templates/interface.cpp (right): https://codereview.chromium.org/77453002/diff/30001/Source/bindings/templates/interface.cpp#newcode280 Source/bindings/templates/interface.cpp:280: underlying value, but instead return a ...
7 years, 1 month ago (2013-11-20 07:10:49 UTC) #5
haraken
>> - We can rename [DoNotCheckSecurity] to [DoNotCheckSecurityInSameDomain] > How about: [DoNotCheckSecurity] => [DoNotCheckSecurity=Domain] ? ...
7 years, 1 month ago (2013-11-20 07:47:27 UTC) #6
Nils Barth (inactive)
On 2013/11/20 07:47:27, haraken wrote: > First of all, I'm confused about having [DoNotCheckSecurity=Getter|Setter]. > ...
7 years, 1 month ago (2013-11-20 08:09:16 UTC) #7
Nils Barth (inactive)
Now that prep CLs are done, updated to include fixes/renames. How does it look?
7 years, 1 month ago (2013-11-21 01:38:29 UTC) #8
Nils Barth (inactive)
On 2013/11/21 01:38:29, Nils Barth wrote: > Now that prep CLs are done, updated to ...
7 years, 1 month ago (2013-11-21 09:27:22 UTC) #9
haraken
On 2013/11/21 09:27:22, Nils Barth wrote: > On 2013/11/21 01:38:29, Nils Barth wrote: > > ...
7 years, 1 month ago (2013-11-21 09:35:39 UTC) #10
haraken
LGTM https://codereview.chromium.org/77453002/diff/170001/Source/bindings/scripts/unstable/v8_interface.py File Source/bindings/scripts/unstable/v8_interface.py (right): https://codereview.chromium.org/77453002/diff/170001/Source/bindings/scripts/unstable/v8_interface.py#newcode112 Source/bindings/scripts/unstable/v8_interface.py:112: 'has_domain_safe_method_setter': any( has_domain_safe_method_setter => has_origin_safe_method_setter https://codereview.chromium.org/77453002/diff/170001/Source/bindings/templates/interface.cpp File Source/bindings/templates/interface.cpp ...
7 years, 1 month ago (2013-11-21 10:13:05 UTC) #11
Nils Barth (inactive)
Revised, landing. 2 questions: 1. Should I add local |isolate| variables? 2. Naming question: Should ...
7 years, 1 month ago (2013-11-22 03:17:52 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/nbarth@chromium.org/77453002/260001
7 years, 1 month ago (2013-11-22 03:18:21 UTC) #13
commit-bot: I haz the power
Change committed as 162510
7 years, 1 month ago (2013-11-22 04:20:49 UTC) #14
haraken
https://codereview.chromium.org/77453002/diff/170001/Source/bindings/templates/interface.cpp File Source/bindings/templates/interface.cpp (right): https://codereview.chromium.org/77453002/diff/170001/Source/bindings/templates/interface.cpp#newcode109 Source/bindings/templates/interface.cpp:109: ExceptionState exceptionState(info.Holder(), info.GetIsolate()); On 2013/11/22 03:17:52, Nils Barth wrote: ...
7 years, 1 month ago (2013-11-22 05:53:25 UTC) #15
Nils Barth (inactive)
7 years, 1 month ago (2013-11-22 06:04:05 UTC) #16
Message was sent while issue was closed.
Thanks for replies, will do in followups!

https://codereview.chromium.org/77453002/diff/170001/Source/bindings/template...
File Source/bindings/templates/interface.cpp (right):

https://codereview.chromium.org/77453002/diff/170001/Source/bindings/template...
Source/bindings/templates/interface.cpp:109: ExceptionState
exceptionState(info.Holder(), info.GetIsolate());
On 2013/11/22 05:53:26, haraken wrote:
> On 2013/11/22 03:17:52, Nils Barth wrote:
> > Can I just add:
> > v8::Isolate isolate = info.GetIsolate();
> > ...and use |isolate|?
> > (Is so, I'll do in followup.)
> 
> Yes. We're doing it in a lot of places.

Got it; will throughout in one followup.

https://codereview.chromium.org/77453002/diff/170001/Source/bindings/template...
Source/bindings/templates/interface.cpp:290: {% set callback_name =
'%sV8Internal::%sOriginSafeMethodGetterCallback%s' %
On 2013/11/22 05:53:26, haraken wrote:
> On 2013/11/22 03:17:52, Nils Barth wrote:
> > Should I remove _name (in a followup CL)?
> 
> Either is fine with me as long as it's consistent through the compiler :)

Got it; will do in followup.

Powered by Google App Engine
This is Rietveld 408576698