[css-houdini-drafts] [css-paint-api] Use of entries in the paint class instances map needs to check that they actually exist (#917)

bzbarsky has just created a new issue for https://github.com/w3c/css-houdini-drafts:

== [css-paint-api] Use of entries in the paint class instances map needs to check that they actually exist ==
https://drafts.css-houdini.org/css-paint-api-1/#invoke-a-paint-callback step 5 does:

> Let paintInstance be the result of get paintClassInstanceMap[|name]|. If paintInstance is null, run the following steps:

But I don't see how the "is null" thing can happen.  Either the entry does not exist (which is different from null, note!) or it does exist and then it's never null.  

This should probably check whether the entry exists, and if not create it and set _paintInstance_ to the entry's new value.  Otherwise, if the entry exists, set _paintInstance_ to its value.

Please view or discuss this issue at https://github.com/w3c/css-houdini-drafts/issues/917 using your GitHub account

Received on Thursday, 11 July 2019 17:58:50 UTC