Quantcast

Removing JS_CallOnce

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Removing JS_CallOnce

Ms2ger
Hey all,

JSAPI contains a JS_CallOnce function, documented as follows:

> The first call to JS_CallOnce by any thread in a process will call
> 'func'. Later calls to JS_CallOnce with the same JSCallOnceType
> object will be suppressed.
>
> Equivalently: each distinct JSCallOnceType object will allow one
> JS_CallOnce to invoke its JSInitCallback.

I believe the implementation of this function is now the only code in
SpiderMonkey that depends on NSPR.

As jandem said:

> It's a pretty weird API for something that has little to do with JS
> (embedders have other ways to do it), and it's not used in Firefox.

Any objections to removing the API, and dropping the dependency on NSPR
once and for all?

Thanks
Ms2ger
_______________________________________________
dev-tech-js-engine mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-js-engine
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Removing JS_CallOnce

Jason Orendorff-2
On Tue, Aug 23, 2016 at 8:27 AM, Ms2ger <[hidden email]> wrote:

> Any objections to removing the API, and dropping the dependency on NSPR
> once and for all?
>

Nope. Kill it.

\o/

-j
_______________________________________________
dev-tech-js-engine mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-js-engine
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Removing JS_CallOnce

Terrence Cole-3
With fire or nearest workable alternative.

\o/

On Tue, Aug 23, 2016 at 10:09 AM, Jason Orendorff <[hidden email]>
wrote:

> On Tue, Aug 23, 2016 at 8:27 AM, Ms2ger <[hidden email]> wrote:
>
> > Any objections to removing the API, and dropping the dependency on NSPR
> > once and for all?
> >
>
> Nope. Kill it.
>
> \o/
>
> -j
> _______________________________________________
> dev-tech-js-engine mailing list
> [hidden email]
> https://lists.mozilla.org/listinfo/dev-tech-js-engine
>
_______________________________________________
dev-tech-js-engine mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-js-engine
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Removing JS_CallOnce

Andreas Gal-2

We are dropping the dependency on NSPR for SM? I didn’t believe I would live to see that. Life feels complete now.

Andreas

> On Aug 23, 2016, at 10:53 AM, Terrence Cole <[hidden email]> wrote:
>
> With fire or nearest workable alternative.
>
> \o/
>
> On Tue, Aug 23, 2016 at 10:09 AM, Jason Orendorff <[hidden email]>
> wrote:
>
>> On Tue, Aug 23, 2016 at 8:27 AM, Ms2ger <[hidden email]> wrote:
>>
>>> Any objections to removing the API, and dropping the dependency on NSPR
>>> once and for all?
>>>
>>
>> Nope. Kill it.
>>
>> \o/
>>
>> -j
>> _______________________________________________
>> dev-tech-js-engine mailing list
>> [hidden email]
>> https://lists.mozilla.org/listinfo/dev-tech-js-engine
>>
> _______________________________________________
> dev-tech-js-engine mailing list
> [hidden email]
> https://lists.mozilla.org/listinfo/dev-tech-js-engine

_______________________________________________
dev-tech-js-engine mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-js-engine
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Removing JS_CallOnce

Mihai Dobrescu
In reply to this post by Ms2ger
On Tuesday, August 23, 2016 at 4:28:00 PM UTC+3, Ms2ger wrote:

> Hey all,
>
> JSAPI contains a JS_CallOnce function, documented as follows:
>
> > The first call to JS_CallOnce by any thread in a process will call
> > 'func'. Later calls to JS_CallOnce with the same JSCallOnceType
> > object will be suppressed.
> >
> > Equivalently: each distinct JSCallOnceType object will allow one
> > JS_CallOnce to invoke its JSInitCallback.
>
> I believe the implementation of this function is now the only code in
> SpiderMonkey that depends on NSPR.
>
> As jandem said:
>
> > It's a pretty weird API for something that has little to do with JS
> > (embedders have other ways to do it), and it's not used in Firefox.
>
> Any objections to removing the API, and dropping the dependency on NSPR
> once and for all?
>
> Thanks
> Ms2ger

I love you!
_______________________________________________
dev-tech-js-engine mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-js-engine
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Removing JS_CallOnce

Steve Fink-4
On 08/23/2016 01:12 PM, Mihai Dobrescu wrote:

> On Tuesday, August 23, 2016 at 4:28:00 PM UTC+3, Ms2ger wrote:
>> Hey all,
>>
>> JSAPI contains a JS_CallOnce function, documented as follows:
>>
>>> The first call to JS_CallOnce by any thread in a process will call
>>> 'func'. Later calls to JS_CallOnce with the same JSCallOnceType
>>> object will be suppressed.
>>>
>>> Equivalently: each distinct JSCallOnceType object will allow one
>>> JS_CallOnce to invoke its JSInitCallback.
>>
>> I believe the implementation of this function is now the only code in
>> SpiderMonkey that depends on NSPR.
>>
>> As jandem said:
>>
>>> It's a pretty weird API for something that has little to do with JS
>>> (embedders have other ways to do it), and it's not used in Firefox.
>>
>> Any objections to removing the API, and dropping the dependency on NSPR
>> once and for all?
>>
>> Thanks
>> Ms2ger
>
> I love you!
>

Note that we're not *quite* there. We have a (very) few other uses of
NSPR lying around still.

By the way, I'm pretty sure I added JS_CallOnce, for a long-dead project
that I never managed to land. I would be happy to see JS_CallOnce die.

_______________________________________________
dev-tech-js-engine mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-js-engine
Loading...