diff --git a/dom/plugins/base/nsJSNPRuntime.cpp b/dom/plugins/base/nsJSNPRuntime.cpp index f90f59727937..ccfcc7f16021 100644 --- a/dom/plugins/base/nsJSNPRuntime.cpp +++ b/dom/plugins/base/nsJSNPRuntime.cpp @@ -39,8 +39,6 @@ #include "base/basictypes.h" #include "jsapi.h" -// FIXME(bug 332648): Give me a real API please! -#include "jscntxt.h" #include "jsfriendapi.h" #include "nsIInterfaceRequestorUtils.h" diff --git a/dom/workers/EventTarget.cpp b/dom/workers/EventTarget.cpp index dd4eb00de580..890acdc4fc52 100644 --- a/dom/workers/EventTarget.cpp +++ b/dom/workers/EventTarget.cpp @@ -39,7 +39,7 @@ #include "EventTarget.h" #include "jsapi.h" -#include "jscntxt.h" +#include "jsfriendapi.h" #include "nsTraceRefcnt.h" #include "WorkerInlines.h" diff --git a/dom/workers/Events.cpp b/dom/workers/Events.cpp index 7f9f8845f04a..86c18cecb78b 100644 --- a/dom/workers/Events.cpp +++ b/dom/workers/Events.cpp @@ -42,7 +42,6 @@ #include "Events.h" #include "jsapi.h" -#include "jscntxt.h" #include "jsfriendapi.h" #include "nsTraceRefcnt.h" diff --git a/dom/workers/Exceptions.cpp b/dom/workers/Exceptions.cpp index 355dec4947c9..a35430462665 100644 --- a/dom/workers/Exceptions.cpp +++ b/dom/workers/Exceptions.cpp @@ -42,7 +42,6 @@ #include "Exceptions.h" #include "jsapi.h" -#include "jscntxt.h" #include "jsfriendapi.h" #include "jsprf.h" diff --git a/dom/workers/File.cpp b/dom/workers/File.cpp index f19a4a3b1bd1..c707a99340ce 100644 --- a/dom/workers/File.cpp +++ b/dom/workers/File.cpp @@ -43,7 +43,6 @@ #include "jsapi.h" #include "jsatom.h" -#include "jscntxt.h" #include "jsfriendapi.h" #include "nsCOMPtr.h" #include "nsJSUtils.h" diff --git a/dom/workers/FileReaderSync.cpp b/dom/workers/FileReaderSync.cpp index 57627f268c8b..4a4c4e5c4917 100644 --- a/dom/workers/FileReaderSync.cpp +++ b/dom/workers/FileReaderSync.cpp @@ -43,7 +43,7 @@ #include "jsapi.h" #include "jsatom.h" -#include "jscntxt.h" +#include "jsfriendapi.h" #include "jstypedarray.h" #include "nsJSUtils.h" diff --git a/dom/workers/ListenerManager.cpp b/dom/workers/ListenerManager.cpp index 79ee053ab104..ec7409a3dfc7 100644 --- a/dom/workers/ListenerManager.cpp +++ b/dom/workers/ListenerManager.cpp @@ -42,6 +42,7 @@ #include "jsapi.h" #include "jscntxt.h" +#include "jsfriendapi.h" #include "js/Vector.h" #include "Events.h" diff --git a/dom/workers/Location.cpp b/dom/workers/Location.cpp index 2382ad9a6ed0..1aff82ba780e 100644 --- a/dom/workers/Location.cpp +++ b/dom/workers/Location.cpp @@ -39,7 +39,6 @@ #include "Location.h" #include "jsapi.h" -#include "jscntxt.h" #include "jsfriendapi.h" #include "nsTraceRefcnt.h" diff --git a/dom/workers/Navigator.cpp b/dom/workers/Navigator.cpp index 2f33c6845f9e..00ce90515fa6 100644 --- a/dom/workers/Navigator.cpp +++ b/dom/workers/Navigator.cpp @@ -39,7 +39,6 @@ #include "Navigator.h" #include "jsapi.h" -#include "jscntxt.h" #include "jsfriendapi.h" #include "nsTraceRefcnt.h" diff --git a/dom/workers/Worker.cpp b/dom/workers/Worker.cpp index b782ff652c61..b840dce9ed24 100644 --- a/dom/workers/Worker.cpp +++ b/dom/workers/Worker.cpp @@ -39,7 +39,7 @@ #include "Worker.h" #include "jsapi.h" -#include "jscntxt.h" +#include "jsfriendapi.h" #include "EventTarget.h" #include "RuntimeService.h" diff --git a/dom/workers/WorkerPrivate.cpp b/dom/workers/WorkerPrivate.cpp index a7b0faf06d45..90b147eb5770 100644 --- a/dom/workers/WorkerPrivate.cpp +++ b/dom/workers/WorkerPrivate.cpp @@ -56,7 +56,7 @@ #include "nsIURL.h" #include "nsIXPConnect.h" -#include "jscntxt.h" +#include "jsfriendapi.h" #include "jsdbgapi.h" #include "jsprf.h" #include "js/MemoryMetrics.h" diff --git a/dom/workers/WorkerScope.cpp b/dom/workers/WorkerScope.cpp index fec437504a0a..369a4af4b88a 100644 --- a/dom/workers/WorkerScope.cpp +++ b/dom/workers/WorkerScope.cpp @@ -43,7 +43,6 @@ #include "jsapi.h" #include "jsdbgapi.h" -#include "jscntxt.h" #include "nsTraceRefcnt.h" #include "xpcpublic.h" diff --git a/dom/workers/XMLHttpRequest.cpp b/dom/workers/XMLHttpRequest.cpp index 01a0487f90e6..ab3d389d2a59 100644 --- a/dom/workers/XMLHttpRequest.cpp +++ b/dom/workers/XMLHttpRequest.cpp @@ -39,7 +39,6 @@ #include "XMLHttpRequest.h" #include "jsapi.h" -#include "jscntxt.h" #include "jsfriendapi.h" #include "Exceptions.h" diff --git a/js/src/jscntxt.h b/js/src/jscntxt.h index b47c0a403f9a..141cbbd66710 100644 --- a/js/src/jscntxt.h +++ b/js/src/jscntxt.h @@ -1883,21 +1883,6 @@ js_ContextIterator(JSRuntime *rt, JSBool unlocked, JSContext **iterp); extern JS_FRIEND_API(JSContext *) js_NextActiveContext(JSRuntime *, JSContext *); -/* - * Report an exception, which is currently realized as a printf-style format - * string and its arguments. - */ -typedef enum JSErrNum { -#define MSG_DEF(name, number, count, exception, format) \ - name = number, -#include "js.msg" -#undef MSG_DEF - JSErr_Limit -} JSErrNum; - -extern JS_FRIEND_API(const JSErrorFormatString *) -js_GetErrorMessage(void *userRef, const char *locale, const uintN errorNumber); - #ifdef va_start extern JSBool js_ReportErrorVA(JSContext *cx, uintN flags, const char *format, va_list ap); diff --git a/js/src/jsfriendapi.h b/js/src/jsfriendapi.h index e3b3b8413dde..62b7509182e9 100644 --- a/js/src/jsfriendapi.h +++ b/js/src/jsfriendapi.h @@ -510,4 +510,21 @@ js_DateIsValid(JSContext *cx, JSObject* obj); extern JS_FRIEND_API(double) js_DateGetMsecSinceEpoch(JSContext *cx, JSObject *obj); +/* Implemented in jscntxt.cpp. */ + +/* + * Report an exception, which is currently realized as a printf-style format + * string and its arguments. + */ +typedef enum JSErrNum { +#define MSG_DEF(name, number, count, exception, format) \ + name = number, +#include "js.msg" +#undef MSG_DEF + JSErr_Limit +} JSErrNum; + +extern JS_FRIEND_API(const JSErrorFormatString *) +js_GetErrorMessage(void *userRef, const char *locale, const uintN errorNumber); + #endif /* jsfriendapi_h___ */ diff --git a/js/xpconnect/src/XPCQuickStubs.cpp b/js/xpconnect/src/XPCQuickStubs.cpp index 473a11445f5d..943e23e8403d 100644 --- a/js/xpconnect/src/XPCQuickStubs.cpp +++ b/js/xpconnect/src/XPCQuickStubs.cpp @@ -39,7 +39,8 @@ #include "mozilla/Util.h" #include "jsapi.h" -#include "jscntxt.h" /* for error messages */ +#include "jsatom.h" +#include "jsfriendapi.h" #include "nsCOMPtr.h" #include "xpcprivate.h" #include "XPCInlines.h"