зеркало из https://github.com/mozilla/gecko-dev.git
Bug 321021: Add option to preserve exceptions thrown from outermost frames,
rather than convert to error reports. r=mrbkap, sr=brendan.
This commit is contained in:
Родитель
d749051807
Коммит
6b682d8476
|
@ -3647,7 +3647,7 @@ JS_CompileUCScript(JSContext *cx, JSObject *obj,
|
|||
#if JS_HAS_EXCEPTIONS
|
||||
# define LAST_FRAME_EXCEPTION_CHECK(cx,result) \
|
||||
JS_BEGIN_MACRO \
|
||||
if (!(result)) \
|
||||
if (!(result) && !((cx)->options & JSOPTION_DONT_REPORT_UNCAUGHT)) \
|
||||
js_ReportUncaughtException(cx); \
|
||||
JS_END_MACRO
|
||||
#else
|
||||
|
|
|
@ -503,6 +503,12 @@ JS_StringToVersion(const char *string);
|
|||
called with a null script
|
||||
parameter, by native code
|
||||
that loops intensively */
|
||||
#define JSOPTION_DONT_REPORT_UNCAUGHT \
|
||||
JS_BIT(8) /* When returning from the
|
||||
outermost API call, prevent
|
||||
uncaught exceptions from
|
||||
being converted to error
|
||||
reports */
|
||||
|
||||
extern JS_PUBLIC_API(uint32)
|
||||
JS_GetOptions(JSContext *cx);
|
||||
|
|
Загрузка…
Ссылка в новой задаче