Open Bug 629617 Opened 13 years ago Updated 2 years ago

[Linux] "JavaScript strict warning: chrome://reftest/content/reftest.js, line 400: reference to undefined property CC[NS_GFXINFO_CONTRACTID]"

Categories

(Core :: Graphics, defect)

x86
Linux
defect

Tracking

()

REOPENED

People

(Reporter: sgautherie, Unassigned)

References

()

Details

Attachments

(1 file)

(Noticed in bug 629616.)

http://tinderbox.mozilla.org/showlog.cgi?log=Firefox/1296198631.1296200217.16074.gz&fulltext=1
Rev3 Fedora 12 mozilla-central debug test reftest on 2011/01/27 23:10:31
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox/1296200620.1296201926.23680.gz&fulltext=1
Rev3 Fedora 12x64 mozilla-central debug test reftest on 2011/01/27 23:43:40
http://tinderbox.mozilla.org/showlog.cgi?log=SeaMonkey/1296192115.1296195559.26216.gz&fulltext=1
Linux comm-central-trunk debug test reftest on 2011/01/27 21:21:55
{
JavaScript strict warning: chrome://reftest/content/reftest.js, line 400:
reference to undefined property CC[NS_GFXINFO_CONTRACTID]
}
Blocks: 590010
Depends on: 629957
I assume this just misses a check for this interface.
In a few other places too: see bug 629957 for example.
This causes 582 lines of spam at the beginning of every local "make reftest" run that I run.  (though it feels like more, since the third line is 715 characters long)
Those 582 lines consist of 194 instances of the following triplet:
====
JavaScript strict warning: chrome://reftest/content/reftest.js, line 400: reference to undefined property CC[NS_GFXINFO_CONTRACTID]
REFTEST INFO | Dumping JSON representation of sandbox
REFTEST INFO | {"isDebugBuild":true,"xulRuntime":{"widgetToolkit":"gtk2","OS":"Linux","XPCOMABI":"x86_64-gcc3"},"d2d":false,"layersGPUAccelerated":false,"cocoaWidget":false,"gtk2Widget":true,"qtWidget":false,"winWidget":false,"http":{"userAgent":"Mozilla/5.0 (X11; Linux x86_64; rv:2.0b11pre) Gecko/20110131 Firefox/4.0b11pre","appName":"Mozilla","appVersion":"5.0","product":"Gecko","productSub":"20110131","platform":"X11","oscpu":"Linux x86_64","language":"en-US","misc":"rv:2.0b11pre"},"haveTestPlugin":true,"windowsDefaultTheme":false,"nativeThemePref":true,"prefs":{"__exposedProps__":{"getBoolPref":"r","getIntPref":"r"},"_prefs":{"root":"","PREF_INVALID":0,"PREF_STRING":32,"PREF_INT":64,"PREF_BOOL":128}}}
====
oh, looks like I already filed this a while back. :) dupe of Bug 590010, I think.
...on which sgautherie mentions having filed this bug as an offshoot, possibly on the assumption that "reference to undefined property" is distinct from the REFTEST INFO lines.

I think it's all the same issue, though -- we're spamming the REFTEST INFO because of the "reference to undefined property" failure.

Duping.  I think I have a trivial fix for this, too -- I'll post it on the other bug.
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → DUPLICATE
(In reply to comment #4)
> I think it's all the same issue, though -- we're spamming the REFTEST INFO
> because of the "reference to undefined property" failure.

d'oh, looks like I was wrong! I assumed it was all related, since there seemed to be an exact matching up between the "reference to undefined property" failures and the REFTEST INFO lines, but apparently it's separate, since my fix for the former does not fix the latter.
Status: RESOLVED → REOPENED
Resolution: DUPLICATE → ---
Attached patch incomplete fixSplinter Review
This just moves the widget detection code up a bit and only evaluates CC[NS_GFXINFO_CONTRACTID] on Windows, since it's only implemented on Windows.
Attachment #508636 - Flags: review?(dbaron)
Comment on attachment 508636 [details] [diff] [review]
incomplete fix

>+    if (sandbox.winWidget) {

Indeed, D2DEnabled can (probably) be true on Windows only.

>       // nsIGfxInfo is currently only implemented on Windows

But this is not true (anymore): this interface exists on OSX and Android too.

>-      sandbox.d2d = CC[NS_GFXINFO_CONTRACTID].getService(CI.nsIGfxInfo).D2DEnabled;
>+      sandbox.d2d =
>+        CC[NS_GFXINFO_CONTRACTID].getService(CI.nsIGfxInfo).D2DEnabled;

I was more thinking about adding "if (NS_GFXINFO_CONTRACTID in CC)".

Then, to do these for all occurrences of such code.
Comment on attachment 508636 [details] [diff] [review]
incomplete fix

ah, ok - thanks for the notes.

I'll let someone else handle that, then (maybe you? :)) -- I was just posting this patch as a quick itch-scratching.
Attachment #508636 - Attachment description: fix? → incomplete fix
Attachment #508636 - Flags: review?(dbaron)
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: