Open Bug 1452011 Opened 7 years ago Updated 2 years ago

XPIDL parser should probably reject [noscript] in non-[builtinclass] interface

Categories

(Core :: XPCOM, enhancement)

enhancement

Tracking

()

Tracking Status
firefox61 --- affected

People

(Reporter: xidorn, Unassigned)

References

(Depends on 1 open bug)

Details

It seems that it currently rejects [infallible] attributes in that case. I don't think [noscript] can be implemented by script... so probably they should be banned from non-[builtinclass] interfaces as well.
> I don't think [noscript] can be implemented by script... Sure. Trying to call it on the C++ side on a JS implementation will return a failure nsresult. That wasn't an option with [infallible], obviously. ;) While it seems like it would be nice if people were clear on whether they expect their interface to be implemented in JS or not, one can sort of imagine a noscript API that you try first and if that fails try a scriptable API that might still do (part of?) what you want...
I could imagine some kind of "noscriptish" property that does the current fallback, and then a stronger noscript property that bans non-[builtinclass] interfaces. I don't know if that's worth the trouble. At a certain point, you might be better off deCOMing things.
Depends on: 1539495
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.