Open
Bug 1620720
Opened 5 years ago
Updated 5 years ago
Consider having MSG_METHOD_THIS_DOES_NOT_IMPLEMENT_INTERFACE use the same prefix as most binding methods
Categories
(Core :: DOM: Bindings (WebIDL), task, P2)
Core
DOM: Bindings (WebIDL)
Tracking
()
NEW
People
(Reporter: bzbarsky, Unassigned)
References
(Blocks 1 open bug)
Details
Right now it looks like this:
'getElementById' called on an object that does not implement interface Document.
Reporter | ||
Comment 1•5 years ago
|
||
And for the getter case:
'get URL' called on an object that does not implement interface Document.
If we want to do this, then in dom::ThrowInvalidThis
we can:
- Check whether
funcNameStr
starts with"get "
and if so strip it off and append " getter" instead. - If not, do the same thing with
"set "
and" setter"
. - Change the call to:
JS_ReportErrorNumberUC(aCx, GetErrorMessage, nullptr,
static_cast<unsigned>(errorNumber), ifaceName.get(), funcNameStr.get(),
ifaceName.get());
- Change the string in Errors.msg to:
MSG_DEF(MSG_METHOD_THIS_DOES_NOT_IMPLEMENT_INTERFACE, 3, false, JSEXN_TYPEERR, "{0}.{1}: \"this\" value does not implement interface {1}.")
or so.
Type: defect → task
Priority: -- → P2
Updated•5 years ago
|
Severity: normal → N/A
You need to log in
before you can comment on or make changes to this bug.
Description
•