Closed
Bug 355075
Opened 18 years ago
Closed 18 years ago
Various (Strict) "Warning: reference to undefined property" regressions
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
VERIFIED
FIXED
mozilla1.8rc2
People
(Reporter: sgautherie, Assigned: brendan)
References
Details
(Keywords: regression, verified1.8.1)
Attachments
(2 files, 1 obsolete file)
190 bytes,
text/html
|
Details | |
1.04 KB,
patch
|
igor
:
review+
mtschrep
:
approval1.8.1+
|
Details | Diff | Splinter Review |
Regressed between [Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.8.1) Gecko/20060919 SeaMonkey/1.1b] (nightly) (W98SE) and [Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.8.1) Gecko/20061001 SeaMonkey/1.1b] (nightly) (W98SE) 1. Start Browser. 2. Got to <https://bugzilla.mozilla.org/enter_bug.cgi?full=1>. r. [ Warning: reference to undefined property this.mProgressListeners Source File: chrome://global/content/bindings/tabbrowser.xml Line: 856 ] I get an error at almost every/any page load. This line comes from "old" [ Bugzilla Bug 297155 opening a new tab while loading first page in new window breaks throbber / status bar ] *** Eventually, I'm not selecting "Component: Tabbed Browser" because I believe the issue is more general (hence choosing "Core" rather than MAS/SeaMonkey), as I've also seen repeated [ Warning: reference to undefined property flavourSet.flavourTable Source File: chrome://global/content/nsDragAndDrop.js Line: 200 ] and [ Warning: reference to undefined property this.mSessions Source File: chrome://global/content/autocomplete.xml Line: 634 ] Wild guess: could this be some kind of JS engine regression ?
Reporter | ||
Comment 1•18 years ago
|
||
CC: *Neil, as you made the Tabbrowser patch *Brendan, in case it actually is a JS engine regression I would also request blocking1.8.1=?, but holding until we know at least if it is Core or SeaMonkey...
Comment 2•18 years ago
|
||
Looks like a JS engine problem... tracing in Venkman shows that it breaks at the spurious warning but the JS then enumerates as expected.
Reporter | ||
Comment 3•18 years ago
|
||
'blocking1.8.1=?': Still a little early, but "Better safe than sorry" then, in case this should block the upcoming "FF2rc2". Moving component from 'General' to 'JavaScript Engine', too.
Component: General → JavaScript Engine
Flags: blocking1.8.1?
Reporter | ||
Comment 4•18 years ago
|
||
[Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.8.1) Gecko/20060930 SeaMonkey/1.1b] (nightly) (W98SE) No bug yet. (It would seem we're lucky on this one:) the regression happened between the following SM builds: 2006-09-30-13-mozilla1.8 and 2006-10-01-01-mozilla1.8.
Assignee | ||
Comment 5•18 years ago
|
||
(In reply to comment #2) > Looks like a JS engine problem... tracing in Venkman shows that it breaks at > the spurious warning but the JS then enumerates as expected. Can you get a stack in the JS engine, as well as in the JS code? It would be great to get a reduced testcase. Does this bug bite any XUL app other than SeaMonkey? /be
Updated•18 years ago
|
Assignee: nobody → general
QA Contact: general → general
Comment 6•18 years ago
|
||
I needed to set javascript.options.strict to see this bug - a 1.8 build from shows no warning, a build from today shows "Warning: reference to undefined property this.a".
Reporter | ||
Comment 7•18 years ago
|
||
[Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.8.1) Gecko/2006100103 BonEcho/2.0] (nightly) (W98SE) Same bug with FF v2: [ Warning: reference to undefined property this.a Source File: https://bugzilla.mozilla.org/attachment.cgi?id=240871 Line: 8 ]
Comment 8•18 years ago
|
||
This is a "regression" introduced by the bug 354750. Now Object.prototype.__iterator__ does not exist and code relies on the fact that the default iterator should be used if __iterator__ property is not present. The only problem is that the code uses JS_GetMethodById which would report a warning when it tries to access a property that do not exist. I wrote "regression" since in fact the code just exposed a bug in JS_GetMethodById: it should not report warnings for non-existing methods as all its callers has to deal with that on its own.
Assignee | ||
Comment 9•18 years ago
|
||
(In reply to comment #8) > This is a "regression" introduced by the bug 354750. > > Now Object.prototype.__iterator__ does not exist and code relies on the fact > that the default iterator should be used if __iterator__ property is not > present. The only problem is that the code uses JS_GetMethodById which would > report a warning when it tries to access a property that do not exist. I wrote > "regression" since in fact the code just exposed a bug in JS_GetMethodById: it > should not report warnings for non-existing methods as all its callers has to > deal with that on its own. Right -- it needs to use OBJ_LOOKUP_PROPERTY to test existence first. Then it would either OBJ_GET_PROPERTY or an optimized form of same. This shows lack of optimality in JSObjectOps, for sure. But not worth fixing in a hurry now. /be
Assignee | ||
Comment 10•18 years ago
|
||
Assignee | ||
Comment 11•18 years ago
|
||
Comment on attachment 240876 [details] [diff] [review] fix Fast testing confirmation needed. /be
Attachment #240876 -
Flags: approval1.8.1?
Assignee | ||
Comment 12•18 years ago
|
||
Attachment #240876 -
Attachment is obsolete: true
Attachment #240877 -
Flags: review?(igor.bukanov)
Attachment #240876 -
Flags: review?(igor.bukanov)
Attachment #240876 -
Flags: approval1.8.1?
Comment 13•18 years ago
|
||
The problem with fix v1: @callisto~/m/trunk/mozilla/js/src> cat ~/m/files/y.js function f() { this.a = <><a/><b/></> var dummy; for (var b in this.a) dummy = b; } f(); @callisto~/m/trunk/mozilla/js/src> js -strict ~/m/files/x.js LAZY: 0 /home/igor/m/files/x.js:4: strict warning: reference to undefined property this.a /home/igor/m/files/x.js:4: strict warning: reference to undefined property this.a /home/igor/m/files/x.js:4: strict warning: reference to undefined property this.a @callisto~/m/trunk/mozilla/js/src>
Updated•18 years ago
|
Attachment #240877 -
Flags: review?(igor.bukanov) → review+
Comment 14•18 years ago
|
||
Attachment 240877 [details] [diff] fixes this bug for me.
Assignee | ||
Comment 15•18 years ago
|
||
Fix on trunk: Checking in jsapi.c; /cvsroot/mozilla/js/src/jsapi.c,v <-- jsapi.c new revision: 3.281; previous revision: 3.280 done /be
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Assignee | ||
Updated•18 years ago
|
Attachment #240877 -
Flags: approval1.8.1?
Comment 16•18 years ago
|
||
Comment on attachment 240877 [details] [diff] [review] fix, v2 Approved regression fix for RC2.
Attachment #240877 -
Flags: approval1.8.1? → approval1.8.1+
Updated•18 years ago
|
Flags: blocking1.8.1? → blocking1.8.1+
Assignee | ||
Comment 17•18 years ago
|
||
Fixed on the 1.8 branch: Checking in jsapi.c; /cvsroot/mozilla/js/src/jsapi.c,v <-- jsapi.c new revision: 3.214.2.27; previous revision: 3.214.2.26 done /be
Keywords: fixed1.8.1
Comment 18•18 years ago
|
||
Checking in regress-355075-01.js; /cvsroot/mozilla/js/tests/js1_7/iterable/regress-355075-01.js,v <-- regress-35 5075-01.js initial revision: 1.1 done RCS file: /cvsroot/mozilla/js/tests/js1_7/iterable/regress-355075-02.js,v done Checking in regress-355075-02.js; /cvsroot/mozilla/js/tests/js1_7/iterable/regress-355075-02.js,v <-- regress-35 5075-02.js initial revision: 1.1
Flags: in-testsuite+
Comment 19•18 years ago
|
||
With the patch applied, JS_GetMethodById() on XML objects no longer works.
Reporter | ||
Comment 20•18 years ago
|
||
[Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.8.1) Gecko/20061002 SeaMonkey/1.1b] (nightly) (W98SE) V.Fixed on MOZILLA_1_8_BRANCH. (In reply to comment #9) > This shows lack of > optimality in JSObjectOps, for sure. But not worth fixing in a hurry now. I leave it to you to open a followup bug, if necessary. (In reply to comment #19) > With the patch applied, JS_GetMethodById() on XML objects no longer works. Should this bug be reopened, or another one filed ?
Severity: major → normal
Keywords: fixed1.8.1 → verified1.8.1
OS: Windows 98 → All
Hardware: PC → All
Summary: Various "Warning: reference to undefined property" regressions → Various (Strict) "Warning: reference to undefined property" regressions
Target Milestone: --- → mozilla1.8rc2
Version: 1.8 Branch → Trunk
Assignee | ||
Comment 21•18 years ago
|
||
(In reply to comment #19) > With the patch applied, JS_GetMethodById() on XML objects no longer works. What testcase shows this, or is it only if the API is used to get at XML.prototype methods? I should have seen the latter problem; too much last-minute hacking. If it is the only problem, we can live with it for 1.8.1 and fix it in 1.8.1.1. New bug is needed, since this bug's symptom is fixed, for both normal and E4X objects (as igor showed in comment 13). /be
Comment 22•18 years ago
|
||
(In reply to comment #21) > (In reply to comment #19) > > With the patch applied, JS_GetMethodById() on XML objects no longer works. > What testcase shows this, or is it only if the API is used to get at I filed bug 355145 with a testcase.
Assignee | ||
Comment 23•18 years ago
|
||
(In reply to comment #22) > (In reply to comment #21) > > (In reply to comment #19) > > > With the patch applied, JS_GetMethodById() on XML objects no longer works. > > What testcase shows this, or is it only if the API is used to get at > > I filed bug 355145 with a testcase. Thanks. /be
Comment 24•18 years ago
|
||
verified fixed 1.8 1.9 20061002 windows/linux 1.8 macppc
Status: RESOLVED → VERIFIED
Comment 25•18 years ago
|
||
this regressed on 20061009 1.8 after 20061007. filed Bug 356129.
You need to log in
before you can comment on or make changes to this bug.
Description
•