I misunderstood the spec when I implemented this, so we either return a "value" key with the result in case of success or the error object as the body in case of error. We should always add a "value" key to the body and set it with either the result or the error object.
Last step is "send a response", which is the same as when there's no error.
Created attachment 321190 [details]
Comment on attachment 321190 [details]
Committed r222255: <http://trac.webkit.org/changeset/222255>