Closed Bug 322773 Opened 20 years ago Closed 20 years ago

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

Categories

(Core :: Layout: Images, Video, and HTML Frames, defect, P3)

PowerPC
macOS
defect

Tracking

()

RESOLVED FIXED
mozilla1.9alpha1

People

(Reporter: jruderman, Assigned: mrbkap)

References

()

Details

(Keywords: assertion, testcase)

Attachments

(1 file, 1 obsolete file)

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
Keywords: testcase
(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?
Blocks: 284993
Depends on: 323380
Attached patch Ensure an inner window (obsolete) — Splinter Review
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
Attached patch Yeah, it shouldSplinter Review
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
Closed: 20 years ago
Resolution: --- → FIXED
Flags: blocking1.9a1?
in-testsuite- due to bug 292510.
Flags: in-testsuite-
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.

Attachment

General

Created:
Updated:
Size: