Closed Bug 3558 Opened 26 years ago Closed 23 years ago

nsJSContext::InitClasses() called twice

Categories

(Core :: DOM: Core & HTML, defect, P3)

PowerPC
Mac System 8.5
defect

Tracking

()

RESOLVED FIXED
Future

People

(Reporter: beard, Assigned: vidur)

Details

(Keywords: dom0)

LiveConnect reports an error message that "java" is defined twice when initializing a window for the first time. The reason is that GlobalWindowImpl::SetNewDocument() doesn't clear the context the first time, when mDocument == NULL. The fix is probably to always call JS_ClearScope, whether mDocument is NULL or not.
QA contact re-assigned according to the product areas we're currently working on.
QA Contact: 4015 → 4616
Target Milestone: M5
I'm pretty sure I fixed this a while back in GlobalWindowImpl::SetNewDocument(), mozilla/dom/src/base/nsGlobalWindow.cpp v1.53. See if my fix is sufficient.
Status: NEW → ASSIGNED
Target Milestone: M5 → M6
We still call InitClasses twice at startup time, but there's a JS_ClearScope() done in between. As a result, we don't get the LiveConnect warning anymore. I'll leave this bug open since the double initialization is still sub-optimal.
Target Milestone: M6 → M8
Target Milestone: M8 → M10
Since this is not critical, I'm moving it off to a later milestone.
Target Milestone: M10 → M14
Again, since this is not critical I'm moving it off to to a later milestone...
Target Milestone: M14 → M17
This bug has been marked "future" because the original netscape engineer working on this is over-burdened. If you feel this is an error, that you or another known resource will be working on this bug,or if it blocks your work in some way -- please attach your concern to the bug for reconsideration.
Target Milestone: M17 → Future
Keywords: dom0
Any idea how much time this extra call takes? If it's significant we definitely want it fixed for Mac startup performance in Mozilla0.9
nominating for dogfood (from sdagley's list of bugs that are good candidates for our next release)
Keywords: nsdogfood
Keywords: nsCatFood
Keywords: nsdogfood
This is no longer a problem. InitContext is only invoked once per document.
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.