Closed Bug 523994 Opened 16 years ago Closed 15 years ago

Clean up control flow in XPCConvert::NativeInterface2JSObject

Categories

(Core :: XPConnect, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: mrbkap, Assigned: mrbkap)

References

Details

Attachments

(1 file, 4 obsolete files)

As I sat down to patch XPCConvert::NativeInterface2JSObject today, I realized that I had no clue how the control flow in it works. This is because there is an absolute mess of early returns coupled with if statements that sometimes fall through, etc, etc. I'm trying to clean it up, using early returns to exclude cases when we don't need to care about them anymore.
Attached patch wip (obsolete) — Splinter Review
This patch is broken somewhere (the browser actually sort of starts, but can't bring up a window). Unfortunately, my laptop is running out of batteries and I'm on an airplane, so I'll have to leave this for now. I'll pick it up again tomorrow. There are some XXX comments I might want to address before landing this, in addition to fixing the bugs.
Assignee: nobody → mrbkap
Status: NEW → ASSIGNED
Attached patch seems to work (obsolete) — Splinter Review
I'm pushing this to the try server now. If it passes, then I'll request review -- I'll tackle the cleanup I mention in the XXX comments in other bugs.
Attachment #407914 - Attachment is obsolete: true
Comment on attachment 408388 [details] [diff] [review] seems to work This "passed" on try server (three different known [orange] bugs, and some weird NSPR linking errors on several Talos boxes). I'd like to get this in now and deal with the extra cleanup in a followup patch.
Attachment #408388 - Flags: review?(jst)
Attachment #408388 - Flags: review?(bzbarsky)
Attached patch -w (obsolete) — Splinter Review
Attachment #408388 - Flags: review?(jst) → review?(peterv)
Attachment #408388 - Attachment is obsolete: true
Attachment #408388 - Flags: review?(peterv)
Attachment #408388 - Flags: review?(bzbarsky)
I'm going to attach a wip that cleans it up, in part, by using the new function in bug 533600.
Depends on: 533600
Attached patch wip (obsolete) — Splinter Review
This patch does a little more than just clean up the control flow: it's more of a "start using the functions introduced in bug 533600" patch. I hope this isn't a problem.
Attachment #409688 - Attachment is obsolete: true
I can also attach a diff -w if needed.
Attachment #421902 - Attachment is obsolete: true
Attachment #423100 - Flags: review?(peterv)
Attachment #423100 - Flags: review?(peterv) → review+
This was fixed as part of compartments.
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: