Closed Bug 534478 Opened 15 years ago Closed 14 years ago

every printing reftest causes assertions "Wrong scope, this is really bad!" and "This will screw up our existing presentation"

Categories

(Core :: Layout, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: dbaron, Assigned: smaug)

References

Details

(Whiteboard: [sg:critical?] possibly less severe?)

Attachments

(3 files)

Every reftest-print reftest causes two assertions:

###!!! ASSERTION: This will screw up our existing presentation: '!mPresShell && !mPresContext && !mWindow', file /builds/slave/mozilla-central-linux-debug/build/layout/base/nsDocumentViewer.cpp, line 2427

###!!! ASSERTION: Wrong scope, this is really bad!: 'JS_GetGlobalForObject(cx, obj) == newScope', file /builds/slave/mozilla-central-linux-debug/build/content/base/src/nsDocument.cpp, line 3654


Steps to reproduce:
 cd $(objdir)/_tests/reftest
 python ./runreftest.py $(srcdir)/layout/reftests/bugs/reftest.list

you should hit the assertions first on layout/reftests/bugs/200774-1.html .  (You can trim the rest out of the reftest.list.)


Marking security-sensitive given the second assertion, although it's possible this is actually a reftest harness bug.

This has been happening for at least 3 weeks; it's not new.
I added a hack for this in the reftest harness (for the assertion counting):
http://hg.mozilla.org/mozilla-central/rev/4700e3c42868
that will need to be removed when this is fixed.
Still happens on trunk even now that bug 500882 is fixed.
I'm not sure what severity this deserves.  We've never assigned a severity to any of our other "Wrong scope" assertion bugs.  dbaron, any thoughts?
Whiteboard: [sg:critical?] possibly less severe?
smaug, what do you think about this?
So reftest is the only one which calls setPageMode, and that method has even
comment that it is only partially working.
Attached patch patchSplinter Review
This should do it. One assertion is just wrong, and we don't need
to re-set document to window.

I need to check what to do with reftest.js. For some reason, not clear from
hg blame, there is this var count = (xr.widgetToolkit == "cocoa") ? 3 : 2;
Assignee: nobody → Olli.Pettay
Attachment #433835 - Flags: review?(dbaron)
Comment on attachment 433835 [details] [diff] [review]
patch

r=dbaron
Attachment #433835 - Flags: review?(dbaron) → review+
David, do you happen to remember why there is the '3' for cocoa?

I'm just building on OSX so that I can check the difference, but I'm not
100% which assertion I should be looking for.
I assume the assertion is
##!!! ASSERTION: nsPrintSettingsX::ReadPageFormatFromPrefs()
(In reply to comment #10)
> David, do you happen to remember why there is the '3' for cocoa?
> 
> I'm just building on OSX so that I can check the difference, but I'm not
> 100% which assertion I should be looking for.

(In reply to comment #11)
> I assume the assertion is
> ##!!! ASSERTION: nsPrintSettingsX::ReadPageFormatFromPrefs()

Sounds right.  I remember that there was an additional assertion in Mac OS X-specific code on all the printing reftests.
http://hg.mozilla.org/mozilla-central/rev/be5a3a430fb1
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Group: core-security → core-security-release
Group: core-security-release
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: