[gjs] context: Always use JSVERSION_LATEST



commit 3053f0bf6f17c0d10bbc8183413652c582f99f18
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Thu Jan 2 13:21:19 2014 -0500

    context: Always use JSVERSION_LATEST
    
    And remove the APIs/ability to scan for a JS version to use.
    Upstream wants to remove this API.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=721355

 Makefile-insttest.am                             |    1 -
 gjs/console.cpp                                  |   24 +----
 gjs/context.cpp                                  |  127 +---------------------
 gjs/context.h                                    |    3 -
 gjs/jsapi-util.cpp                               |    9 +--
 gjs/jsapi-util.h                                 |    3 +-
 installed-tests/gjs-unit.cpp                     |    9 +--
 installed-tests/js/modules/alwaysThrows.js       |    1 -
 installed-tests/js/modules/foobar.js             |    1 -
 installed-tests/js/modules/modunicode.js         |    1 -
 installed-tests/js/modules/mutualImport/a.js     |    1 -
 installed-tests/js/modules/mutualImport/b.js     |    1 -
 installed-tests/js/modules/subA/subB/__init__.js |    1 -
 installed-tests/js/modules/subA/subB/foobar.js   |    1 -
 installed-tests/js/test0010basic.js              |    1 -
 installed-tests/js/test0020importer.js           |    1 -
 installed-tests/js/test0030basicBoxed.js         |    1 -
 installed-tests/js/test0040mainloop.js           |    1 -
 installed-tests/js/testByteArray.js              |    1 -
 installed-tests/js/testCairo.js                  |    1 -
 installed-tests/js/testClass.js                  |    2 +-
 installed-tests/js/testEverythingBasic.js        |    1 -
 installed-tests/js/testEverythingEncapsulated.js |    1 -
 installed-tests/js/testFormat.js                 |    1 -
 installed-tests/js/testGDBus.js                  |    1 -
 installed-tests/js/testGIMarshalling.js          |    1 -
 installed-tests/js/testGObjectClass.js           |    2 +-
 installed-tests/js/testJS1_8.js                  |    2 -
 installed-tests/js/testJSDefault.js              |   16 ---
 installed-tests/js/testLang.js                   |    1 -
 installed-tests/js/testLocale.js                 |    1 -
 installed-tests/js/testMainloop.js               |    1 -
 installed-tests/js/testMetaClass.js              |    2 +-
 installed-tests/js/testParamSpec.js              |    1 -
 installed-tests/js/testReflectObject.js          |    1 -
 installed-tests/js/testSignals.js                |    1 -
 installed-tests/js/testSystem.js                 |    1 -
 installed-tests/js/testTweener.js                |    1 -
 installed-tests/js/testUnicode.js                |    1 -
 installed-tests/js/testself.js                   |    1 -
 installed-tests/scripts/testSystemExit.js        |    2 -
 modules/overrides/GLib.js                        |    1 -
 modules/overrides/GObject.js                     |    1 -
 modules/overrides/Gio.js                         |    1 -
 44 files changed, 12 insertions(+), 221 deletions(-)
---
diff --git a/Makefile-insttest.am b/Makefile-insttest.am
index 7644797..c1ea941 100644
--- a/Makefile-insttest.am
+++ b/Makefile-insttest.am
@@ -108,7 +108,6 @@ dist_jstests_DATA += \
        installed-tests/js/testGIMarshalling.js         \
        installed-tests/js/testGObjectClass.js          \
        installed-tests/js/testJS1_8.js                 \
-       installed-tests/js/testJSDefault.js             \
        installed-tests/js/testLang.js                  \
        installed-tests/js/testLocale.js                        \
        installed-tests/js/testMainloop.js                      \
diff --git a/gjs/console.cpp b/gjs/console.cpp
index 4855d3e..e3a06c7 100644
--- a/gjs/console.cpp
+++ b/gjs/console.cpp
@@ -30,12 +30,10 @@
 
 static char **include_path = NULL;
 static char *command = NULL;
-static char *js_version= NULL;
 
 static GOptionEntry entries[] = {
     { "command", 'c', 0, G_OPTION_ARG_STRING, &command, "Program passed in as a string", "COMMAND" },
     { "include-path", 'I', 0, G_OPTION_ARG_STRING_ARRAY, &include_path, "Add the directory DIR to the list 
of directories to search for js files.", "DIR" },
-    { "js-version", 0, 0, G_OPTION_ARG_STRING, &js_version, "JavaScript version (e.g. \"default\", \"1.8\"", 
"JSVERSION" },
     { NULL }
 };
 
@@ -64,7 +62,6 @@ main(int argc, char **argv)
     const char *program_name;
     gsize len;
     int code;
-    const char *source_js_version;
 
     context = g_option_context_new(NULL);
 
@@ -89,12 +86,10 @@ main(int argc, char **argv)
 
     if (command != NULL) {
         script = command;
-        source_js_version = gjs_context_scan_buffer_for_js_version(script, 1024);
         len = strlen(script);
         filename = "<command line>";
         program_name = argv[0];
     } else if (argc <= 1) {
-        source_js_version = NULL;
         script = g_strdup("const Console = imports.console; Console.interact();");
         len = strlen(script);
         filename = "<stdin>";
@@ -105,27 +100,16 @@ main(int argc, char **argv)
             g_printerr("%s\n", error->message);
             exit(1);
         }
-        source_js_version = gjs_context_scan_buffer_for_js_version(script, 1024);
         filename = argv[1];
         program_name = argv[1];
         argc--;
         argv++;
     }
 
-    /* If user explicitly specifies a version, use it */
-    if (js_version != NULL)
-        source_js_version = js_version;
-    if (source_js_version != NULL)
-        js_context = (GjsContext*) g_object_new(GJS_TYPE_CONTEXT,
-                                  "search-path", include_path,
-                                  "js-version", source_js_version,
-                                  "program-name", program_name,
-                                  NULL);
-    else
-        js_context = (GjsContext*) g_object_new(GJS_TYPE_CONTEXT,
-                                  "search-path", include_path,
-                                  "program-name", program_name,
-                                  NULL);
+    js_context = (GjsContext*) g_object_new(GJS_TYPE_CONTEXT,
+                                            "search-path", include_path,
+                                            "program-name", program_name,
+                                            NULL);
 
     /* prepare command line arguments */
     if (!gjs_context_define_string_array(js_context, "ARGV",
diff --git a/gjs/context.cpp b/gjs/context.cpp
index 25d9f92..781e0be 100644
--- a/gjs/context.cpp
+++ b/gjs/context.cpp
@@ -43,8 +43,6 @@
 
 #include <string.h>
 
-#define _GJS_JS_VERSION_DEFAULT "1.8"
-
 static void     gjs_context_dispose           (GObject               *object);
 static void     gjs_context_finalize          (GObject               *object);
 static void     gjs_context_constructed       (GObject               *object);
@@ -68,7 +66,6 @@ struct _GjsContext {
 
     GjsProfiler *profiler;
 
-    char *jsversion_string;
     char *program_name;
 
     char **search_path;
@@ -93,7 +90,6 @@ static int signals[LAST_SIGNAL];
 
 enum {
     PROP_0,
-    PROP_JS_VERSION,
     PROP_SEARCH_PATH,
     PROP_GC_NOTIFICATIONS,
     PROP_PROGRAM_NAME,
@@ -279,8 +275,6 @@ gjs_printerr(JSContext *context,
 static void
 gjs_context_init(GjsContext *js_context)
 {
-    js_context->jsversion_string = g_strdup(_GJS_JS_VERSION_DEFAULT);
-
     gjs_context_make_current(js_context);
 }
 
@@ -307,16 +301,6 @@ gjs_context_class_init(GjsContextClass *klass)
                                     PROP_SEARCH_PATH,
                                     pspec);
 
-    pspec = g_param_spec_string("js-version",
-                                 "JS Version",
-                                 "A string giving the default for the (SpiderMonkey) JavaScript version",
-                                 _GJS_JS_VERSION_DEFAULT,
-                                 (GParamFlags) (G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
-
-    g_object_class_install_property(object_class,
-                                    PROP_JS_VERSION,
-                                    pspec);
-
     pspec = g_param_spec_boolean("gc-notifications",
                                  "",
                                  "Whether or not to emit the \"gc\" signal",
@@ -418,8 +402,6 @@ gjs_context_finalize(GObject *object)
         js_context->search_path = NULL;
     }
 
-    g_free(js_context->jsversion_string);
-
     if (gjs_context_get_current() == (GjsContext*)object)
         gjs_context_make_current(NULL);
 
@@ -551,7 +533,6 @@ gjs_context_constructed(GObject *object)
 {
     GjsContext *js_context = GJS_CONTEXT(object);
     guint32 options_flags;
-    JSVersion js_version;
 
     G_OBJECT_CLASS(gjs_context_parent_class)->constructed(object);
 
@@ -592,14 +573,7 @@ gjs_context_constructed(GObject *object)
     /* set ourselves as the private data */
     JS_SetContextPrivate(js_context->context, js_context);
 
-    js_version = JS_StringToVersion(js_context->jsversion_string);
-    /* It doesn't make sense to throw here; just use the default if we
-     * don't know.
-     */
-    if (js_version == JSVERSION_UNKNOWN)
-        js_version = JSVERSION_DEFAULT;
-
-    if (!gjs_init_context_standard(js_context->context, js_version))
+    if (!gjs_init_context_standard(js_context->context))
         g_error("Failed to initialize context");
 
     js_context->global = JS_GetGlobalObject(js_context->context);
@@ -679,9 +653,6 @@ gjs_context_get_property (GObject     *object,
     js_context = GJS_CONTEXT (object);
 
     switch (prop_id) {
-    case PROP_JS_VERSION:
-        g_value_set_string(value, js_context->jsversion_string);
-        break;
     case PROP_GC_NOTIFICATIONS:
         g_value_set_boolean(value, js_context->gc_notifications_enabled);
         break;
@@ -708,13 +679,6 @@ gjs_context_set_property (GObject      *object,
     case PROP_SEARCH_PATH:
         js_context->search_path = (char**) g_value_dup_boxed(value);
         break;
-    case PROP_JS_VERSION:
-        g_free(js_context->jsversion_string);
-        if (g_value_get_string (value) == NULL)
-            js_context->jsversion_string = g_strdup(_GJS_JS_VERSION_DEFAULT);
-        else
-            js_context->jsversion_string = g_value_dup_string(value);
-        break;
     case PROP_GC_NOTIFICATIONS:
         js_context->gc_notifications_enabled = g_value_get_boolean(value);
         break;
@@ -727,95 +691,6 @@ gjs_context_set_property (GObject      *object,
     }
 }
 
-/**
- * gjs_context_scan_buffer_for_js_version:
- * @buffer: A UTF-8 string
- * @maxbytes: Maximum number of bytes to scan in buffer
- *
- * Given a buffer of JavaScript source code (in UTF-8), look for a
- * comment in it which tells us which version to enable in the
- * SpiderMonkey engine.
- *
- * The comment is inspired by the Firefox MIME type, see e.g.
- * https://developer.mozilla.org/en/JavaScript/New_in_JavaScript/1.8
- *
- * A valid comment string looks like the following, on its own line:
- * <literal>// application/javascript;version=1.8</literal>
- *
- * Returns: A string suitable for use as the GjsContext::version property.
- *   If the version is unknown or invalid, %NULL will be returned.
- */
-const char *
-gjs_context_scan_buffer_for_js_version (const char *buffer,
-                                        gssize      maxbytes)
-{
-    const char *prefix = "// application/javascript;version=";
-    const char *substr;
-    JSVersion ver;
-    char buf[20];
-    gssize remaining_bytes;
-    guint i;
-
-    substr = g_strstr_len(buffer, maxbytes, prefix);
-    if (!substr)
-        return NULL;
-
-    remaining_bytes = maxbytes - ((substr - buffer) + strlen (prefix));
-    /* 20 should give us enough space for all the valid JS version strings; anyways
-     * it's really a bug if we're close to the limit anyways. */
-    if (remaining_bytes < (gssize)sizeof(buf)-1)
-        return NULL;
-
-    buf[sizeof(buf)-1] = '\0';
-    strncpy(buf, substr + strlen (prefix), sizeof(buf)-1);
-    for (i = 0; i < sizeof(buf)-1; i++) {
-        if (buf[i] == '\n') {
-            buf[i] = '\0';
-            break;
-        }
-    }
-
-    ver = JS_StringToVersion(buf);
-    if (ver == JSVERSION_UNKNOWN)
-        return NULL;
-    return JS_VersionToString(ver);
-}
-
-/**
- * gjs_context_scan_file_for_js_version:
- * @file_path: (type filename): A file path
- *
- * Like gjs_context_scan_buffer_for_js_version(), but will open
- * the file and use the initial 1024 bytes as a buffer.
- *
- * Returns: A string suitable for use as GjsContext::version property.
- */
-const char *
-gjs_context_scan_file_for_js_version (const char *file_path)
-{
-    char *utf8_buf;
-    guint8 buf[1024];
-    const char *version = NULL;
-    gssize len;
-    FILE *f;
-
-    f = fopen(file_path, "r");
-    if (!f)
-        return NULL;
-
-    len = fread(buf, 1, sizeof(buf)-1, f);
-    fclose(f);
-    if (len < 0)
-        return NULL;
-    buf[len] = '\0';
-
-    utf8_buf = _gjs_g_utf8_make_valid((const char*)buf);
-    version = gjs_context_scan_buffer_for_js_version(utf8_buf, sizeof(buf));
-    g_free(utf8_buf);
-
-    return version;
-}
-
 
 GjsContext*
 gjs_context_new(void)
diff --git a/gjs/context.h b/gjs/context.h
index dc2d037..ccd8bc6 100644
--- a/gjs/context.h
+++ b/gjs/context.h
@@ -44,9 +44,6 @@ typedef struct _GjsContextClass GjsContextClass;
 
 GType           gjs_context_get_type             (void) G_GNUC_CONST;
 
-const char *    gjs_context_scan_file_for_js_version (const char *file_path);
-const char *    gjs_context_scan_buffer_for_js_version (const char *buffer, gssize len);
-
 GjsContext*     gjs_context_new                  (void);
 GjsContext*     gjs_context_new_with_search_path (char         **search_path);
 gboolean        gjs_context_eval_file            (GjsContext  *js_context,
diff --git a/gjs/jsapi-util.cpp b/gjs/jsapi-util.cpp
index c4beb7e..de39a5f 100644
--- a/gjs/jsapi-util.cpp
+++ b/gjs/jsapi-util.cpp
@@ -88,17 +88,12 @@ static JSClass global_class = {
  * Returns: %TRUE on success, %FALSE otherwise
  */
 gboolean
-gjs_init_context_standard (JSContext       *context,
-                           JSVersion        js_version)
+gjs_init_context_standard (JSContext *context)
 {
     JSObject *global;
     JS::CompartmentOptions options;
 
-    gjs_debug(GJS_DEBUG_CONTEXT,
-              "Setting JavaScript version to %s",
-              JS_VersionToString(js_version));
-
-    options.setVersion(js_version);
+    options.setVersion(JSVERSION_LATEST);
     global = JS_NewGlobalObject(context, &global_class, NULL, options);
     if (global == NULL)
         return FALSE;
diff --git a/gjs/jsapi-util.h b/gjs/jsapi-util.h
index 5c02fe6..a828873 100644
--- a/gjs/jsapi-util.h
+++ b/gjs/jsapi-util.h
@@ -186,8 +186,7 @@ jsval gjs_##cname##_create_proto(JSContext *context, JSObject *module, const cha
     return rval; \
 }
 
-gboolean    gjs_init_context_standard        (JSContext       *context,
-                                              JSVersion        js_version);
+gboolean    gjs_init_context_standard        (JSContext       *context);
 
 JSObject*   gjs_get_import_global            (JSContext       *context);
 
diff --git a/installed-tests/gjs-unit.cpp b/installed-tests/gjs-unit.cpp
index c8dd70f..69fc4d0 100644
--- a/installed-tests/gjs-unit.cpp
+++ b/installed-tests/gjs-unit.cpp
@@ -39,14 +39,7 @@ static void
 setup(GjsTestJSFixture *fix,
       gconstpointer     test_data)
 {
-    const char *test_filename = (const char*) test_data;
-    const char *js_version;
-
-    js_version = gjs_context_scan_file_for_js_version(test_filename);
-
-    fix->context = (GjsContext*) g_object_new (GJS_TYPE_CONTEXT,
-                                               "js-version", js_version,
-                                               NULL);
+    fix->context = gjs_context_new ();
 }
 
 static void
diff --git a/installed-tests/js/modules/alwaysThrows.js b/installed-tests/js/modules/alwaysThrows.js
index cd0e9db..50af1ff 100644
--- a/installed-tests/js/modules/alwaysThrows.js
+++ b/installed-tests/js/modules/alwaysThrows.js
@@ -1,4 +1,3 @@
-// application/javascript;version=1.8
 // line 0
 // line 1
 // line 2
diff --git a/installed-tests/js/modules/foobar.js b/installed-tests/js/modules/foobar.js
index ab9a84c..cdd5cad 100644
--- a/installed-tests/js/modules/foobar.js
+++ b/installed-tests/js/modules/foobar.js
@@ -1,4 +1,3 @@
-// application/javascript;version=1.8
 // simple test module (used by testImporter.js)
 
 var foo = "This is foo";
diff --git a/installed-tests/js/modules/modunicode.js b/installed-tests/js/modules/modunicode.js
index 9165e1d..cbda9b8 100644
--- a/installed-tests/js/modules/modunicode.js
+++ b/installed-tests/js/modules/modunicode.js
@@ -1,4 +1,3 @@
-// application/javascript;version=1.8
 // This file is written in UTF-8.
 
 const uval = "const ♥ utf8";
diff --git a/installed-tests/js/modules/mutualImport/a.js b/installed-tests/js/modules/mutualImport/a.js
index 5f03f7b..c5fd069 100644
--- a/installed-tests/js/modules/mutualImport/a.js
+++ b/installed-tests/js/modules/mutualImport/a.js
@@ -1,4 +1,3 @@
-// application/javascript;version=1.8
 const B = imports.mutualImport.b;
 
 let count = 0;
diff --git a/installed-tests/js/modules/mutualImport/b.js b/installed-tests/js/modules/mutualImport/b.js
index 732465d..b6443b1 100644
--- a/installed-tests/js/modules/mutualImport/b.js
+++ b/installed-tests/js/modules/mutualImport/b.js
@@ -1,4 +1,3 @@
-// application/javascript;version=1.8
 const A = imports.mutualImport.a;
 
 function getCount() {
diff --git a/installed-tests/js/modules/subA/subB/__init__.js 
b/installed-tests/js/modules/subA/subB/__init__.js
index 0bab842..c7660dc 100644
--- a/installed-tests/js/modules/subA/subB/__init__.js
+++ b/installed-tests/js/modules/subA/subB/__init__.js
@@ -1,4 +1,3 @@
-// application/javascript;version=1.8
 function testImporterFunction() {
     return "__init__ function tested";
 }
diff --git a/installed-tests/js/modules/subA/subB/foobar.js b/installed-tests/js/modules/subA/subB/foobar.js
index ab9a84c..cdd5cad 100644
--- a/installed-tests/js/modules/subA/subB/foobar.js
+++ b/installed-tests/js/modules/subA/subB/foobar.js
@@ -1,4 +1,3 @@
-// application/javascript;version=1.8
 // simple test module (used by testImporter.js)
 
 var foo = "This is foo";
diff --git a/installed-tests/js/test0010basic.js b/installed-tests/js/test0010basic.js
index 3d09d76..2ea4a85 100644
--- a/installed-tests/js/test0010basic.js
+++ b/installed-tests/js/test0010basic.js
@@ -1,5 +1,4 @@
 const JSUnit = imports.jsUnit;
-// application/javascript;version=1.8
 function testBasic1() {
     var foo = 1+1;
     JSUnit.assertEquals(2, foo);
diff --git a/installed-tests/js/test0020importer.js b/installed-tests/js/test0020importer.js
index 0fb6003..33586bd 100644
--- a/installed-tests/js/test0020importer.js
+++ b/installed-tests/js/test0020importer.js
@@ -1,4 +1,3 @@
-// application/javascript;version=1.8
 const JSUnit = imports.jsUnit;
 
 function testImporter1() {
diff --git a/installed-tests/js/test0030basicBoxed.js b/installed-tests/js/test0030basicBoxed.js
index 96ba7b8..f736c8a 100644
--- a/installed-tests/js/test0030basicBoxed.js
+++ b/installed-tests/js/test0030basicBoxed.js
@@ -1,4 +1,3 @@
-// application/javascript;version=1.8
 const JSUnit = imports.jsUnit;
 const Regress = imports.gi.Regress;
 
diff --git a/installed-tests/js/test0040mainloop.js b/installed-tests/js/test0040mainloop.js
index 23d5de9..638688d 100644
--- a/installed-tests/js/test0040mainloop.js
+++ b/installed-tests/js/test0040mainloop.js
@@ -1,4 +1,3 @@
-// application/javascript;version=1.8
 const JSUnit = imports.jsUnit;
 var Mainloop = imports.mainloop;
 
diff --git a/installed-tests/js/testByteArray.js b/installed-tests/js/testByteArray.js
index 0ef8503..7a357dc 100644
--- a/installed-tests/js/testByteArray.js
+++ b/installed-tests/js/testByteArray.js
@@ -1,4 +1,3 @@
-// application/javascript;version=1.8
 // tests for imports.lang module
 
 const JSUnit = imports.jsUnit;
diff --git a/installed-tests/js/testCairo.js b/installed-tests/js/testCairo.js
index e9319ad..a0b8989 100644
--- a/installed-tests/js/testCairo.js
+++ b/installed-tests/js/testCairo.js
@@ -1,4 +1,3 @@
-// application/javascript;version=1.8
 const JSUnit = imports.jsUnit;
 const Cairo = imports.cairo;
 const Everything = imports.gi.Regress;
diff --git a/installed-tests/js/testClass.js b/installed-tests/js/testClass.js
index 382a85f..f41fcb9 100644
--- a/installed-tests/js/testClass.js
+++ b/installed-tests/js/testClass.js
@@ -1,4 +1,4 @@
-// application/javascript;version=1.8 -*- mode: js; indent-tabs-mode: nil -*-
+// -*- mode: js; indent-tabs-mode: nil -*-
 
 const JSUnit = imports.jsUnit;
 const Lang = imports.lang;
diff --git a/installed-tests/js/testEverythingBasic.js b/installed-tests/js/testEverythingBasic.js
index c1f66ed..593a8eb 100644
--- a/installed-tests/js/testEverythingBasic.js
+++ b/installed-tests/js/testEverythingBasic.js
@@ -1,4 +1,3 @@
-// application/javascript;version=1.8
 // This used to be called "Everything"
 
 const JSUnit = imports.jsUnit;
diff --git a/installed-tests/js/testEverythingEncapsulated.js 
b/installed-tests/js/testEverythingEncapsulated.js
index e66ce54..acd956b 100644
--- a/installed-tests/js/testEverythingEncapsulated.js
+++ b/installed-tests/js/testEverythingEncapsulated.js
@@ -1,4 +1,3 @@
-// application/javascript;version=1.8
 // This used to be called "Everything"
 const JSUnit = imports.jsUnit;
 const Everything = imports.gi.Regress;
diff --git a/installed-tests/js/testFormat.js b/installed-tests/js/testFormat.js
index da3d13b..000e78d 100644
--- a/installed-tests/js/testFormat.js
+++ b/installed-tests/js/testFormat.js
@@ -1,4 +1,3 @@
-// application/javascript;version=1.8
 // tests for imports.format module
 
 const Format = imports.format;
diff --git a/installed-tests/js/testGDBus.js b/installed-tests/js/testGDBus.js
index af2039b..d84205d 100644
--- a/installed-tests/js/testGDBus.js
+++ b/installed-tests/js/testGDBus.js
@@ -1,4 +1,3 @@
-// application/javascript;version=1.8
 const JSUnit = imports.jsUnit;
 const Gio = imports.gi.Gio;
 const GLib = imports.gi.GLib;
diff --git a/installed-tests/js/testGIMarshalling.js b/installed-tests/js/testGIMarshalling.js
index 889dd47..a3d45d1 100644
--- a/installed-tests/js/testGIMarshalling.js
+++ b/installed-tests/js/testGIMarshalling.js
@@ -1,4 +1,3 @@
-// application/javascript;version=1.8
 
 if (!('assertEquals' in this)) { /* allow running this test standalone */
     imports.lang.copyPublicProperties(imports.jsUnit, this);
diff --git a/installed-tests/js/testGObjectClass.js b/installed-tests/js/testGObjectClass.js
index 0b86510..27d1316 100644
--- a/installed-tests/js/testGObjectClass.js
+++ b/installed-tests/js/testGObjectClass.js
@@ -1,4 +1,4 @@
-// application/javascript;version=1.8 -*- mode: js; indent-tabs-mode: nil -*-
+// -*- mode: js; indent-tabs-mode: nil -*-
 
 const JSUnit = imports.jsUnit;
 const Lang = imports.lang;
diff --git a/installed-tests/js/testJS1_8.js b/installed-tests/js/testJS1_8.js
index 1cdb6b7..d740293 100644
--- a/installed-tests/js/testJS1_8.js
+++ b/installed-tests/js/testJS1_8.js
@@ -1,5 +1,3 @@
-// application/javascript;version=1.8
-
 // Test SpiderMonkey JS extensions; see
 // https://developer.mozilla.org/en/JavaScript/New_in_JavaScript/1.8
 
diff --git a/installed-tests/js/testLang.js b/installed-tests/js/testLang.js
index b649805..b778c78 100644
--- a/installed-tests/js/testLang.js
+++ b/installed-tests/js/testLang.js
@@ -1,4 +1,3 @@
-// application/javascript;version=1.8
 // tests for imports.lang module
 
 const JSUnit = imports.jsUnit;
diff --git a/installed-tests/js/testLocale.js b/installed-tests/js/testLocale.js
index feda5f6..b086a66 100644
--- a/installed-tests/js/testLocale.js
+++ b/installed-tests/js/testLocale.js
@@ -1,4 +1,3 @@
-// application/javascript;version=1.8
 // tests for JS_SetLocaleCallbacks().
 const JSUnit = imports.jsUnit;
 
diff --git a/installed-tests/js/testMainloop.js b/installed-tests/js/testMainloop.js
index 792e006..4d9579d 100644
--- a/installed-tests/js/testMainloop.js
+++ b/installed-tests/js/testMainloop.js
@@ -1,4 +1,3 @@
-// application/javascript;version=1.8
 const JSUnit = imports.jsUnit;
 const Mainloop = imports.mainloop;
 
diff --git a/installed-tests/js/testMetaClass.js b/installed-tests/js/testMetaClass.js
index 3ae3123..e570f35 100644
--- a/installed-tests/js/testMetaClass.js
+++ b/installed-tests/js/testMetaClass.js
@@ -1,4 +1,4 @@
-// application/javascript;version=1.8 -*- mode: js; indent-tabs-mode: nil -*-
+// -*- mode: js; indent-tabs-mode: nil -*-
 const JSUnit = imports.jsUnit;
 
 if (!('assertEquals' in this)) { /* allow running this test standalone */
diff --git a/installed-tests/js/testParamSpec.js b/installed-tests/js/testParamSpec.js
index d75867b..ca7b088 100644
--- a/installed-tests/js/testParamSpec.js
+++ b/installed-tests/js/testParamSpec.js
@@ -1,4 +1,3 @@
-// application/javascript;version=1.8
 const JSUnit = imports.jsUnit;
 
 const Regress = imports.gi.Regress;
diff --git a/installed-tests/js/testReflectObject.js b/installed-tests/js/testReflectObject.js
index a338e3a..58a30b6 100644
--- a/installed-tests/js/testReflectObject.js
+++ b/installed-tests/js/testReflectObject.js
@@ -1,4 +1,3 @@
-// application/javascript;version=1.8
 const JSUnit = imports.jsUnit;
 
 function testReflect() {
diff --git a/installed-tests/js/testSignals.js b/installed-tests/js/testSignals.js
index cf41b12..e3104d8 100644
--- a/installed-tests/js/testSignals.js
+++ b/installed-tests/js/testSignals.js
@@ -1,4 +1,3 @@
-// application/javascript;version=1.8
 const JSUnit = imports.jsUnit;
 const GLib = imports.gi.GLib;
 
diff --git a/installed-tests/js/testSystem.js b/installed-tests/js/testSystem.js
index 54b838f..9940d6c 100644
--- a/installed-tests/js/testSystem.js
+++ b/installed-tests/js/testSystem.js
@@ -1,4 +1,3 @@
-// application/javascript;version=1.8
 
 const JSUnit = imports.jsUnit;
 const System = imports.system;
diff --git a/installed-tests/js/testTweener.js b/installed-tests/js/testTweener.js
index 72c3f93..0245b64 100644
--- a/installed-tests/js/testTweener.js
+++ b/installed-tests/js/testTweener.js
@@ -1,4 +1,3 @@
-// application/javascript;version=1.8
 const JSUnit = imports.jsUnit;
 const Tweener = imports.tweener.tweener;
 const Mainloop = imports.mainloop;
diff --git a/installed-tests/js/testUnicode.js b/installed-tests/js/testUnicode.js
index 4d43b07..2aff029 100644
--- a/installed-tests/js/testUnicode.js
+++ b/installed-tests/js/testUnicode.js
@@ -1,4 +1,3 @@
-// application/javascript;version=1.8
 const JSUnit = imports.jsUnit;
 
 function testUnicode() {
diff --git a/installed-tests/js/testself.js b/installed-tests/js/testself.js
index 4da9690..a07de52 100644
--- a/installed-tests/js/testself.js
+++ b/installed-tests/js/testself.js
@@ -1,4 +1,3 @@
-// application/javascript;version=1.8
 const JSUnit = imports.jsUnit;
 
 var someUndefined;
diff --git a/installed-tests/scripts/testSystemExit.js b/installed-tests/scripts/testSystemExit.js
index 68743aa..dea8961 100644
--- a/installed-tests/scripts/testSystemExit.js
+++ b/installed-tests/scripts/testSystemExit.js
@@ -1,5 +1,3 @@
-// application/javascript;version=1.8
-
 const System = imports.system;
 
 System.exit(0);
diff --git a/modules/overrides/GLib.js b/modules/overrides/GLib.js
index 53a3919..7ecbdcf 100644
--- a/modules/overrides/GLib.js
+++ b/modules/overrides/GLib.js
@@ -1,4 +1,3 @@
-// application/javascript;version=1.8
 // Copyright 2011 Giovanni Campagna
 //
 // Permission is hereby granted, free of charge, to any person obtaining a copy
diff --git a/modules/overrides/GObject.js b/modules/overrides/GObject.js
index d4ec6bc..7f783ae 100644
--- a/modules/overrides/GObject.js
+++ b/modules/overrides/GObject.js
@@ -1,4 +1,3 @@
-// application/javascript;version=1.8
 // Copyright 2011 Jasper St. Pierre
 //
 // Permission is hereby granted, free of charge, to any person obtaining a copy
diff --git a/modules/overrides/Gio.js b/modules/overrides/Gio.js
index 357fd55..ec1b4b9 100644
--- a/modules/overrides/Gio.js
+++ b/modules/overrides/Gio.js
@@ -1,4 +1,3 @@
-// application/javascript;version=1.8
 // Copyright 2011 Giovanni Campagna
 //
 // Permission is hereby granted, free of charge, to any person obtaining a copy


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]