mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 886829 - In-source comments incorrectly say JSClass::finalizer is mandatory r=billm
--HG-- extra : rebase_source : d01ba99257b2a392d332f56dfc655f6439462c1b
This commit is contained in:
parent
61e0c743b1
commit
262546d6b1
@ -2795,7 +2795,7 @@ struct JSClass {
|
||||
const char *name;
|
||||
uint32_t flags;
|
||||
|
||||
/* Mandatory non-null function pointer members. */
|
||||
/* Mandatory function pointer members. */
|
||||
JSPropertyOp addProperty;
|
||||
JSDeletePropertyOp delProperty;
|
||||
JSPropertyOp getProperty;
|
||||
@ -2803,9 +2803,9 @@ struct JSClass {
|
||||
JSEnumerateOp enumerate;
|
||||
JSResolveOp resolve;
|
||||
JSConvertOp convert;
|
||||
JSFinalizeOp finalize;
|
||||
|
||||
/* Optionally non-null members start here. */
|
||||
/* Optional members (may be null). */
|
||||
JSFinalizeOp finalize;
|
||||
JSCheckAccessOp checkAccess;
|
||||
JSNative call;
|
||||
JSHasInstanceOp hasInstance;
|
||||
|
@ -207,9 +207,9 @@ typedef void
|
||||
JSEnumerateOp enumerate; \
|
||||
JSResolveOp resolve; \
|
||||
JSConvertOp convert; \
|
||||
FinalizeOp finalize; \
|
||||
\
|
||||
/* Optionally non-null members start here. */ \
|
||||
FinalizeOp finalize; \
|
||||
JSCheckAccessOp checkAccess; \
|
||||
JSNative call; \
|
||||
JSHasInstanceOp hasInstance; \
|
||||
|
@ -2402,6 +2402,15 @@ js_InitClass(JSContext *cx, HandleObject obj, JSObject *protoProto_,
|
||||
{
|
||||
RootedObject protoProto(cx, protoProto_);
|
||||
|
||||
/* Assert mandatory function pointer members. */
|
||||
JS_ASSERT(clasp->addProperty);
|
||||
JS_ASSERT(clasp->delProperty);
|
||||
JS_ASSERT(clasp->getProperty);
|
||||
JS_ASSERT(clasp->setProperty);
|
||||
JS_ASSERT(clasp->enumerate);
|
||||
JS_ASSERT(clasp->resolve);
|
||||
JS_ASSERT(clasp->convert);
|
||||
|
||||
RootedAtom atom(cx, Atomize(cx, clasp->name, strlen(clasp->name)));
|
||||
if (!atom)
|
||||
return NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user