VOOZH about

URL: https://phabricator.services.mozilla.com/D77885

⇱ ⚙ D77885 Bug 1623971 - P9: Assert mControls instead of mInitialized


Bug 1623971 - P9: Assert mControls instead of mInitialized
ClosedPublic

Authored by chunmin on Jun 2 2020, 7:12 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, May 26, 1:23 AM
Unknown Object (File)
May 17 2026, 11:41 PM
Unknown Object (File)
Apr 14 2026, 2:13 PM
Unknown Object (File)
Apr 10 2026, 10:27 AM
Unknown Object (File)
Apr 6 2026, 11:47 PM
Unknown Object (File)
Apr 4 2026, 4:11 AM
Unknown Object (File)
Apr 3 2026, 11:39 PM
Unknown Object (File)
Apr 2 2026, 7:46 PM
Subscribers

Details

Summary

By assert mConrols instread of mInitialized in SetControlAttributes, we
no longer need to call SetControlAttributes after setting mInitialized
to true. Also, this patch change the timing to set mInitialized to true
so we can call SetControlAttributes before RegisterEvent. By doing so,
we no longer need to call UnregisterEvents when SetControlAttributes
fails.

Diff Detail

Event Timeline

phab-bot changed the visibility from "Custom Policy" to "Public (No Login Required)".
phab-bot changed the edit policy from "Custom Policy" to "Restricted Project (Project)".
phab-bot removed a project: secure-revision.
Comment Actions

If you want to do so, you have to clear when fails to make sure that would only exist when initialization succeeded. But that would cause unnecessary reinitialization for and if we fail on line#208 or line#214.

Comment Actions

would become so it won't be called when fails. The functionality in can work properly once is initialized even fails. (BTW, button-click callback stuff works well without the virtual control interface)

I can leave in if the intention is to make sure can only be called when succeeds.

chunmin edited the summary of this revision. (Show Details)
This revision is now accepted and ready to land.Jun 10 2020, 1:15 AM
chunmin edited the summary of this revision. (Show Details)

Revision Contents

PathSize
widget/
windows/
15 lines
CommitParentsAuthorSummaryDate
3c572c417823Chun-Min Chang
Bug 1623971 - P9: Assert mControls instead of mInitialized r=alwu (Show More…)
StatusAuthorRevision
Closedchunmin
Closedchunmin
Closedchunmin
Closedchunmin
Closedchunmin
Closedchunmin
Closedchunmin
Closedchunmin
Closedchunmin
Closedchunmin
Closedchunmin
Closedchunmin
Closedchunmin
Closedchunmin
Closedchunmin
Closedchunmin
Closedchunmin
Closedchunmin
Closedchunmin

Diff 298956

widget/windows/WindowsSMTCProvider.cpp

Loading...