Closed
Bug 1688120
Opened 5 years ago
Closed 4 years ago
XPCNativeInterface::NewInstance control flow could be improved
Categories
(Core :: XPConnect, task, P5)
Core
XPConnect
Tracking
()
RESOLVED
FIXED
88 Branch
Tracking | Status | |
---|---|---|
firefox88 | --- | fixed |
People
(Reporter: pbone, Assigned: pbone)
References
Details
Attachments
(3 files)
The control flow here https://searchfox.org/mozilla-central/source/js/xpconnect/src/XPCWrappedNativeInfo.cpp#206 isn't obvious (using a failed flag and and null/non-null-ness of obj. This function would be easier to read and would lead to less bugs like Bug 1686825 if it did return nullptr
on failure with ScopeExit
https://searchfox.org/mozilla-central/source/mfbt/ScopeExit.h
Updated•5 years ago
|
Severity: -- → N/A
Priority: -- → P5
Assignee | ||
Updated•4 years ago
|
Assignee: nobody → pbone
Status: NEW → ASSIGNED
Assignee | ||
Comment 1•4 years ago
|
||
Improve the control flow for early exits in NewInstance().
Assignee | ||
Comment 2•4 years ago
|
||
Depends on D106387
Assignee | ||
Comment 3•4 years ago
|
||
Depends on D106388
Pushed by pbone@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/8c4499f7d11b
Improve control-flow XPCNativeInterface::NewInstance r=peterv
https://hg.mozilla.org/integration/autoland/rev/579413331263
Move some variable declarations closer to their uses r=peterv
https://hg.mozilla.org/integration/autoland/rev/77247863a2ea
Remove UB due to unnecessary integer conversion r=peterv
Comment 5•4 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/8c4499f7d11b
https://hg.mozilla.org/mozilla-central/rev/579413331263
https://hg.mozilla.org/mozilla-central/rev/77247863a2ea
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
status-firefox88:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → 88 Branch
You need to log in
before you can comment on or make changes to this bug.
Description
•