summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'sonny-master-patch-71423' into 'master'HEADmasterPhilip Chimento2023-05-121-1/+1
|\ | | | | | | | | doc: Fix http-client.js example See merge request GNOME/gjs!840
| * doc: Fix http-client.js examplesonny-master-patch-71423Sonny Piers2023-05-041-1/+1
|/
* DOAP: Replace defunct mailing-list with developer-forum (GNOME Discourse)Andre Klapper2023-04-271-2/+2
|
* Merge branch 'fix-issue-472' into 'master'Philip Chimento2023-04-141-0/+3
|\ | | | | | | | | | | | | context: Clear all vectors of JS::Heap on dispose Closes #472 See merge request GNOME/gjs!834
| * context: Clear all vectors of JS::Heap on disposeDaniel van Vugt2023-04-131-0/+3
|/ | | | | | | | Otherwise we might still have some `JS::Heap`s lingering after `JS_DestroyContext`, which will fail to destruct (crash) when their destructors are called later in `~GjsContextPrivate()`. Fixes: https://gitlab.gnome.org/GNOME/gjs/-/issues/472
* Merge branch 'meson-test-dependencies-fix' into 'master'Philip Chimento2023-04-092-2/+7
|\ | | | | | | | | installed-tests/meson: Add tests dependencies on gjs console and GjsPrivate See merge request GNOME/gjs!835
| * installed-tests/meson: Add GjsPrivate as tests dependencyMarco Trevisan (Treviño)2023-04-052-2/+7
| | | | | | | | | | | | It's used by gjs internally, so add it as default tests dependencies. Without this `meson test` would fail without compiling before.
| * installed-tests/meson: Add tests dependencies on gjs consoleMarco Trevisan (Treviño)2023-04-051-2/+2
| | | | | | | | We require the console to run the tests so add it as dependencies.
* | Merge branch 'cb-during-gc-fixes' into 'master'Philip Chimento2023-04-099-50/+111
|\ \ | |/ |/| | | | | Better handling of callbacks during GC See merge request GNOME/gjs!832
| * function: Always initialize callback return valueSebastian Keller2023-04-061-10/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When callback_closure() exits early, for example due to being called during GC, the return value would not be initialized. This value is often non-zero. If the callback is a source func of an idle or a timeout this would then get interpreted as G_SOURCE_CONTINUE and the same would repeat in the next iteration. If this happens fast enough, this results in the entire process being seemingly frozen while spamming the log with error messages. To fix this always initialize the return value to 0 or a comparable neutral value. Related: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/1868
| * stack: Print stack trace using glib logging functionsSebastian Keller2023-04-069-40/+103
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the gjs process is logging to the systemd journal directly via the glib logging functions, the stack trace would get logged indirectly via stderr. This however is not guaranteed to get added to the journal at the same time as the error messages logged via glib. This is especially noticeable when triggered from an endless loop or an idle callback. In some cases it even can result in the stack trace not getting logged at all. There is currently no public API in mozjs to dump a stack trace directly to a string from arbitrary threads, only to files, so this uses open_memstream() as a workaround. Related: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/1868
* | Merge branch 'sanitize-mask-return' into 'master'Philip Chimento2023-04-052-27/+23
|\ \ | |/ |/| | | | | | | | | Use the mask for the GFlagsClass to compute valid values for flags passed from C Closes #507 See merge request GNOME/gjs!829
| * CI: Fix case where upstream base branch already existsPhilip Chimento2023-04-041-1/+1
| |
| * Use the mask for the flagsclass to compute valid valuesSundeep Mediratta2023-04-041-26/+22
|/ | | | Fix Errors
* Merge branch 'doc-runAsync' into 'master'Philip Chimento2023-04-031-0/+25
|\ | | | | | | | | doc: Add Gio and GLib runAsync overrides See merge request GNOME/gjs!833
| * doc: Add Gio and GLib runAsync overridesSonny Piers2023-04-031-0/+25
|/
* Merge branch 'fix/skip_gtk_tests-build' into 'master'Philip Chimento2023-03-182-7/+7
|\ | | | | | | | | fix(build, tests): move `have_gtk4` to the appropriate place See merge request GNOME/gjs!830
| * fix(build, tests): move `have_gtk4` to the appropriate placeDominik Opyd2023-03-082-7/+7
| |
* | build: Post-branch version bumpPhilip Chimento2023-03-181-1/+1
| |
* | release: Prepare for 1.76.01.76.0Philip Chimento2023-03-181-0/+5
| |
* | build: Pre-release version bumpPhilip Chimento2023-03-181-1/+1
|/
* release: Prepare for 1.75.901.75.90Philip Chimento2023-03-051-0/+15
|
* build: Pre-release version bumpPhilip Chimento2023-03-051-1/+1
|
* Merge branch 'february-maintenance' into 'master'Philip Chimento2023-03-0529-80/+188
|\ | | | | | | | | February maintenance See merge request GNOME/gjs!828
| * context: Fix job queue ending prematurely when dispatcher resetPhilip Chimento2023-03-043-15/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the promise job dispatcher is reset, its GCancellable is replaced with a different instance. However, the original GCancellable instance was passed to GjsContextPrivate::runJobs(), which aborts the job queue if the GCancellable is cancelled. This wasn't normally a problem, because the GCancellable isn't usually cancelled. However, running JS with code coverage instrumentation starts and stops the job dispatcher after every job, in order for the debugger code to do its thing. So the GCancellable was getting cancelled and immediately replaced with a fresh one, but the job queue was still getting aborted. This still didn't seem to have any noticeable effect until we merged the runAsync() feature recently. From that point, async module evaluate operations started getting dropped on the floor when code coverage was active, which is very bad news. The fix is to not hold on to the GCancellable across jobs. Instead of checking whether the GCancellable is cancelled, instead check whether the promise job dispatcher is running.
| * mainloop: Instrument main loop and promise job dispatcher with debug logsPhilip Chimento2023-03-046-10/+36
| | | | | | | | | | This adds a new debug topic, JS MAINLOOP, and adds debug log statements to the promise job queue, GSource, dispatcher, and main loop machinery.
| * context: Instrument module evaluation promises with debug logsPhilip Chimento2023-03-041-0/+18
| |
| * minijasmine: Remove irrelevant commentPhilip Chimento2023-03-041-1/+0
| | | | | | | | | | Calling this matter of opinion "lame" annoys me and is not the kind of example I want to set in this codebase.
| * minijasmine: Remove unused stack filter linePhilip Chimento2023-03-041-1/+0
| | | | | | | | | | The tag `<jasmine-start>` is no longer used, this has moved into resource:///org/gjs/jsunit/minijasmine-executor.js
| * context: Use module name in promise reaction function debug tagPhilip Chimento2023-03-041-2/+2
| | | | | | | | | | | | For debugging, make sure the module identifier is part of the promise reaction function's debug tag, so that when we break on it we can tell which module was being evaluated.
| * context: Use correct debug tag with promise reaction functionPhilip Chimento2023-03-041-2/+2
| | | | | | | | | | | | | | The reaction functions of the module evaluation promise accidentally had their function IDs switched, leading to potential confusion when debugging: a function called "async reject" would be called when the module evaluation promise resolved, and vice versa.
| * repo: Define namespace property on imports.gi after looking up _init()Philip Chimento2023-03-041-4/+4
| | | | | | | | | | | | | | We don't need the imports.gi.NameSpace property defined during the property lookup of _init(), only when executing it. Defining it slightly later allows us to roll back the import more effectively if the lookup fails.
| * repo: Check that GI module override function is callablePhilip Chimento2023-03-0410-2/+75
| | | | | | | | | | Previously, we would return the override function if it was null, or a non-callable object, and then try to call it. Add tests for this case.
| * esm: Improve startup time by delaying imports of native and GI modulesPhilip Chimento2023-03-043-23/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By avoiding using import.meta.importSync() and imports.gi at the top level of modules that we import during the bootstrap process, we speed up the execution of a blank file by 15%, because we don't need to go into any of the GI typelib machinery. Now, the only modules imported at startup are _print, _encoding, _timers, and console, in order to provide public global APIs. I measured the 15% speedup with `perf stat -r 10 -B`. I also used Meson's measurements of the test suite to see a noticeable effect: for example, running the CommandLine test (which starts many instances of GJS) goes goes from 5.4 to 4.9 seconds. The cost of importing these modules is instead paid at the first time they're used. This assumes that it's nearly zero cost to import the modules a second time, because they're cached. In addition, this should make debugging easier because you don't get a big log spew of importing GLib if your script doesn't import GLib.
| * gi: Roll back change to imports.gi.versions object if gi.require() failsPhilip Chimento2023-03-042-6/+19
| | | | | | | | | | If something like gi.require('GLib', '1.75') fails, then we don't want the faulty version number remaining on the imports.gi.versions object.
| * GLib: Remove circular dependency between GLib and ByteArrayPhilip Chimento2023-03-041-8/+5
| | | | | | | | | | ByteArray.fromString() is already defined by _byteArrayNative and re-exported; while ByteArray.toGBytes() just calls new GLib.Bytes anyway.
| * cleanup: Replace static_cast<GjsContext*> with runtime castPhilip Chimento2023-03-044-7/+5
|/ | | | | The runtime cast is defined anyway by the GObject macros, and allows turning runtime checking on or off at build time as desired.
* Merge branch 'trampoline-supports-instance-strings' into 'master'Philip Chimento2023-03-045-27/+51
|\ | | | | | | | | | | | | function: Do not leak strings returned by transfer-none trampolines Closes #519 See merge request GNOME/gjs!823
| * function: Do not leak strings returned by transfer-none trampolinesMarco Trevisan (Treviño)2023-03-045-27/+51
|/ | | | | | | | | | | | | When a VFunc or a callback returns a transfer-none string we were breaking the introspection because it was causing a leak. Now, in case these strings are returned by vfunc's of an object, we can just safely associate them to the object using qdata, while in case we're handling a callback we can use GLib internal strings to hold these strings just once in memory. While this is technically still a waste we're leaking just once, so it shouldn't be a big deal. Closes: #519
* Merge branch 'object-value-string-test-enable' into 'master'Philip Chimento2023-03-041-2/+0
|\ | | | | | | | | testGObjectValue: Enable creating object with a string property See merge request GNOME/gjs!826
| * testGObjectValue: Enable creating object with a string propertyMarco Trevisan (Treviño)2023-02-241-2/+0
| | | | | | | | This required GNOME/gobject-introspection!268 but that's now merged.
* | Merge branch 'signed-char-fix' into 'master'Philip Chimento2023-03-041-3/+3
|\ \ | | | | | | | | | | | | | | | | | | value: Use a signed char to old g_value_get_schar result Closes #529 See merge request GNOME/gjs!825
| * | gi/value: Cleanup schar setting codeMarco Trevisan (Treviño)2023-02-231-2/+2
| | | | | | | | | | | | | | | | | | We still need to use an int32 to hold its result (as that's where a signed char is stored in JS), but if the conversion is fine we need to cast its value to signed char. Do it using C++ style now though.
| * | value: Use a signed char to old g_value_get_schar resultMarco Trevisan (Treviño)2023-02-231-1/+1
| |/ | | | | | | | | | | | | | | | | char and signed char are the same in most of platforms, but that's not always true such as in arm64, s390x, ppc64el and others. See: https://buildd.debian.org/status/fetch.php?pkg=gjs&arch=arm64&ver=1.75.2-1&stamp=1676991213&raw=0 Closes: #529
* | Merge branch 'fix-gio-priorities' into 'master'Philip Chimento2023-03-011-3/+4
|\ \ | | | | | | | | | | | | Gio: Use proper default priority on async generators See merge request GNOME/gjs!827
| * | Gio: Use proper default priority on async generatorsMarco Trevisan (Treviño)2023-02-281-3/+4
| |/ | | | | | | Gio.DEFAULT_PRIORITY is undefined given that's exposed by GLib instead.
* | Merge branch 'more-gjs-apps' into 'master'Philip Chimento2023-02-271-18/+28
|\ \ | |/ |/| | | | | doc: Add more apps written in GJS See merge request GNOME/gjs!822
| * doc: Re-organize appsSonny Piers2023-02-251-17/+23
| | | | | | | | | | Merge GNOME Core and Circle apps - it's the best and most fair indication of quality we have.
| * doc: Remove Marker appSonny Piers2023-02-251-1/+0
| | | | | | | | Not written in GJS
| * doc: Remove Gnomit appSonny Piers2023-02-251-1/+0
| | | | | | | | | | | | A more up to date codebase is available in the fork "Commit". The Gnomit repository has been archived.