Closed Bug 118352 Opened 24 years ago Closed 24 years ago

Javascript: window.print() broken, gives unexpected exception

Categories

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

x86
Windows ME
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla0.9.8

People

(Reporter: lkolesza, Assigned: rods)

References

()

Details

Attachments

(1 file, 4 obsolete files)

From Bugzilla Helper: User-Agent: Mozilla/5.0 (Windows; U; Win 9x 4.90; en-US; rv:0.9.7) Gecko/20011221 BuildID: 2001010403 Sometime around the 1st, window.print() stopped working and started giving the following exception: Error: uncaught exception: [Exception... "Not enough arguments [nsIDOMWindowInternal.print]" nsresult: "0x80570001 (NS_ERROR_XPC_NOT_ENOUGH_ARGS)" location: "JS frame :: https://www.retirementpassport.com:443/rss/servlet/ServiceDispatch/0304?state=group&stateTable=groupChange&event=moduleChange&moduleName=AccountInquiry :: printWindow :: line 185" data: no] Reproducible: Always Steps to Reproduce: Go to given URL, press "Print this Page" button Actual Results: Exception in javascript console Expected Results: Print dialog I first noticed this problem on an investment web site with 2002010403, but was able to reproduce it at the URL given above. Works with 0.9.7 Works with 20011231 <--- regression point Broken with 20020101 Broken with 20020102 Broken with 20020104
To Rod, who checked in printing stuff right around then.
Assignee: asa → rods
Component: Browser-General → DOM Level 0
QA Contact: doronr → desale
Attached patch Proposed fix (obsolete) — — Splinter Review
Attached patch Proposed fix (diff -w) (obsolete) — — Splinter Review
Reviews?
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla0.9.8
Attached patch patch (obsolete) — — Splinter Review
I was a little over zealous on where I was adding the PrintSettings as arguments to interfaces. This patch simply removes the nsIPRintSettings from the nsIDOMWindowInternal interface. jst, does you patch fix a different bug?
Nope, my patch fixed an exception from the same code, but in an older version of the code, the world changed underneeth my feet here. My patch doesn't seem to apply at all any more. Ignore my patches.
Comment on attachment 64523 [details] [diff] [review] patch sr=jst
Attachment #64523 - Flags: superreview+
Comment on attachment 64523 [details] [diff] [review] patch r=dcone
Attachment #64523 - Flags: review+
fixed
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
*** Bug 119873 has been marked as a duplicate of this bug. ***
This fixed the generic problem bu broken print with the currently page setup options.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Attached patch new patch to fix both problems (obsolete) — — Splinter Review
The issue is that generic JS needs to be able to call print with no params and the browser needs to be able to call it with the print options. The "print" with the print options is something we need to use so I gave it a separate and unique name.
Attachment #63713 - Attachment is obsolete: true
Attachment #63714 - Attachment is obsolete: true
Attachment #64523 - Attachment is obsolete: true
Comment on attachment 64868 [details] [diff] [review] new patch to fix both problems r=dcone
Attachment #64868 - Flags: review+
Status: REOPENED → ASSIGNED
Comment on attachment 64868 [details] [diff] [review] new patch to fix both problems sr=jst
Attachment #64868 - Flags: superreview+
Added new method printWithSettings for printing with passing in PrintSettings
Attachment #64868 - Attachment is obsolete: true
fixed
Status: ASSIGNED → RESOLVED
Closed: 24 years ago → 24 years ago
Resolution: --- → FIXED
Comment on attachment 64933 [details] [diff] [review] The correct patch sr=jst
Attachment #64933 - Flags: superreview+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: