-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Need a way to inject the nextTick
implementation
#44
Comments
This makes sense. Just to make sure, neither the In any case, there is actually already a |
If I can set |
A settable I'll wait for @kriskowal to weigh in before committing anything though, since I don't understand all the security guarantees Q provides enough to know whether a settable |
Unfortunately there is no clean way to detect the addon sdk environment. Since The function could be cached on first use to avoid security implications if that helps. |
I would prefer for the Bear in mind that this implementation of the Q interface does not make security guarantees. It just strives to behave identically to a hypothetical secure implementation like ref_send or makeQ. It is intended to pave the way, not be the way. That is, while it does make a lot of guarantees about the order of events (which are good for robustness in general), it does not guarantee that mutually suspicious programs could share the Q interface or share promise objects without fear of interference. To do so, it would have to freeze a lot more. This is a tricky situation. @cadorn, does the MessageChannel implementation of |
@kriskowal injection is indeed the way to go and that will be available in future as we have more intelligent loaders but You can say; just patch The addon-sdk exposes To prevent replacing the There are also cases when you want more control over I suppose if we decide against a one-time settable |
@cadorn Does the addon runtime provide a |
@kriskowal No. They may if it becomes a commonjs spec though at which point it could be used instead of The problem is they want lean builds to generate addons that only contain what is needed. If using If we don't want to make changes to
This is fine for now but will not fly longer term. |
@domenic |
@Yaffle Yes it does, although of course IE10 has native |
IE10 implemented setImmediate? Neato. Let’s use it. |
I am using Q in mozilla addon sdk which parses for static requires in order to authorize loading a module dependency from a module.
Problem is
serverSideRequire("event-queue")
which is not detected (as indended).The best solution that does not interfere with the current requirements seems to be injecting the
nextTick
implementation.Could we add something like Q.nextTick which I can set externally and use that over fallbacks?
The text was updated successfully, but these errors were encountered: