[seed] Made GLib variable in seed.js scoped



commit 1601af1546e5705d7c8721db926964425705acc2
Author: Peter Rustler <peter rustler basyskom com>
Date:   Mon Dec 7 16:05:35 2015 +0000

    Made GLib variable in seed.js scoped
    
    In seed.js the GLib variable is global. This is no problem as long
    there is no const or let keyword in jsc.
    After adding this keywords by supporting the new webkit2gtk4.0 port,
    you get the following error.
    
    SyntaxError Can't create duplicate variable that shadows a global
    property: 'GLib'
    
    This patch make the GLib variable const which also limit the scope
    of it.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=759171

 extensions/Seed.js.in |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/extensions/Seed.js.in b/extensions/Seed.js.in
index 7f10e21..b5b7c6c 100644
--- a/extensions/Seed.js.in
+++ b/extensions/Seed.js.in
@@ -8,7 +8,7 @@ if(!imports.searchPath || (imports.searchPath.length == 0))
                               "/usr/lib/seed",
                               "/usr/share/seed" ];
 
-        GLib = imports.gi.GLib;
+        const GLib = imports.gi.GLib;
        if(Seed.argv.length > 1)
        {
                __script_path__ = GLib.path_get_dirname(Seed.argv[1]);


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