Closed Bug 306642 Opened 19 years ago Closed 19 years ago

[FIX] Add nsPIDOMWindow::EnsureInner()

Categories

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

defect

Tracking

()

RESOLVED FIXED
mozilla1.9alpha1

People

(Reporter: jst, Assigned: bzbarsky)

Details

Attachments

(1 file, 1 obsolete file)

Right now the way to ensure that there's an inner window in an outer window is
to call GetDocument() on the outer. That will synchronously create an
about:blank document if there's no document in the window, and that will end up
creating a new inner window. This is somewhat far-fetched and non-obvious, so
having an explicit call to ensure that there's an inner window would make the
code more understandable. The method could simply be an inline method that calls
GetDocument()...
Attached patch Like so? (obsolete) (deleted) — Splinter Review
Assignee: jst → bzbarsky
Status: NEW → ASSIGNED
Attachment #205367 - Flags: superreview?(bzbarsky)
Attachment #205367 - Flags: review?(bzbarsky)
Priority: -- → P2
Summary: Add nsPIDOMWindow::EnsureInner() → [FIX] Add nsPIDOMWindow::EnsureInner()
Target Milestone: --- → mozilla1.9alpha
Attachment #205367 - Flags: superreview?(jst)
Attachment #205367 - Flags: superreview?(bzbarsky)
Attachment #205367 - Flags: review?(jst)
Attachment #205367 - Flags: review?(bzbarsky)
Comment on attachment 205367 [details] [diff] [review]
Like so?

+  nsPIDOMWindow *EnsureInnerWindow()
+  {

I'd add an assert/warning here to make sure we know if this is ever called on an inner window.

r+sr=jst with that.
Attachment #205367 - Flags: superreview?(jst)
Attachment #205367 - Flags: superreview+
Attachment #205367 - Flags: review?(jst)
Attachment #205367 - Flags: review+
Attached patch Updated to comments (deleted) — Splinter Review
Attachment #205367 - Attachment is obsolete: true
Fixed
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: