From c7f7565f33d63c3027d537be29c06e8edbf0c317 Mon Sep 17 00:00:00 2001 From: Tom Schuster Date: Mon, 11 Apr 2011 10:48:28 -0700 Subject: [PATCH] Typo fixes for previous patch, r=jwalden --- js/src/jsapi.cpp | 2 +- js/src/jsxml.cpp | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/js/src/jsapi.cpp b/js/src/jsapi.cpp index b829ae2384f..09192bc1c76 100644 --- a/js/src/jsapi.cpp +++ b/js/src/jsapi.cpp @@ -2964,7 +2964,7 @@ JS_SetPrivate(JSContext *cx, JSObject *obj, void *data) JS_PUBLIC_API(void *) JS_GetInstancePrivate(JSContext *cx, JSObject *obj, JSClass *clasp, jsval *argv) { - if (JS_InstanceOf(cx, obj, clasp, argv)) + if (!JS_InstanceOf(cx, obj, clasp, argv)) return NULL; return obj->getPrivate(); } diff --git a/js/src/jsxml.cpp b/js/src/jsxml.cpp index 6305b06efb8..02ef6874855 100644 --- a/js/src/jsxml.cpp +++ b/js/src/jsxml.cpp @@ -7528,6 +7528,7 @@ GetPrivate(JSContext *cx, JSObject *obj, const char *method) JS_ReportErrorNumber(cx, js_GetErrorMessage, NULL, JSMSG_INCOMPATIBLE_METHOD, js_XML_str, method, obj->getClass()->name); + return NULL; } return (JSXML *)obj->getPrivate(); }