diff -Nru cjs-2.6.2/cjs/importer.cpp cjs-2.8.0/cjs/importer.cpp --- cjs-2.6.2/cjs/importer.cpp 2015-06-22 20:45:44.000000000 +0000 +++ cjs-2.8.0/cjs/importer.cpp 2015-10-16 12:56:58.000000000 +0000 @@ -911,6 +911,37 @@ GJS_NATIVE_CONSTRUCTOR_DEFINE_ABSTRACT(importer) +static JSBool +gjs_importer_add_subimporter(JSContext *context, + unsigned argc, + jsval *vp) +{ + if (argc != 2) { + gjs_throw(context, "Must pass two arguments to addSubImporter()"); + return JS_FALSE; + } + + JSObject *importer; + jsval *argv = JS_ARGV(context, vp); + char *name; + char *path; + char *search_path[2] = { 0, 0 }; + + JS_BeginRequest(context); + + importer = JS_THIS_OBJECT(context, vp); + + gjs_string_to_utf8(context, argv[0], &name); + gjs_string_to_utf8(context, argv[1], &path); + + search_path[0] = path; + gjs_define_importer(context, importer, name, (const char **)search_path, FALSE); + + JS_EndRequest(context); + JS_SET_RVAL(context, vp, JSVAL_VOID); + return JS_TRUE; +} + static void importer_finalize(JSFreeOp *fop, JSObject *obj) @@ -955,6 +986,11 @@ { NULL } }; +JSFunctionSpec gjs_global_importer_funcs[] = { + { "addSubImporter", JSOP_WRAPPER(gjs_importer_add_subimporter), 0, 0 }, + { NULL } +}; + static JSObject* importer_new(JSContext *context, gboolean is_root) @@ -1131,13 +1167,14 @@ const char **initial_search_path, gboolean add_standard_search_path) { - jsval importer; + JSObject *importer; + jsval v; JS_BeginRequest(context); - importer = gjs_get_global_slot(context, GJS_GLOBAL_SLOT_IMPORTS); + v = gjs_get_global_slot(context, GJS_GLOBAL_SLOT_IMPORTS); - if (G_UNLIKELY (!JSVAL_IS_VOID(importer))) { + if (G_UNLIKELY (!JSVAL_IS_VOID(v))) { gjs_debug(GJS_DEBUG_IMPORTER, "Someone else already created root importer, ignoring second request"); @@ -1145,11 +1182,12 @@ return JS_TRUE; } - importer = OBJECT_TO_JSVAL(gjs_create_importer(context, "imports", + importer = gjs_create_importer(context, "imports", initial_search_path, add_standard_search_path, - TRUE, NULL)); - gjs_set_global_slot(context, GJS_GLOBAL_SLOT_IMPORTS, importer); + TRUE, NULL); + JS_DefineFunctions(context, importer, &gjs_global_importer_funcs[0]); + gjs_set_global_slot(context, GJS_GLOBAL_SLOT_IMPORTS, OBJECT_TO_JSVAL(importer)); JS_EndRequest(context); return JS_TRUE; diff -Nru cjs-2.6.2/configure.ac cjs-2.8.0/configure.ac --- cjs-2.6.2/configure.ac 2015-06-22 20:45:44.000000000 +0000 +++ cjs-2.8.0/configure.ac 2015-10-16 12:56:58.000000000 +0000 @@ -2,8 +2,8 @@ # Process this file with autoconf to produce a configure script. m4_define(pkg_major_version, 2) -m4_define(pkg_minor_version, 6) -m4_define(pkg_micro_version, 2) +m4_define(pkg_minor_version, 8) +m4_define(pkg_micro_version, 0) m4_define(pkg_version, pkg_major_version.pkg_minor_version.pkg_micro_version) m4_define(pkg_int_version, (pkg_major_version * 100 + pkg_minor_version) * 100 + pkg_micro_version) diff -Nru cjs-2.6.2/debian/changelog cjs-2.8.0/debian/changelog --- cjs-2.6.2/debian/changelog 2015-08-10 05:17:08.000000000 +0000 +++ cjs-2.8.0/debian/changelog 2016-01-08 19:19:26.000000000 +0000 @@ -1,8 +1,9 @@ -cjs (2.6.2-1build1) wily; urgency=medium +cjs (2.8.0-1) unstable; urgency=medium - * No-change rebuild against libmozjs-24-0v5. + * New upstream release (2.8.0). + * Update symbols files. - -- Martin Pitt Mon, 10 Aug 2015 07:17:08 +0200 + -- Maximiliano Curia Fri, 08 Jan 2016 20:19:26 +0100 cjs (2.6.2-1) unstable; urgency=medium diff -Nru cjs-2.6.2/debian/libcjs0.symbols cjs-2.8.0/debian/libcjs0.symbols --- cjs-2.6.2/debian/libcjs0.symbols 2015-07-07 13:28:03.000000000 +0000 +++ cjs-2.8.0/debian/libcjs0.symbols 2016-01-08 19:19:26.000000000 +0000 @@ -1,4 +1,4 @@ -# SymbolsHelper-Confirmed: 2.4.2 amd64 +# SymbolsHelper-Confirmed: 2.8.0 amd64 libcjs.so.0 libcjs0 #MINVER# _Z19gjs_type_module_getv@Base 2.4.1 _Z21gjs_coverage_get_typev@Base 2.4.1 @@ -212,6 +212,7 @@ gjs_get_prop_verbose_stub@Base 2.0.0 gjs_get_string_id@Base 2.0.0 gjs_get_type_name@Base 2.0.0 + gjs_global_importer_funcs@Base 2.8.0 gjs_gtk_container_child_set_property@Base 2.4.1 gjs_gtype_create_gtype_wrapper@Base 2.0.0 gjs_gtype_create_proto@Base 2.0.0 diff -Nru cjs-2.6.2/debian/source/lintian-overrides cjs-2.8.0/debian/source/lintian-overrides --- cjs-2.6.2/debian/source/lintian-overrides 1970-01-01 00:00:00.000000000 +0000 +++ cjs-2.8.0/debian/source/lintian-overrides 2016-01-08 19:19:26.000000000 +0000 @@ -0,0 +1 @@ +cjs source: source-is-missing modules/tweener/equations.js