Closed
Bug 127557
Opened 23 years ago
Closed 23 years ago
getParentMenuButtonRecursive is not defined in linkToolbarItem.js
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
VERIFIED
FIXED
mozilla0.9.9
People
(Reporter: ajschult784, Assigned: brendan)
References
()
Details
(Keywords: js1.5)
Attachments
(1 file, 1 obsolete file)
1.70 KB,
patch
|
jband_mozilla
:
review+
shaver
:
superreview+
asa
:
approval+
|
Details | Diff | Splinter Review |
i686 Linux from today's CVS: I get a Javascript exception when following a link in a bugzilla bug list: ************************************************************ * Call to xpconnect wrapped JSObject produced this error: * [Exception... "'[JavaScript Error: "getParentMenuButtonRecursive is not defined" {file: "chrome://navigator/content/linkToolbarItem.js" line: 87}]' when calling method: [nsIDOMEventListener::handleEvent]" nsresult: "0x80570021 (NS_ERROR_XPC_JAVASCRIPT_ERROR_WITH_DETAILS)" location: "<unknown>" data: yes] ************************************************************ Steps to reproduce: 1) open a bugzilla bug list 2) click on a bug link I do not see this with a clean profile, but get it everytime with my normal one. I don't know what component this should be, but Gerv wrote linkToolbarItem.js, so he gets it.
Reporter | ||
Comment 1•23 years ago
|
||
move function getParentMenuBottonRecursive outside of function LinkToolbarItem
Comment 2•23 years ago
|
||
I'll look at this
Comment 3•23 years ago
|
||
To Christopher
Assignee: gerv → choess
Status: UNCONFIRMED → NEW
Ever confirmed: true
Reporter | ||
Comment 4•23 years ago
|
||
I see this with binary build 2002022406 but not 2002022208. possibly a side effect of bug 62124
Comment 6•23 years ago
|
||
If it really is a side-effect of bug 62164, Brendan should know about it, as that patch wasn't supposed to cause any change in behavior ;) Is there any direct evidence that this bug is caused by that change? Can we reduce this to a simple JS testcase that fails, and/or verify for sure that bug 62164 was the cause of this (ie, test on builds identical except for that patch)? (Brendan, I'm cc'ing you just so that this issue is on your radar; feel free to take it back off your radar if it seems unrelated to your change, or if you just aren't interested in it :) )
I fear it's related, too. Can someone (timeless?) produce a minimal JS-only test case that shows us not picking up the function name properly?
Reporter | ||
Comment 8•23 years ago
|
||
I also get the error on build 2002022221 (right after checkin of bug 62164)
Assignee | ||
Comment 9•23 years ago
|
||
It certainly could be that bug 62164 regressed something we don't test for in the js testsuite; cc'ing pschwartau. We need a minimal testcase. /be
Assignee | ||
Comment 10•23 years ago
|
||
What happens if you quit, remove the FastLoad file from your profile, and restart? The comment about it not happening with a clean profile suggests a problem between FastLoad and the JS engine, although once the clean profile has been used for one session, there should be a new FastLoad file there, and the bug should bite again. Does it? /be
Reporter | ||
Comment 11•23 years ago
|
||
The default profile has the Site Navigation Bar disabled by default. Enabling it to "Show Only as Needed" or "Show Always" causes the behavior to appear in a clean profile.
Assignee | ||
Comment 12•23 years ago
|
||
I debugged this, it's the second regression known to be caused by the big patch for bug 62164. Fix in a moment. /be
Assignee: choess → brendan
Blocks: 122050
Keywords: js1.5,
mozilla0.9.9
Target Milestone: --- → mozilla0.9.9
Assignee | ||
Updated•23 years ago
|
Severity: normal → critical
Status: NEW → ASSIGNED
Assignee | ||
Comment 13•23 years ago
|
||
Amid the massive changes for bug 62164, I made a change to call_enumerate in jsfun.c of the "one of these things is not like the other -- let's unify!" sort, and that was not the right thing. I was comparing how call_enumerate finds the function object whose properties should be reflected into its call object with how call_resolve finds the function object in which it will lookup (including prototype search, as usual) a particular id. But as the comment in this patch makes clear, call_enumerate is different. It must look in the scope of the compiler-created function object, not in a possibly mutated scope belonging to a cloned function object that shares the underlying JSFunction and JSScript with its prototype, but that exists to carry the right scope chain (this arises with nested functions, and in XUL scripts due to "brutal sharing"). When a XUL script sets .prototype on a function object, it is mutating a clone. If call_enumerate looks at that clone's scope, it will see only a property named 'prototype'. It will not see parameters and local variables/functions, so it will miss getParentMenuButtonRecursive in the case at hand in this bug. I tested this patch with the links toolbar on as needed, it works. Confirmation and code review for 0.9.9 sought -- this should go in today. Sorry for the trouble, thanks for the good testcase (Phil, we need to cover this case somehow in the JS suite; I'll find you later today to talk about how to do that without "brutal sharing"). /be
Attachment #71207 -
Attachment is obsolete: true
Assignee | ||
Updated•23 years ago
|
QA Contact: doronr → pschwartau
Reporter | ||
Updated•23 years ago
|
Component: Browser-General → JavaScript Engine
Comment on attachment 72090 [details] [diff] [review] proposed fix When I added function cloning, I had no idea it would be this exciting! sr=shaver, thanks for the nice long comment, too.
Attachment #72090 -
Flags: superreview+
Comment 15•23 years ago
|
||
Comment on attachment 72090 [details] [diff] [review] proposed fix r=jband. Looks right to me.
Attachment #72090 -
Flags: review+
Comment 16•23 years ago
|
||
Comment on attachment 72090 [details] [diff] [review] proposed fix a=asa (on behalf of drivers) for checkin to 0.9.9
Attachment #72090 -
Flags: approval+
Assignee | ||
Comment 17•23 years ago
|
||
Fixed in trunk and 0.9.9 branch. /be
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Comment 18•23 years ago
|
||
*** Bug 128800 has been marked as a duplicate of this bug. ***
Comment 19•23 years ago
|
||
Testcase added to JS testsuite: mozilla/js/tests/js1_5/Regress/regress-127557.js This is a testcase that Brendan created, and it depends on the new clone() function in js.c, the SpiderMonkey shell, just added today: Usage: clone clone(fun[, scope]) Clone function object
Comment 20•23 years ago
|
||
The testcase now passes in the current JS debug/optimized shell on WinNT, Linux, and Mac9.1. However, if the fix for this bug is backed out, the test fails as follows: ReferenceError: h_peer is not defined Marking Verified FIXED -
Status: RESOLVED → VERIFIED
Updated•19 years ago
|
Flags: testcase+
You need to log in
before you can comment on or make changes to this bug.
Description
•