From: Mike Hommey <mh@glandium.org>
Date: Thu, 2 Jul 2009 11:01:57 +0200
Subject: Avoid some symbols from being exported in C++ mangled form

---
 js/src/jscntxt.cpp                     |    2 +-
 js/src/jsobj.h                         |    5 +++++
 js/src/xpconnect/src/xpcquickstubs.cpp |    4 ----
 3 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/js/src/jscntxt.cpp b/js/src/jscntxt.cpp
index f2d69fb..fdeec5c 100644
--- a/js/src/jscntxt.cpp
+++ b/js/src/jscntxt.cpp
@@ -898,7 +898,7 @@ resolving_HashKey(JSDHashTable *table, const void *ptr)
     return ((JSDHashNumber)JS_PTR_TO_UINT32(key->obj) >> JSVAL_TAGBITS) ^ key->id;
 }
 
-JS_PUBLIC_API(JSBool)
+static JSBool
 resolving_MatchEntry(JSDHashTable *table,
                      const JSDHashEntryHdr *hdr,
                      const void *ptr)
diff --git a/js/src/jsobj.h b/js/src/jsobj.h
index a0991eb..8cff22f 100644
--- a/js/src/jsobj.h
+++ b/js/src/jsobj.h
@@ -482,6 +482,11 @@ js_HasOwnProperty(JSContext *cx, JSLookupPropOp lookup, JSObject *obj, jsid id,
 extern JSBool
 js_PropertyIsEnumerable(JSContext *cx, JSObject *obj, jsid id, jsval *vp);
 
+#if JS_HAS_GETTER_SETTER
+JS_FRIEND_API(JSBool) js_obj_defineGetter(JSContext *cx, uintN argc, jsval *vp);
+JS_FRIEND_API(JSBool) js_obj_defineSetter(JSContext *cx, uintN argc, jsval *vp);
+#endif
+
 extern JSObject *
 js_InitEval(JSContext *cx, JSObject *obj);
 
diff --git a/js/src/xpconnect/src/xpcquickstubs.cpp b/js/src/xpconnect/src/xpcquickstubs.cpp
index cb111c4..a0e13df 100644
--- a/js/src/xpconnect/src/xpcquickstubs.cpp
+++ b/js/src/xpconnect/src/xpcquickstubs.cpp
@@ -312,10 +312,6 @@ SharedLookupSetter(JSContext *cx, uintN argc, jsval *vp)
     return LookupGetterOrSetter(cx, PR_FALSE, argc, vp);
 }
 
-// XXX Hack! :-/
-JS_FRIEND_API(JSBool) js_obj_defineGetter(JSContext *cx, uintN argc, jsval *vp);
-JS_FRIEND_API(JSBool) js_obj_defineSetter(JSContext *cx, uintN argc, jsval *vp);
-
 static JSBool
 DefineGetterOrSetter(JSContext *cx, uintN argc, JSBool wantGetter, jsval *vp)
 {
