Subj : Re: Comment on API: contexts vs runtimes To : Brendan Eich From : Alain Frisch Date : Tue May 24 2005 05:25 pm Brendan Eich wrote: > The API is almost ten years old, and it generally can't be changed > incompatibly. Adding JSRuntime* parameterized APIs corresponding to > JSContext* parameterized ones is possible, but not always necessary. > There's no point adding code bloat just for symmetry. Agreed. A note in the API documentation to explain how the context is used and whether it is ok to use another context from the same runtime would be useful, though. > Which APIs do you have in mind, in particular? The rooting ones > actually do add value when passed a JSContext*, by reporting out of > memory errors using cx->errorReporter. The particular function was RemoveRoot. I didn't find the RemoveRootRT variant in the doc, and had to check the implementation to know whether it was ok to use it in my situation. -- Alain .