Closed
Bug 1509562
Opened 6 years ago
Closed 6 years ago
Organizational improvements when defining redirections
Categories
(Core Graveyard :: Web Replay, enhancement)
Core Graveyard
Web Replay
Tracking
(firefox65 fixed)
RESOLVED
FIXED
mozilla65
Tracking | Status | |
---|---|---|
firefox65 | --- | fixed |
People
(Reporter: bhackett1024, Assigned: bhackett1024)
Details
Attachments
(5 files)
144.63 KB,
patch
|
Details | Diff | Splinter Review | |
9.32 KB,
patch
|
loganfsmyth
:
review+
|
Details | Diff | Splinter Review |
1.12 KB,
patch
|
loganfsmyth
:
review+
|
Details | Diff | Splinter Review |
23.48 KB,
patch
|
loganfsmyth
:
review+
|
Details | Diff | Splinter Review |
116.25 KB,
patch
|
loganfsmyth
:
review+
|
Details | Diff | Splinter Review |
There are a couple of annoying things about how redirections are defined: - Redirections are defined as a flat array, which makes it hard to have different redirections which are installed in different ways, or to (in the future) share sets of redirections between different platforms. - Redirections are defined via a gigantic macro, which is ugly, breaks some editors (in particular, the editor I use), and makes it hard to diagnose certain compiler errors. The attached patch does a bunch of reorganization to fix both of these, while avoiding making any functional changes.
Assignee | ||
Comment 1•6 years ago
|
||
Allow platforms to internally manage how their redirections are organized, allowing other parts of the system to access the redirections with NumRedirections() and GetRedirection(n) methods.
Attachment #9027254 -
Flags: review?(lsmyth)
Assignee | ||
Comment 2•6 years ago
|
||
Fix a bug exposed by later patches in this bug. When resetting middleman calls, releasing the resources held via a call can require accessing data from earlier middleman calls. These calls may have already been deleted, leading to a use-after-free error. The attached patch deletes the calls in a separate pass to avoid this.
Attachment #9027255 -
Flags: review?(lsmyth)
Assignee | ||
Comment 3•6 years ago
|
||
Defining the redirections outside a macro means that we will no longer be able to use the CallEvent_* enum values to refer to the original unredirected function pointer for a given redirection name. Uses of these enums are pretty limited, and this patch adds an alternative way to refer to the original unredirected function pointer for the 25 or so functions that need this behavior.
Attachment #9027256 -
Flags: review?(lsmyth)
Assignee | ||
Comment 4•6 years ago
|
||
Replace the gigantic macro used to define the redirections with a normal static initializer. This also renames the Middleman_* functions to MM_* for compactness and to more closely mirror the similar RR_* functions.
Attachment #9027257 -
Flags: review?(lsmyth)
Updated•6 years ago
|
Attachment #9027254 -
Flags: review?(lsmyth) → review+
Updated•6 years ago
|
Attachment #9027255 -
Flags: review?(lsmyth) → review+
Updated•6 years ago
|
Attachment #9027256 -
Flags: review?(lsmyth) → review+
Updated•6 years ago
|
Attachment #9027257 -
Flags: review?(lsmyth) → review+
Pushed by bhackett@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/3f77f0486954 Part 1 - Remove restriction on redirections being a statically defined array, r=lsmyth. https://hg.mozilla.org/integration/mozilla-inbound/rev/bb62b5dc4dbe Part 2 - Avoid UAF when resetting middleman calls, r=lsmyth. https://hg.mozilla.org/integration/mozilla-inbound/rev/d0efb6f89bd0 Part 3 - Remove dependence on CallEvent_* enum, r=lsmyth. https://hg.mozilla.org/integration/mozilla-inbound/rev/b9f41dd78cfd Part 4 - Define redirections directly, instead of with a giant macro, r=lsmyth.
Comment 6•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/3f77f0486954 https://hg.mozilla.org/mozilla-central/rev/bb62b5dc4dbe https://hg.mozilla.org/mozilla-central/rev/d0efb6f89bd0 https://hg.mozilla.org/mozilla-central/rev/b9f41dd78cfd
Status: NEW → RESOLVED
Closed: 6 years ago
status-firefox65:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla65
Updated•4 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•