Open
Bug 1449236
Opened 7 years ago
Updated 3 years ago
Use explicitOrInferredName() instead of explicitName() in ThrowUninitializedThis()?
Categories
(Core :: JavaScript Engine, enhancement, P3)
Core
JavaScript Engine
Tracking
()
NEW
| Tracking | Status | |
|---|---|---|
| firefox61 | --- | affected |
People
(Reporter: anba, Unassigned)
References
(Blocks 1 open bug)
Details
We should check if we can use JSFunction::explicitOrInferredName() in ThrowUninitializedThis(), so we can also use inferred class names in the error message.
Example:
---
class Base {}
class C extends Base {
constructor() {
this;
}
}
var D = class extends Base {
constructor() {
this;
}
}
// ReferenceError: must call super constructor before using |this| in C class constructor
try { new C(); } catch (e) { print(e); }
// ReferenceError: must call super constructor before using |this| in anonymous class constructor
try { new D(); } catch (e) { print(e); }
---
With JSFunction::explicitOrInferredName() the second error message would read "must call super constructor before using |this| in D class constructor".
Updated•7 years ago
|
Priority: -- → P3
Updated•3 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•