Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
gjs
gjs
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 101
    • Issues 101
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 17
    • Merge Requests 17
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • CI / CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • GNOME
  • gjsgjs
  • Merge Requests
  • !188

Merged
Opened Jul 09, 2018 by Georges Basile Stavracas Neto@feaneronDeveloper

object: Add GObject properties to the correct prototype

  • Overview 3
  • Commits 1
  • Pipelines 2
  • Changes 2

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 (closed)

Edited Jul 09, 2018 by Georges Basile Stavracas Neto
Assignee
Assign to
Reviewer
Request review from
GNOME 3.30.0
Milestone
GNOME 3.30.0 (Past due)
Assign milestone
Time tracking
Reference: GNOME/gjs!188
Source branch: gbsneto/issue-171

Revert this merge request

This will create a new commit in order to revert the existing changes.

Switch branch
Cancel
A new branch will be created in your fork and a new merge request will be started.

Cherry-pick this merge request

Switch branch
Cancel
A new branch will be created in your fork and a new merge request will be started.