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 243047 4323557b111dd065048d2074f4e79ddeaac79678
parent 243046 28f0e71b62922855f410b9158abd2790fda7d98e
child 243048 0cc4812a1cd79fb4dbd0c20360541d7ba416b813
push id59568
push usersfink@mozilla.com
push dateFri, 08 May 2015 18:14:16 +0000
treeherdermozilla-inbound@4323557b111d [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