object: Warn about finalized GObject in fewer cases
We want to remove this warning in cases where the subsequent code isn't actually trying to access the underlying GObject and therefore isn't going to crash. On resolve() we don't want the warning, as that only applies to prototype objects. On trace() we don't want it either, as that may legitimately be called during the GC mark phase on a JS wrapper with a disposed GObject. In the typecheck function, we only use the GObject for a debug assertion. All the other checks use the GType. We relax the assertion and only do the debug sanity check if the GObject is still alive. Instead of logging the warning here, we log the warning in gjs_g_object_from_object() which happens later when the GObject is actually used. We keep the warnings in property getters and setters, since those would access the underlying GObject, and they are now only called for names that really do resolve to GObject properties and fields. Closes: #24
Status | Job ID | Name | Coverage | ||||||
---|---|---|---|---|---|---|---|---|---|
Source Check | |||||||||
passed |
#40943
|
cppcheck |
00:00:35
|
|
|||||
passed |
#40944
|
cpplint |
00:09:15
|
|
|||||
passed |
#40945
|
eslint |
00:01:11
|
|
|||||
passed |
#40964
|
fedora |
00:02:27
|
|
|||||
failed |
#40942
|
fedora |
00:00:06
|
|
|||||
Test | |||||||||
passed |
#40965
|
fedora_clang |
00:04:47
|
|
|||||
failed |
#40946
|
fedora_clang |
00:00:06
|
|
|||||
Thorough Tests | |||||||||
passed |
#40949
|
coverage |
00:30:29
|
|
|||||
passed |
#40948
|
installed_tests |
00:02:21
|
|
|||||
manual |
#40954
allowed to fail
manual
|
lts |
|
||||||
manual |
#40953
allowed to fail
manual
|
no_graphics |
|
||||||
passed |
#40947
|
no_profiler |
00:02:14
|
|
|||||
passed |
#40950
|
sanitizer_gcc |
00:03:43
|
|
|||||
manual |
#40952
allowed to fail
manual
|
valgrind |
|
||||||
passed |
#40951
|
with_logging |
00:02:26
|
|
|||||
manual |
#40957
allowed to fail
manual
|
zeal_11 |
|
||||||
manual |
#40955
allowed to fail
manual
|
zeal_2 |
|
||||||
manual |
#40956
allowed to fail
manual
|
zeal_4 |
|
||||||
Delivery | |||||||||
manual |
#40958
allowed to fail
manual
|
packaging |
|
||||||