Closed
Bug 1339213
Opened 9 years ago
Closed 9 years ago
Inline IsRestrictOpenerAccessForFPI
Categories
(Core :: DOM: Security, defect, P2)
Tracking
()
RESOLVED
FIXED
mozilla54
| Tracking | Status | |
|---|---|---|
| firefox54 | --- | fixed |
People
(Reporter: smaug, Assigned: smaug)
References
Details
(Whiteboard: [domsecurity-active])
Attachments
(2 files)
|
4.90 KB,
patch
|
timhuang
:
review+
|
Details | Diff | Splinter Review |
|
4.91 KB,
patch
|
Details | Diff | Splinter Review |
IsRestrictOpenerAccessForFPI is called in very hot code paths so better to inline it.
Patch coming.
| Assignee | ||
Updated•9 years ago
|
Assignee: nobody → bugs
| Assignee | ||
Comment 1•9 years ago
|
||
privacy.firstparty.isolate.restrict_opener_access part is untested since we don't seem to have tests for it.
Attachment #8836884 -
Flags: review?(tihuang)
Comment 2•9 years ago
|
||
Comment on attachment 8836884 [details] [diff] [review]
v1
Review of attachment 8836884 [details] [diff] [review]:
-----------------------------------------------------------------
::: caps/BasePrincipal.h
@@ +100,5 @@
> // flags. Once all other flags are removed, this can be removed too.
> void SyncAttributesWithPrivateBrowsing(bool aInPrivateBrowsing);
>
> // check if "privacy.firstparty.isolate" is enabled.
> + static bool IsFirstPartyEnabled()
I believe that the compiler will optimize for us to make this an inline function. However, I think we should use 'static inline' here to tell the compiler explicitly.
@@ +108,5 @@
>
> // check if the access of window.opener across different FPDs is restricted.
> // We only restrict the access of window.opener when first party isolation
> // is enabled and "privacy.firstparty.isolate.restrict_opener_access" is on.
> + static bool IsRestrictOpenerAccessForFPI()
ditto
Attachment #8836884 -
Flags: review?(tihuang) → review+
Comment 3•9 years ago
|
||
Bug 1339336 has been filed for the test case. Thanks for bringing this up, smaug.
| Assignee | ||
Comment 4•9 years ago
|
||
I guess inline does kind of self document the performance sensitiveness, I could add them.
Usually we don't use them with this kind of small methods, but just expect compiler to inline.
| Assignee | ||
Comment 5•9 years ago
|
||
Pushed by opettay@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/29784b27d405
Inline IsRestrictOpenerAccessForFPI, r=tihuang
Updated•9 years ago
|
Priority: -- → P2
Whiteboard: [domsecurity-active]
Updated•9 years ago
|
Status: NEW → ASSIGNED
Comment 7•9 years ago
|
||
| bugherder | ||
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
status-firefox54:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla54
You need to log in
before you can comment on or make changes to this bug.
Description
•