Subj : Re: JS_ResumeRequest puzzle To : Bob Kline From : Brendan Eich Date : Wed Mar 17 2004 12:06 pm Bob Kline wrote: > Brendan Eich wrote: > >> JS_ResumeRequest takes a second saveDepth parameter, of type >> jsrefcount, that you declare locally and set beforehand to the return >> value of JS_SuspendRequest. > > > How about the other question? Is it OK to replace JS_SuspendRequest > with JS_EndRequest and JS_ResumeRequest with JS_BeginRequest? Only if you never nest requests on a context. If you do nest (and often with large piles of embedding host code and JS native methods that call into the host code, where the host code also of course calls the JS API to compile, call, execute, evaluate, etc., it's hard to tell), then you need to suspend all requests, not just the top one. So in general, use suspend/resume. /be .