Closed
Bug 342490
Opened 18 years ago
Closed 18 years ago
window.navigator isn't really readonly
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
People
(Reporter: mrbkap, Assigned: mrbkap)
References
Details
Attachments
(3 files, 2 obsolete files)
1.18 KB,
patch
|
jst
:
review+
jst
:
superreview+
|
Details | Diff | Splinter Review |
1.04 KB,
text/html
|
Details | |
1.00 KB,
patch
|
mrbkap
:
review+
sicking
:
superreview+
|
Details | Diff | Splinter Review |
In nsIDOMWindowInternal.idl, we have:
http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/dom/public/idl/base/nsIDOMWindowInternal.idl&rev=1.32&root=/cvsroot&mark=54#54
However, XPConnect always asks the scriptable helpers to resolve a property before falling back onto asking the set if the property exists. As a result, we fall into this code in nsDOMClassInfo.cpp:
http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/dom/src/base/nsDOMClassInfo.cpp&rev=1.393&root=/cvsroot&mark=6289-6291#6276
and since we resolve it there, we never ask the IDL about the property, and we lose. I'm not sure why we have the DOMClassInfo code there at all (why don't we just resolve the navigator property in from the IDL?) but if there is a need for it, then I think we should use JSPROP_READONLY and JSPROP_PERMANENT for it.
Assignee | ||
Comment 1•18 years ago
|
||
This patch is good for all branches. It fixes this bug by making the 'navigator' property permanent and readonly.
Assignee: general → mrbkap
Status: NEW → ASSIGNED
Attachment #226849 -
Flags: superreview?(jst)
Attachment #226849 -
Flags: review?(jst)
Comment 2•18 years ago
|
||
Comment on attachment 226849 [details] [diff] [review]
Fix for all branches
r+sr=jst
Attachment #226849 -
Flags: superreview?(jst)
Attachment #226849 -
Flags: superreview+
Attachment #226849 -
Flags: review?(jst)
Attachment #226849 -
Flags: review+
Assignee | ||
Comment 3•18 years ago
|
||
Fix checked into trunk.
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Comment 4•18 years ago
|
||
Comment 5•18 years ago
|
||
window.navigator is still writable if you refresh attachment 244036 [details].
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Comment 6•18 years ago
|
||
Comment 7•18 years ago
|
||
Attachment #244036 -
Attachment is obsolete: true
Attachment #244039 -
Attachment is obsolete: true
Updated•18 years ago
|
Flags: blocking1.9?
Updated•18 years ago
|
Flags: in-testsuite?
Comment 8•18 years ago
|
||
Attachment #244254 -
Flags: superreview?(bugmail)
Attachment #244254 -
Flags: review?(mrbkap)
Assignee | ||
Comment 9•18 years ago
|
||
Comment on attachment 244254 [details] [diff] [review]
Additional change needed...
Ah, drat.
Attachment #244254 -
Flags: review?(mrbkap) → review+
Attachment #244254 -
Flags: superreview?(bugmail) → superreview+
Comment 10•18 years ago
|
||
Fixed on the trunk.
Status: REOPENED → RESOLVED
Closed: 18 years ago → 18 years ago
Resolution: --- → FIXED
Updated•13 years ago
|
Flags: in-testsuite?
Flags: blocking1.9?
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•