Closed
Bug 1110835
Opened 10 years ago
Closed 10 years ago
Cleanup nsSecureBrowserUIImpl
Categories
(Core Graveyard :: Security: UI, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
mozilla37
People
(Reporter: evilpies, Assigned: evilpies)
References
Details
Attachments
(2 files)
6.73 KB,
patch
|
Details | Diff | Splinter Review | |
11.72 KB,
patch
|
keeler
:
review+
|
Details | Diff | Splinter Review |
No description provided.
Most of this stuff still doesn't really make sense. We actually compute parts of the security state inside MapInternalToExternalState! Having this split between internal and external isn't helping at all from my point of view.
Do we have to use ReentrantMonitorAutoEnter, because nsSecureBrowserUIImpl is used from multiple threads?
Attachment #8535672 -
Flags: review?(dkeeler)
![]() |
||
Comment 3•10 years ago
|
||
Comment on attachment 8535668 [details] [diff] [review]
v1 - Cleanup form submission checks
Review of attachment 8535668 [details] [diff] [review]:
-----------------------------------------------------------------
I'm actually aiming to get rid of this code in bug 832837, so we can probably punt on cleaning this up for now.
Attachment #8535668 -
Flags: review?(dkeeler)
![]() |
||
Comment 4•10 years ago
|
||
Comment on attachment 8535672 [details] [diff] [review]
v1 - Cleanup UpdateSecurity etc.
Review of attachment 8535672 [details] [diff] [review]:
-----------------------------------------------------------------
Looks good. r=me with nits addressed.
::: security/manager/boot/src/nsSecureBrowserUIImpl.cpp
@@ +1269,5 @@
> temp_NewToplevelSecurityStateKnown = mNewToplevelSecurityStateKnown;
> }
>
> if (temp_NewToplevelSecurityStateKnown)
> + UpdateSecurityState(aRequest, false, false);
nit: let's add {} around this conditional body
@@ +1288,5 @@
> NS_QueryNotificationCallbacks(channel, sink);
> }
>
> +void
> +nsSecureBrowserUIImpl::UpdateSecurityState(nsIRequest* aRequest, bool withNewLocation,
nit: keep lines <80 chars, please
@@ +1327,4 @@
> mNotifiedToplevelIsEV = mNewToplevelIsEV;
> }
>
> + if (flagsChanged || withNewLocation || withUpdateStatus)
nit: braces around conditional body
@@ +1339,2 @@
> {
> ReentrantMonitorAutoEnter lock(mReentrantMonitor);
As we discussed, the lock isn't necessary, but feel free to address that in a follow-up bug (when we remove the lock, we should assert we're on the main thread in all public functions).
@@ +1346,3 @@
> PR_LOG(gSecureDocLog, PR_LOG_DEBUG,
> ("SecureUI:%p: UpdateSecurityState: calling OnSecurityChange\n", this
> ));
nit: might as well move these stray '));' to the previous line (keeping to <80 chars, though)
@@ +1346,5 @@
> PR_LOG(gSecureDocLog, PR_LOG_DEBUG,
> ("SecureUI:%p: UpdateSecurityState: calling OnSecurityChange\n", this
> ));
>
> + toplevelEventSink->OnSecurityChange(aRequest, newState);
Should 'newState' be 'state' here?
@@ +1352,3 @@
> PR_LOG(gSecureDocLog, PR_LOG_DEBUG,
> ("SecureUI:%p: UpdateSecurityState: NO mToplevelEventSink!\n", this
> ));
nit: same as with previous '));'
@@ +1446,5 @@
> temp_NewToplevelSecurityStateKnown = mNewToplevelSecurityStateKnown;
> }
>
> if (temp_NewToplevelSecurityStateKnown)
> + UpdateSecurityState(aRequest, true, false);
nit: braces around conditional body
Attachment #8535672 -
Flags: review?(dkeeler) → review+
Comment 6•10 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla37
Updated•8 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•