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

RESOLVED FIXED

Status

()

defect
RESOLVED FIXED
10 years ago
4 years ago

People

(Reporter: dbaron, Assigned: smaug)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

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

Attachments

(3 attachments)

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.

Comment 3

9 years ago
Still happens on trunk even now that bug 500882 is fixed.
Duplicate of this bug: 546892
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.
Posted patch patch — — Splinter 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
Last Resolved: 9 years ago
Resolution: --- → FIXED

Updated

4 years ago
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.