Closed Bug 966498 Opened 9 years ago Closed 9 years ago

Clean up nsGlobalWindow::Alert a little bit

Categories

(Core :: DOM: Core & HTML, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla29

People

(Reporter: mrbkap, Assigned: mrbkap)

Details

Attachments

(2 files)

nsGlobalWindow::Alert and nsGlobalWindow::Confirm are almost exactly the same and both contain a really ugly (and unnecessary!) reinterpret_cast<void**>. It's pretty easy to merge them and fix the reinterpret_cast.

I'm purposely leaving nsGlobalWindow::Prompt out of the refactoring because it's just different enough.
Attached patch RefactorSplinter Review
This was pretty straightforward...
Attachment #8368876 - Flags: review?(bzbarsky)
The only thing to note here is that outerwindow->mDoc == innerwindow->mDoc
Attachment #8368878 - Flags: review?(bzbarsky)
Huh. Git's patch formatter totally did better locally...
Assignee: nobody → mrbkap
Comment on attachment 8368876 [details] [diff] [review]
Refactor

r=me
Attachment #8368876 - Flags: review?(bzbarsky) → review+
Comment on attachment 8368878 [details] [diff] [review]
A little more cleanup

r=me
Attachment #8368878 - Flags: review?(bzbarsky) → review+
https://hg.mozilla.org/mozilla-central/rev/0cbd147b1854
https://hg.mozilla.org/mozilla-central/rev/ee15873640b6
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla29
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.