зеркало из https://github.com/mozilla/gecko-dev.git
Bug 765464 - Part a: Introduce JS_ReportErrorNumberVA; r=Waldo
This commit is contained in:
Родитель
7b92acdf47
Коммит
9d077ec396
|
@ -6304,12 +6304,19 @@ JS_ReportErrorNumber(JSContext *cx, JSErrorCallback errorCallback,
|
||||||
void *userRef, const unsigned errorNumber, ...)
|
void *userRef, const unsigned errorNumber, ...)
|
||||||
{
|
{
|
||||||
va_list ap;
|
va_list ap;
|
||||||
|
|
||||||
AssertHeapIsIdle(cx);
|
|
||||||
va_start(ap, errorNumber);
|
va_start(ap, errorNumber);
|
||||||
|
JS_ReportErrorNumberVA(cx, errorCallback, userRef, errorNumber, ap);
|
||||||
|
va_end(ap);
|
||||||
|
}
|
||||||
|
|
||||||
|
JS_PUBLIC_API(void)
|
||||||
|
JS_ReportErrorNumberVA(JSContext *cx, JSErrorCallback errorCallback,
|
||||||
|
void *userRef, const unsigned errorNumber,
|
||||||
|
va_list ap)
|
||||||
|
{
|
||||||
|
AssertHeapIsIdle(cx);
|
||||||
js_ReportErrorNumberVA(cx, JSREPORT_ERROR, errorCallback, userRef,
|
js_ReportErrorNumberVA(cx, JSREPORT_ERROR, errorCallback, userRef,
|
||||||
errorNumber, JS_TRUE, ap);
|
errorNumber, JS_TRUE, ap);
|
||||||
va_end(ap);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
JS_PUBLIC_API(void)
|
JS_PUBLIC_API(void)
|
||||||
|
|
|
@ -5650,6 +5650,12 @@ extern JS_PUBLIC_API(void)
|
||||||
JS_ReportErrorNumber(JSContext *cx, JSErrorCallback errorCallback,
|
JS_ReportErrorNumber(JSContext *cx, JSErrorCallback errorCallback,
|
||||||
void *userRef, const unsigned errorNumber, ...);
|
void *userRef, const unsigned errorNumber, ...);
|
||||||
|
|
||||||
|
#ifdef va_start
|
||||||
|
extern JS_PUBLIC_API(void)
|
||||||
|
JS_ReportErrorNumberVA(JSContext *cx, JSErrorCallback errorCallback,
|
||||||
|
void *userRef, const unsigned errorNumber, va_list ap);
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Use an errorNumber to retrieve the format string, args are jschar *
|
* Use an errorNumber to retrieve the format string, args are jschar *
|
||||||
*/
|
*/
|
||||||
|
|
Загрузка…
Ссылка в новой задаче