Bug 944164 - Add in missing shell/jsshell.h file, r=bustage, a=KWierso for CLOSED TREE push
☠☠ backed out by 7c00628cbfb1 ☠ ☠
authorSteve Fink <sfink@mozilla.com>
Thu, 07 May 2015 09:53:31 -0700
changeset 274418 4323557b111dd065048d2074f4e79ddeaac79678
parent 274417 28f0e71b62922855f410b9158abd2790fda7d98e
child 274419 0cc4812a1cd79fb4dbd0c20360541d7ba416b813
push id863
push userraliiev@mozilla.com
push dateMon, 03 Aug 2015 13:22:43 +0000
treeherdermozilla-release@f6321b14228d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbustage, KWierso
bugs944164
milestone40.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 944164 - Add in missing shell/jsshell.h file, r=bustage, a=KWierso for CLOSED TREE push
js/src/shell/jsshell.h
new file mode 100644
--- /dev/null
+++ b/js/src/shell/jsshell.h
@@ -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