mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-24 11:27:49 +00:00
bug 580128 - Define Error constructor in the sealed global for CTypes. r=jst/mrbkap/gal
This commit is contained in:
parent
9179a39396
commit
61df9ba9bc
@ -123,11 +123,13 @@ InitAndSealCTypesClass(JSContext* cx, JSObject* global)
|
||||
!JS_SetCTypesCallbacks(cx, JSVAL_TO_OBJECT(ctypes), &sCallbacks))
|
||||
return false;
|
||||
|
||||
// Seal up Object, Function, and Array and their prototypes. (This single
|
||||
// object instance is shared amongst everyone who imports the ctypes module.)
|
||||
// Seal up Object, Function, Array and Error and their prototypes. (This
|
||||
// single object instance is shared amongst everyone who imports the ctypes
|
||||
// module.)
|
||||
if (!SealObjectAndPrototype(cx, global, "Object") ||
|
||||
!SealObjectAndPrototype(cx, global, "Function") ||
|
||||
!SealObjectAndPrototype(cx, global, "Array"))
|
||||
!SealObjectAndPrototype(cx, global, "Array") ||
|
||||
!SealObjectAndPrototype(cx, global, "Error"))
|
||||
return false;
|
||||
|
||||
// Finally, seal the global object, for good measure. (But not recursively;
|
||||
|
Loading…
x
Reference in New Issue
Block a user