[Extensions Bindings] Simplify message option parsing
Now that we create a new V8 object when parsing an argument to V8 (see crrev.com/37b1fa8a), we don't need to do all the double-checking for validity and script throwing errors in messaging_util::ParseMessageOptions. Instead, we can just know that the value is safe to use. Update messaging_util::ParseMessageOptions and all its callsites to be simpler. Additionally, set the prototype of the parsed object in ArgumentSpec to null to avoid tricky getters/setters on the Object.prototype, which could be hit if the argument was missing an optional property. Bug: 653596 Change-Id: I3f53a3973d9c5a833799248b50832b55bac2792c Reviewed-on: https://chromium-review.googlesource.com/794451 Commit-Queue: Devlin <rdevlin.cronin@chromium.org> Reviewed-by:Jeremy Roman <jbroman@chromium.org> Cr-Commit-Position: refs/heads/master@{#521782}
Showing
Please register or sign in to comment