• Georges Basile Stavracas Neto's avatar
    object: Add GObject properties to the correct prototype · f6758a3c
    Georges Basile Stavracas Neto authored
    Whenever successfully resolving a property, GJS is mistakenly setting
    the property in the prototype of the prototype, instead of just the
    prototype. When that happens, it ends up breaking any properties of
    subclasses. Suppose the following scenario:
    
          GObject
             |________________
             |                |
      GCharsetConverter   Subclass2
             |
         Subclass1
    
    In this scenario, if 'Subclass1' accesses any possible property from
    GCharsetConverter, GJS resolves that but ends up setting this property
    in the prototype of the prototype.
    
    If 'Subclass2' then tries to subsequently access that property, the
    resolving process will accidentally call the wrong getter. This leads
    to an immediate crash.
    
    Fix that by using the correct object prototype when resolving the
    properties. A reproducer was added to the test suite in addition to
    the fix to this problem, as a protective measure.
    
    Fixes #171
    f6758a3c
Name
Last commit
Last update
doc Loading commit data...
examples Loading commit data...
gi Loading commit data...
gjs Loading commit data...
installed-tests Loading commit data...
libgjs-private Loading commit data...
m4 Loading commit data...
modules Loading commit data...
test Loading commit data...
tools Loading commit data...
util Loading commit data...
win32 Loading commit data...
.eslintignore Loading commit data...
.eslintrc.json Loading commit data...
.gitlab-ci.yml Loading commit data...
AUTHORS Loading commit data...
COPYING Loading commit data...
COPYING.LGPL Loading commit data...
CPPLINT.cfg Loading commit data...
ChangeLog Loading commit data...
Makefile-examples.am Loading commit data...
Makefile-insttest.am Loading commit data...
Makefile-modules.am Loading commit data...
Makefile-test.am Loading commit data...
Makefile.am Loading commit data...
NEWS Loading commit data...
README Loading commit data...
README.md Loading commit data...
autogen.sh Loading commit data...
configure.ac Loading commit data...
git.mk Loading commit data...
gjs-1.0.pc.in Loading commit data...
gjs-modules-srcs.mk Loading commit data...
gjs-srcs.mk Loading commit data...
gjs.doap Loading commit data...
verbump.py Loading commit data...