DescriptionOn Firefox and Safari, but not Chrome, DOMException is not instanceof
Error. Furthermore, on Safari the prototype of DOMException does not
have an overridden .constructor property. This meant that the taming
membrane would consider it to be a plain record and tame it as such.
With these changes, the taming membrane now tames a DOMException as
an Error. (It cannot be copied as a DOMException for two reasons:
the DOMException ctor is inert, and DOMException is a funky host
object in some ways, such that whitelisting it is possibly inadvisable.)
* Taming membrane's copyBuiltin tames DOMException as Error.
* Taming membrane tries copyBuiltin before failing if directConstructor
returns undefined.
* Both implementations of directConstructor will return undefined
instead of BASE_OBJECT_CONSTRUCTOR in the case where the object
inherits .constructor == Object.prototype from a distant ancestor
rather than its direct prototype.
* Added test for taming of DOMException.
* Removed workarounds in es53-test-scan-guest.js for this problem
(which hid it on Firefox but not on Safari).
Incidental changes:
* ES5/3 directConstructor will now use Object.getPrototypeOf if
available rather than resorting to (ES3-compatible) temporary
deletion of properties.
* Remove nonfunctional and unnecessary "makeCallable" from
the definition of the "directAccess" object.
@r5559
Patch Set 1 #
MessagesTotal messages: 3
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||