[FIX] Add nsPIDOMWindow::EnsureInner()

RESOLVED FIXED in mozilla1.9alpha1

Status

()

Core
DOM
P2
normal
RESOLVED FIXED
13 years ago
13 years ago

People

(Reporter: jst, Assigned: bz)

Tracking

Trunk
mozilla1.9alpha1
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Reporter)

Description

13 years ago
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()...
Created attachment 205367 [details] [diff] [review]
Like so?
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)
(Reporter)

Comment 2

13 years ago
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+
Fixed
Status: ASSIGNED → RESOLVED
Last Resolved: 13 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.