Confirmed users
3,339
edits
(→Remove shortids and tinyids: FIXED) |
m (→Replace jschar with char16_t: Fixed by bug 1063962) |
||
| Line 58: | Line 58: | ||
Most of the JSAPI is old, C-style <code>JS_*</code> functions. These functions' APIs often aren't particularly simple, clean ways to implement those behaviors. A pleasant C++ API that reads more simply, and doesn't necessarily expose operations through hundreds of freestanding methods, would be nice. We've incrementally introduced such APIs at lower levels -- see for example <code>JS::Value</code> -- but we haven't done anything yet at higher levels. Mostly this is a matter of inertia, and of API design being a bunch of hard work that's off the critical path for Firefox. We'd probably welcome help from embedders and the like with special interest and expertise in designing nice, clean C++ APIs for this stuff. (Do note, however, that we still require an exception-safe API -- true/false return values to indicate success will still probably be necessary.) | Most of the JSAPI is old, C-style <code>JS_*</code> functions. These functions' APIs often aren't particularly simple, clean ways to implement those behaviors. A pleasant C++ API that reads more simply, and doesn't necessarily expose operations through hundreds of freestanding methods, would be nice. We've incrementally introduced such APIs at lower levels -- see for example <code>JS::Value</code> -- but we haven't done anything yet at higher levels. Mostly this is a matter of inertia, and of API design being a bunch of hard work that's off the critical path for Firefox. We'd probably welcome help from embedders and the like with special interest and expertise in designing nice, clean C++ APIs for this stuff. (Do note, however, that we still require an exception-safe API -- true/false return values to indicate success will still probably be necessary.) | ||
=== Replace <code>jschar</code> with <code>char16_t</code> === | === <strike>Replace <code>jschar</code> with <code>char16_t</code></strike> (FIXED) === | ||
Recent changes mean that SpiderMonkey's historical <code>jschar</code> type is identical to <code>char16_t</code> (an emulated <code>typedef</code> in older compilers). We should cut out the middle man and just use <code>char16_t</code> directly. This is mostly a large search-and-replace operation on Gecko and JSAPI headers. | Recent changes mean that SpiderMonkey's historical <code>jschar</code> type is identical to <code>char16_t</code> (an emulated <code>typedef</code> in older compilers). We should cut out the middle man and just use <code>char16_t</code> directly. This is mostly a large search-and-replace operation on Gecko and JSAPI headers. | ||
* Fixed by {{bug|1063962}} | |||
=== Replace <code>const char*</code> with <code>const char16_t*</code> === | === Replace <code>const char*</code> with <code>const char16_t*</code> === | ||