зеркало из https://github.com/mozilla/gecko-dev.git
Bug 944164 - Add in missing shell/jsshell.h file, r=bustage, a=KWierso for CLOSED TREE push
--HG-- extra : rebase_source : 28ef54875d592a14cafbbb4bb2d72f9db11a7f30
This commit is contained in:
Родитель
13e326f088
Коммит
5374200814
|
@ -0,0 +1,41 @@
|
|||
#ifndef jsshell_js_h
|
||||
#define jsshell_js_h
|
||||
|
||||
#include "jsapi.h"
|
||||
|
||||
namespace js {
|
||||
namespace shell {
|
||||
|
||||
enum JSShellErrNum {
|
||||
#define MSG_DEF(name, count, exception, format) \
|
||||
name,
|
||||
#include "jsshell.msg"
|
||||
#undef MSG_DEF
|
||||
JSShellErr_Limit
|
||||
};
|
||||
|
||||
const JSErrorFormatString*
|
||||
my_GetErrorMessage(void* userRef, const unsigned errorNumber);
|
||||
|
||||
static void
|
||||
my_ErrorReporter(JSContext* cx, const char* message, JSErrorReport* report);
|
||||
|
||||
JSString*
|
||||
FileAsString(JSContext* cx, const char* pathname);
|
||||
|
||||
class AutoCloseInputFile
|
||||
{
|
||||
private:
|
||||
FILE* f_;
|
||||
public:
|
||||
explicit AutoCloseInputFile(FILE* f) : f_(f) {}
|
||||
~AutoCloseInputFile() {
|
||||
if (f_ && f_ != stdin)
|
||||
fclose(f_);
|
||||
}
|
||||
};
|
||||
|
||||
} /* namespace shell */
|
||||
} /* namespace js */
|
||||
|
||||
#endif
|
Загрузка…
Ссылка в новой задаче