Open
Description
Based on the use of "serialize as a remote value" in the script.evaluate command, it appears that the serialization algorithm has to anticipate abrupt completions. At the moment, however, it is defined as an infallible operation.
For instance, the following script produces a value which presents as a RegExp but whose "flags" property is "poisoned":
Object.defineProperty(/./, 'flags', { get() { throw 0; } });
As currently written, "serialize as a remote value" does not account for this possibility, and it uses the completion record returned by ECMAScript's Get instead of the completion record's [[Value]] field.