Skip to content
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

Remove try/catch in actor.postMessage #1584

Merged
merged 1 commit into from
Mar 11, 2016
Merged

Conversation

mourner
Copy link
Member

@mourner mourner commented Oct 2, 2015

Makes actor.postMessage optimizable by V8 and also makes sure we see any errors thrown on postMessage. Not tested in IE yet.

  • actually test on IE!

@mourner
Copy link
Member Author

mourner commented Oct 2, 2015

This is also the reason why we didn't notice broken transferables after buffer refactoring: 7e9ff51

@jfirebaugh
Copy link
Contributor

Well, WTF... I am now testing on IE11 and unable to reproduce any issue with Worker.postMessage and transferables. Using the same test case that I tried earlier, IE 11.0.9600.17801 prints "postMessage with array transfer 0".

I'm not sure if MS patched this or what.

@mourner
Copy link
Member Author

mourner commented Oct 2, 2015

Wow. So apparently it does support transferring at least one object? Also, is the Win version the same?

@mourner
Copy link
Member Author

mourner commented Oct 5, 2015

@jfirebaugh OK I'm now trying to recall a conversation about IE11 transferable objects with a friend — as far as I remember, IE11 doesn't support transferable array buffers and the second argument, and it's there for a different purpose — for an array of MessagePort objects, whatever that means.

@jfirebaugh
Copy link
Contributor

jfirebaugh commented Oct 5, 2015 via email

@mourner
Copy link
Member Author

mourner commented Oct 5, 2015

@jfirebaugh don't have a Windows machine handy atm.

@mourner
Copy link
Member Author

mourner commented Oct 7, 2015

Summoning @danzel here who did the original IE11 PR, any thoughts?

@danzel
Copy link
Contributor

danzel commented Oct 7, 2015

Uh yeah this is weird. MS have been known to patch things in IE11 occasionally though.

The only notes on the original issue I have are here:
#95 (comment)

But it looks like it doesn't cause an error any more from my limited testing, so yay? :)

The MS docs on this are a bit trash for this:
https://msdn.microsoft.com/en-us/library/hh673568(v=vs.85).aspx
Clicking 'postMessage' on here links to the window.postMessage docs, they don't have a set for webWorker.postMessage.

@lucaswoj
Copy link
Contributor

lucaswoj commented Feb 9, 2016

@mourner @jfirebaugh Do we still want to pursue these changes?

@mourner
Copy link
Member Author

mourner commented Feb 9, 2016

@lucaswoj I don't know, IE is a weird beast.

@lucaswoj
Copy link
Contributor

As far as I can tell, all the postMessage quirks discussed in this thread apply to IE10 but not IE11. We only need to support IE11+.

I'm testing this branch on our Windows machine now and everything looks good!

Anything else you'd like to see before 🚢 this @mourner @jfirebaugh?

@jfirebaugh
Copy link
Contributor

Nope. If it works, :shipit:.

@lucaswoj lucaswoj force-pushed the no-message-try-catch branch from a1060a3 to c806e5a Compare March 11, 2016 20:32
@lucaswoj lucaswoj merged commit c806e5a into master Mar 11, 2016
@lucaswoj lucaswoj deleted the no-message-try-catch branch March 11, 2016 20:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants