[cleanup] Fix deprecated use of Value::ToObject
Value::ToObject(Isolate*) is deprecated because it doesn't force the user to check whether a result was actually returned. This changes MessageChannel::Create to use the Context version and calls FromMaybe on the result. This will return an empty Local if ToObject throws which would happen if its input was undefined or null (https://tc39.github.io/ecma262/#sec-toobject). Bug: v8:7279, v8:8238 Change-Id: I51c48350d1c50507d2dff6ef5c5a97cf2b03ddb5 Reviewed-on: https://chromium-review.googlesource.com/c/1344100 Commit-Queue: Dan Elphick <delphick@chromium.org> Reviewed-by:Kentaro Hara <haraken@chromium.org> Cr-Commit-Position: refs/heads/master@{#610646}
Showing
Please register or sign in to comment