GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
Already on GitHub? Sign in to your account
No description provided.
You can use this._earlyMessages.length = 0 to clear an array.
this._earlyMessages.length = 0
As said before, we should try to uniform events and messages to have one array, and therefore simplify the code above about queue, removing the curry.
You removed _earlyEvents in favour of _earlyMessages, I wonder if is there any specific reason? In my mind "messages" are "events" with type "message", so sounds more clear to me have _earlyEvents. However I know that internally we do some mess, that's why I'm asking what makes you decided to use _earlyMessages instead.
Notice also that _earlyEvents was already used, and we should avoid to replace code if it's not really needed. Of course if it's needed – e.g. it's more self-explained – it's welcome :)
Agreed -- 'message' is considered a type of 'event' -- changing back to only _earlyEvents
The comment should be a bit more explicative.
Don't mix single quotes with double quotes: we should be consistent in the file, so use what the file use (most).
I think it's fine, I reject the review mainly because as you said we can probably make the code easier to read, removing some complexity. But the approach is good.
Why the parenthesis?
Good call, this was from a previous change
r+ if all test passes – please, have a check on fennec too.
A couple of comments, but nothing special, more curiosity than other, it's up to you decide to use _earlyMessages rather than _earlyEvents if you think there is a good reason to change the name of the previous array.
Allow page-workers' postMessage to be queued, remove issue from docs
Merge pull request #852 from jsantell/page-worker-postMessage-queue-7…
Fix Bug 757612 - page-worker postMessage has a timing issue, a=@ZER0
Note this was for: