Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-116939

QtWebEngine: Object.defineProperty not using default values for property __proto__ on Object.prototype

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P1: Critical
    • 6.5.3
    • 6.5.2
    • WebEngine
    • None
    • All
    • 3caaeda61 (108-based)

    Description

      We discovered a case where, when using the Object.defineProperty API in the Javascript environment, the expected default values are not always correct. The minimally reproducible snippet of Javascript that provokes this behavior is:

      Object.defineProperty(Object.prototype, '__proto__', {get: () => ''}); 

      After which, when inspecting the property _proto_ with Object.getOwnPropertyDescriptor(), it is listed as enumerable when it shouldn't.

      This behavior only occurs when operating on the Object.prototype object from our testing.
      When testing the same behavior on Qt 6.4.x and Qt 6.6.x this behavior does not occur.

      Attached is a minimal example that reproduces the bug

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            mibrunin Michael Bruning
            hbjerk Håvard Bjerke
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes