changed MAP_IS_NATIVE to allow for objects that have their own jsObjectOps but still use the slots in the 'normal' manner (this is necessary for XPConnect) - same change as made on SpiderMonkey140_BRANCH

This commit is contained in:
jband%netscape.com 1999-02-18 05:36:16 +00:00
Родитель 28e29775fa
Коммит 86940cf070
1 изменённых файлов: 3 добавлений и 2 удалений

Просмотреть файл

@ -142,8 +142,9 @@ struct JSObject {
((JSClass *)JSVAL_TO_PRIVATE(OBJ_GET_SLOT(cx, obj, JSSLOT_CLASS)))
/* Test whether a map or object is native. */
#define MAP_IS_NATIVE(map) ((map)->ops == &js_ObjectOps || \
(map)->ops == &js_WithObjectOps)
#define MAP_IS_NATIVE(map) \
((map)->ops == &js_ObjectOps || \
((map)->ops && (map)->ops->newObjectMap == js_ObjectOps.newObjectMap))
#define OBJ_IS_NATIVE(obj) MAP_IS_NATIVE((obj)->map)
extern JS_FRIEND_DATA(JSObjectOps) js_ObjectOps;