All users were logged out of Bugzilla on October 13th, 2018

<iframe src="bogus:"> triggers "ASSERTION: nsPrompt used too early on window object!"

RESOLVED FIXED in mozilla1.9alpha1

Status

()

P3
normal
RESOLVED FIXED
13 years ago
2 months ago

People

(Reporter: jruderman, Assigned: mrbkap)

Tracking

({assertion, testcase})

Trunk
mozilla1.9alpha1
PowerPC
Mac OS X
assertion, testcase
Points:
---
Dependency tree / graph
Bug Flags:
in-testsuite -

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(1 attachment, 1 obsolete attachment)

(Reporter)

Description

13 years ago
To reproduce, load data:text/html,<iframe src="bogus:">.

###!!! ASSERTION: nsPrompt used too early on window object!: 'window->GetExtantDocument() != nsnull', file /Users/admin/trunk/mozilla/embedding/components/windowwatcher/src/nsPrompt.cpp, line 176
Break: at file /Users/admin/trunk/mozilla/embedding/components/windowwatcher/src/nsPrompt.cpp, line 176

See also bug 286708, another way to trigger the same assertion message.
jst, the problem is that the iframe is trying to pose a "invalid protocol" dialog... In general, it seems to me that the prompter stuff should ensure an inner window instead of asserting there is one, if it depends on there being one.

What do you think?
Blocks: 286708
(Reporter)

Updated

13 years ago
Keywords: testcase

Comment 2

13 years ago
(In reply to comment #1)
>In general, it seems to me that the prompter stuff should ensure an inner
>window instead of asserting there is one, if it depends on there being one.
In fact it effectively does so in the subsequent code, see http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/embedding/components/windowwatcher/src/nsPrompt.cpp&rev=1.22&mark=180-181#171
Right.  That's not desirable in some cases (bug 284993).  But perhaps this is not the right place to assert...
Flags: blocking1.9a1?
Created attachment 208794 [details] [diff] [review]
Ensure an inner window

I'm not sure if this is a hack or not. My idea is that if we're trying to report an error, then this is the first time that we really _need_ to make sure we have an inner window (which translates into an about:blank document in this case).
Assignee: nobody → mrbkap
Status: NEW → ASSIGNED
Attachment #208794 - Flags: review?(bzbarsky)
Comment on attachment 208794 [details] [diff] [review]
Ensure an inner window

Shouldn't that be handled by DisplayLoadError itself, when it actually prompts (as opposed to going directly into loading an error page)?
Priority: -- → P3
Target Milestone: --- → mozilla1.9alpha
Created attachment 208821 [details] [diff] [review]
Yeah, it should

I decided to expand the GetDocument call into the docshell code since I think it more clearly conveys what the prompt service is expecting.
Attachment #208794 - Attachment is obsolete: true
Attachment #208821 - Flags: review?(bzbarsky)
Attachment #208794 - Flags: review?(bzbarsky)
Attachment #208821 - Flags: superreview+
Attachment #208821 - Flags: review?(bzbarsky)
Attachment #208821 - Flags: review+
Fix checked into trunk.
Status: ASSIGNED → RESOLVED
Last Resolved: 13 years ago
Resolution: --- → FIXED
Flags: blocking1.9a1?
(Reporter)

Comment 8

11 years ago
in-testsuite- due to bug 292510.
Flags: in-testsuite-

Updated

2 months ago
Product: Core → Core Graveyard
Component: Layout: HTML Frames → Layout: Images
Product: Core Graveyard → Core
You need to log in before you can comment on or make changes to this bug.