Closed
Bug 724772
Opened 13 years ago
Closed 7 years ago
make setTimeout / setInterval globals
Categories
(Add-on SDK Graveyard :: General, defect, P2)
Add-on SDK Graveyard
General
Tracking
(Not tracked)
RESOLVED
INCOMPLETE
People
(Reporter: irakli, Assigned: evold)
References
Details
Attachments
(2 files)
No description provided.
Updated•13 years ago
|
Priority: -- → P2
Reporter | ||
Updated•13 years ago
|
Assignee: nobody → rFobic
Assignee | ||
Updated•12 years ago
|
Assignee: rFobic → evold
Assignee | ||
Comment 1•12 years ago
|
||
Pointer to Github pull-request
Assignee | ||
Updated•12 years ago
|
Attachment #712396 -
Flags: review?(rFobic)
Assignee | ||
Updated•12 years ago
|
OS: Mac OS X → All
Hardware: x86 → All
Reporter | ||
Comment 2•12 years ago
|
||
Only issue I have with this is that other users of loader will get surprised that they won't have these timer functions making code reuse between add-ons and firefox features harder.
I could probably convinced that this is ok, but so far I'm not.
Alternative could be to make timers part of loader, although that feels like an overkill to me.
This makes me wonder how harmony modules are going to go about it. At first I remember they were supposed to be in the module, but later it was reconsidered. Eddy should know it better, I'd like to know if in ES.next timer functions are globals in module scope and what happens with registered timers if loader is destroyed (Although I don't think it can be destroyed in ES.next).
Flags: needinfo?(ejpbruel)
Reporter | ||
Comment 3•12 years ago
|
||
Comment on attachment 712396 [details]
Pointer to Github pull request: https://github.com/mozilla/addon-sdk/pull/780/files
We can re-request review if we decide it's a way to go, but first lets have a conversation.
Attachment #712396 -
Flags: review?(rFobic) → review-
Assignee | ||
Updated•12 years ago
|
Assignee: evold → nobody
Assignee | ||
Comment 4•12 years ago
|
||
Pointer to Github pull-request
Assignee | ||
Updated•12 years ago
|
Attachment #791759 -
Flags: review?(rFobic)
Assignee | ||
Updated•12 years ago
|
Assignee: nobody → evold
Assignee | ||
Comment 5•12 years ago
|
||
I'm guessing you meant to needinfo me Irakli?
Flags: needinfo?(ejpbruel)
Reporter | ||
Comment 6•12 years ago
|
||
Comment on attachment 791759 [details]
Pointer to Github pull request: https://github.com/mozilla/addon-sdk/pull/1184
I did meant needinfo on Eddy since he was involved in implementing ES6 modules so he should be aware what's the plan for the timer functions there. Erik I'm sorry to be rejecting this once again, but my last comments still stand, I don't want to expose globals that standard is not going to be exposing and last decision I was aware of was to not include timers into module global scope, since it's not even part of JS but rather part of DOM APIs. Plan was to make them importable in form of standard built-in module that browsers will expose. If this still a plan I would rather not expose timers since it will only make it harder for us to switch to standard modules when they'll finally become available.
Could you please explain why you think it's important before doing any further work so we avoid spending more of your time.
Attachment #791759 -
Flags: review?(rFobic) → review-
Reporter | ||
Updated•12 years ago
|
Flags: needinfo?(evold)
Flags: needinfo?(ejpbruel)
Reporter | ||
Comment 7•12 years ago
|
||
Comment on attachment 791759 [details]
Pointer to Github pull request: https://github.com/mozilla/addon-sdk/pull/1184
Thanks!
It would be great to test unload as well though.
Attachment #791759 -
Flags: review- → review+
Reporter | ||
Comment 8•12 years ago
|
||
Comment on attachment 791759 [details]
Pointer to Github pull request: https://github.com/mozilla/addon-sdk/pull/1184
Oops I mixed up tabs, putting back r- for reasons commented earlier
Attachment #791759 -
Flags: review+ → review-
Assignee | ||
Comment 9•12 years ago
|
||
Alea iacta est
NodeJS already supports these as globals, and makes no mention of the option to require('timers'), so I don't think there is any need for discussion.
Anyhow I don't know why I'm being needinfo'd..
Flags: needinfo?(evold)
Comment 10•12 years ago
|
||
I just talked to jorendorff. He said he will comment on this, so I'm clearing the needinfo flag.
Flags: needinfo?(ejpbruel)
Comment 11•12 years ago
|
||
(In reply to Irakli Gozilalishvili [:irakli] [:gozala] [@gozala] from comment #2)
> [...] I'd like to know if in ES.next
> timer functions are globals in module scope and what happens with registered
> timers if loader is destroyed (Although I don't think it can be destroyed in
> ES.next).
In ES.next, modules can see all the globals.
So if your global object has a setTimeout function, sure, modules loaded into that global can see that. But if not, you would have to import it from somewhere in order to get access to it; the module spec won't say anything special about setTimeout in particular.
Assignee | ||
Comment 12•12 years ago
|
||
Comment on attachment 791759 [details]
Pointer to Github pull request: https://github.com/mozilla/addon-sdk/pull/1184
re-requesting a review now that we have feedback.
Attachment #791759 -
Flags: review- → review?(rFobic)
Reporter | ||
Comment 13•12 years ago
|
||
Comment on attachment 791759 [details]
Pointer to Github pull request: https://github.com/mozilla/addon-sdk/pull/1184
Erik, it feels like this does not really belongs in a timer domain. I think it would make most sense to move timers module and make it loadable either as js module or JSM.
I think it would make sense to add an option like `globalTimers` to a loader & unless it's `false` load timers and expose them as globals.
Attachment #791759 -
Flags: review?(rFobic) → review-
Assignee | ||
Comment 14•11 years ago
|
||
(In reply to Irakli Gozalishvili [:irakli] [:gozala] [@gozala] from comment #13)
> Comment on attachment 791759 [details]
> Pointer to Github pull request:
> https://github.com/mozilla/addon-sdk/pull/1184
>
> Erik, it feels like this does not really belongs in a timer domain. I think
> it would make most sense to move timers module and make it loadable either
> as js module or JSM.
>
> I think it would make sense to add an option like `globalTimers` to a loader
> & unless it's `false` load timers and expose them as globals.
This is the last change that you want? I'd like the next time that I rewrite this to be the last..
Flags: needinfo?(rFobic)
Reporter | ||
Comment 15•11 years ago
|
||
(In reply to Erik Vold [:erikvold] [:ztatic] from comment #14)
> (In reply to Irakli Gozalishvili [:irakli] [:gozala] [@gozala] from comment
> #13)
> > Comment on attachment 791759 [details]
> > Pointer to Github pull request:
> > https://github.com/mozilla/addon-sdk/pull/1184
> >
> > Erik, it feels like this does not really belongs in a timer domain. I think
> > it would make most sense to move timers module and make it loadable either
> > as js module or JSM.
> >
> > I think it would make sense to add an option like `globalTimers` to a loader
> > & unless it's `false` load timers and expose them as globals.
>
> This is the last change that you want? I'd like the next time that I
> rewrite this to be the last..
Erik I can promise next review will be positive. I just would like to reduce dependencies between
different components as such dependencies will be hard to deal with when switching to multiprocess
architecture.
It maybe best to hold on with this changes until we're done with other loader changes so we'll have
more clear picture.
clear
Flags: needinfo?(rFobic)
Assignee | ||
Comment 16•10 years ago
|
||
I wanted to try to take a look at this, but I'm not sure that I will be able to now.
Assignee: evold → nobody
Assignee | ||
Updated•10 years ago
|
Blocks: sdk/timers
Comment 18•7 years ago
|
||
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → INCOMPLETE
You need to log in
before you can comment on or make changes to this bug.
Description
•