Closed
Bug 47402
Opened 25 years ago
Closed 25 years ago
Javascript crashes browser on incorrect method reassignment to base classes
Categories
(Core :: JavaScript Engine, defect, P3)
Core
JavaScript Engine
Tracking
()
People
(Reporter: hand, Assigned: rogerl)
Details
(Keywords: crash)
Attachments
(1 file)
|
647 bytes,
application/octet-stream
|
Details |
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0)
BuildID: 200072920
It assumes that the node is a Document where that may not necessarily be true
and tries to call its getElementById method which it does not have.
Reproducible: Always
Steps to Reproduce:
1. Do the following assignment where TypeA and TypeB are built in types.
TypeA.prototype.oldMethod = TypeB.prototype.method
2. Call oldMethod of an object of TypeA that is not also of TypeB
3. Run the javascript
Actual Results: Crash!
Expected Results: It should provide a sensible error message. One possibility
is to prevent the assignment in the first place. (Which is good for catching
errors - but loses some functionality that I find use for)
The best option is to display a Javascript error when the attempt to call a non-
existant method occurs.
Comment 2•25 years ago
|
||
Confirmed on linux 2000080108. Changing OS/Plat to all. It gives me an XUL alert
before crashing. Adding crash keyword.
Comment 3•25 years ago
|
||
It seems likely to me that this is a bug in the DOM's reflection objects and not
in the JS engine.
The XUL alert is to demonstrate that the javascript has started executing
before mozilla crashes and show the success of the original method call.
Comment 5•25 years ago
|
||
Indeed, this is a dup of one of jst's bugs.
/be
*** This bug has been marked as a duplicate of 33304 ***
Status: NEW → RESOLVED
Closed: 25 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•