Closed
Bug 266373
Opened 20 years ago
Closed 4 years ago
"Deprecated property window.title used. Please use document.title instead." has no source information
Categories
(Core :: DOM: Core & HTML, defect, P5)
Tracking
()
RESOLVED
INVALID
People
(Reporter: bugzilla-mozilla-20000923, Unassigned)
References
(Blocks 1 open bug)
Details
(Whiteboard: [firebug-p3])
Attachments
(1 file, 1 obsolete file)
(deleted),
patch
|
jst
:
review-
jst
:
superreview-
|
Details | Diff | Splinter Review |
When code uses window.title, the message "Deprecated property window.title used.
Please use document.title instead." spews to the JS Console, but negelects to
give any hints as to where this came from. This can be fixed at least for the JS
case.
Reporter | ||
Comment 1•20 years ago
|
||
Some things I'm not sure about here:
|const nsAFlatString msg| -- should this be a different type?
Is it a good idea to loop through the entire JS stack to find a non-native
source? I found when I called window.title, the top of the stack was native,
but the next one down was not (and was the actual JS source point).
On the plus side, it does actually seem to work. :)
Reporter | ||
Comment 2•20 years ago
|
||
This version uses a much nicer macro (thanks timeless), and only checks the top
and next stack entries to non-native sources. This is all that's needed to pick
up JS usage of window.title.
Attachment #163646 -
Attachment is obsolete: true
Reporter | ||
Updated•20 years ago
|
Attachment #163687 -
Flags: superreview?(peterv)
Attachment #163687 -
Flags: review?(gf.mozilla.jst)
Reporter | ||
Updated•20 years ago
|
Attachment #163687 -
Flags: review?(gf.mozilla.jst) → review?(jst)
Comment 3•20 years ago
|
||
Comment on attachment 163687 [details] [diff] [review]
Updated patch
Two problems, this should ideally use a string from a string bundle to be
localizable, and this duplicates a lot of existing code.
I'd suggest making PrintWarningOnConsole() in nsDOMClassInfo.cpp accessable to
more code, and calling that in stead with a new string property.
Updated•20 years ago
|
Attachment #163687 -
Flags: superreview?(peterv)
Attachment #163687 -
Flags: superreview-
Attachment #163687 -
Flags: review?(jst)
Attachment #163687 -
Flags: review-
Reporter | ||
Comment 4•20 years ago
|
||
(In reply to comment #3)
> (From update of attachment 163687 [details] [diff] [review])
> Two problems, this should ideally use a string from a string bundle to be
> localizable,
Hey, not my code - /you/ reviewed the inclusion of this string literal...
> and this duplicates a lot of existing code.
>
> I'd suggest making PrintWarningOnConsole() in nsDOMClassInfo.cpp accessable to
> more code, and calling that in stead with a new string property.
*sigh*
Reporter | ||
Comment 5•20 years ago
|
||
I don't have time to go around making other people's code perfect, sorry.
Assignee: silver → general
Comment 6•20 years ago
|
||
could some of this line detection be used over in bug 261337 ?
Comment 7•17 years ago
|
||
To debug Firebug I have to dump every error message. Since this warning has no line information I cannot find out where it comes from.
Whiteboard: [firebug-p3]
Updated•15 years ago
|
Assignee: general → nobody
QA Contact: ian → general
Comment 8•15 years ago
|
||
does this warning still throw? Can we close this?
Assignee | ||
Updated•12 years ago
|
Component: DOM: Mozilla Extensions → DOM
Comment 9•11 years ago
|
||
I tested this and the warning is not thrown anymore. This should be closed.
Comment 10•6 years ago
|
||
https://bugzilla.mozilla.org/show_bug.cgi?id=1472046
Move all DOM bugs that haven’t been updated in more than 3 years and has no one currently assigned to P5.
If you have questions, please contact :mdaly.
Priority: -- → P5
Assignee | ||
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
Updated•4 years ago
|
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → INVALID
You need to log in
before you can comment on or make changes to this bug.
Description
•