Closed jdm closed 4 years ago
https://searchfox.org/mozilla-central/rev/158bac3df3a1890da55bdb6ffdaf9a7ffc0bfb0a/js/src/jsapi.h#2783-2804
This API takes a JS::AutoFilename argument, and implementing a Rust wrapper around just that type would require duplicating C++ logic in https://searchfox.org/mozilla-central/rev/158bac3df3a1890da55bdb6ffdaf9a7ffc0bfb0a/js/src/jsapi.cpp#5512-5549 which is a waste. Much better to write a small C++ stub that copies the filename string out into a buffer that Rust provides instead.
https://searchfox.org/mozilla-central/rev/158bac3df3a1890da55bdb6ffdaf9a7ffc0bfb0a/js/src/jsapi.h#2783-2804
This API takes a JS::AutoFilename argument, and implementing a Rust wrapper around just that type would require duplicating C++ logic in https://searchfox.org/mozilla-central/rev/158bac3df3a1890da55bdb6ffdaf9a7ffc0bfb0a/js/src/jsapi.cpp#5512-5549 which is a waste. Much better to write a small C++ stub that copies the filename string out into a buffer that Rust provides instead.