I've been thinking about this some more, and the requirement that the
caller be able to tell apart the NSResolver returning a String and some
other object that has a toString() method is actually a bit of a pain.
For example, in Gecko a C++ caller into this API would just get back a
string object (basically the result of |returnValue + ""| or so).
Telling where this string came from would actually be pretty difficult
in this case.
Things get even worse if you allow non-JS implementations of NSResolver,
because at that point the requirement doesn't even make sense.
Is there a strong reason not to just stringify whatever the NSResolver
returns? It seems like for compliant NSResolvers this won't make a
difference, right?
-Boris
- [selectors-api] NSResolver question: non-String returns Boris Zbarsky
-