[Streams] Initialise binding.MessagePort_postMessage to undefined
Some worklet contexts lack MessagePort and so cannot implement tranferable streams. This is detected by looking for the MessagePort_postMessage function on the binding object, which is initialised during context creation. Previously MessagePort_postMessage was only placed on the binding object when it was available, meaning when it was absent the prototype chain was searched for it. Since this could be interfered with by code running on the page, initialise it to undefined instead. BUG=934201 Change-Id: Ic114d92300207f41a8b762457504a4d70009ee34 Reviewed-on: https://chromium-review.googlesource.com/c/1488402Reviewed-by:Yuki Shiino <yukishiino@chromium.org> Reviewed-by:
Yutaka Hirano <yhirano@chromium.org> Commit-Queue: Adam Rice <ricea@chromium.org> Cr-Commit-Position: refs/heads/master@{#635922}
Showing
Please register or sign in to comment