Subj : Re: Comment on API: contexts vs runtimes To : Alain Frisch From : Brendan Eich Date : Mon May 23 2005 11:56 am Alain Frisch wrote: > Hello, > > Many functions of SpiderMonkey's API operates on contexts, where only > the runtime is actually needed. For instance, it seems ok to call > RemoveRoot with any context in the same runtime as for the corresponding > AddRoot call. In my opinion, if this kind of information is stable > enough, it should be reflected either in the API or in its > documentation, since it makes the life of users simpler. 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. 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. /be .