Open Bug 1056325 Opened 10 years ago Updated 2 years ago

Support [StoreInSlot] for JS-implemented WebIDL

Categories

(Core :: DOM: Core & HTML, defect)

defect

Tracking

()

People

(Reporter: mccr8, Unassigned)

References

(Blocks 1 open bug)

Details

Boris says this could be made to work somehow, but currently we hit an exception in defineJitInfo: assert(not alwaysInSlot or movable) The cache-clearing stuff in bug 963382 will also need to be updated to support this.
The basic problem is that [StoreInSlot] can't be used on throwing things right now. The parser enforces that it's not used with [Throws], but all JS-implemented webidl is throwing, albeit not known as such to the parser. Now the thing is, the JS-implemented stuff is throwing in a "non-semantic" way. That is, it throws just because JS can always throw, not because it's specced to (though some of it may be specced as well). Maybe the right thing to do is to actually capture the distinction, as follows: 1) Flag on JS-implemented stuff whether the throwing it does is semantic or not. We kinda have that for non-JS-implemented stuff too: it can throw during value wrapping, but we don't let that affect things like movability. 2) For non-semantic throwing, do NOT propagate out thrown exceptions. That way, assuming we have decent test coverage, we'd notice when someone forgets to mark a JS-implemented thing as [Throws]. 3) Non-semantic throwing should not affect movability decisions in jitinfo. 4) Audit our JS-implemented stuff (at least in terms of comparing its IDL to spec algorithms), because I doubt we have decent test coverage.
Component: DOM → DOM: Core & HTML
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.