mozilla :: #jsapi

12 Aug 2017
14:48jandemjorendorff: posted a ctypes patch, curious what you think - bug 1389776
14:48firebot ASSIGNED, Stop using getter/setter ClassOps in CTypes code
14:48jorendorffsounds pretty great
14:49jandemthe unwrapping is the main downside I think
14:49jandemwe could make all CData objects proxies.. but that has a lot more overhead
14:49jandemand is a lot more work
14:55jorendorffTrying to remember. Other CData objects work off getters and setters on the prototype chain, IIRC, which seems pretty nice.
14:58jorendorffthere are 780 lines of error-throwing code in this file
15:00jandemyeah i wanted to avoid adding an indexed getter/setter for each index in [0, length)
15:01jorendorffI didn't mean that arrays should be like that
15:01jorendorffjust that I agree that changing other CData objects isn't worth it
15:02jandemhm i wonder if we could put the proxy on the proto chain
15:02jandemmight be harder to do
15:13evilpiejandem: btw I think it might be possible to special case array_length and not have it on the shape at all
15:13evilpieWe already have code for it, it might be possible to extend that
15:14jandemevilpie: good point
15:17jandemevilpie: not sure yet if I'll work on this soon. It seems important enough but it's a big change
15:17jandemfirst i want to remove the getProperty/setProperty ClassOps because they complicate a lot of things in this area
15:18jandemi hope for NPAPI we can use the same proxy trick as I have for CTypes
15:18jandemthen there will be some XPConnect classes left :/
19:47nbpquote of the day: "In "
19:47nbpRust, you can propagate an error to the caller with a
19:47nbpsingle character, which is shorter than the code you
19:47nbpwould require to actually ignore the error.
13 Aug 2017
No messages
Last message: 9 days ago