Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-23609

Windows: read-only properties incorrectly identify themselves as configurable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Not Our Bug
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Windows
    • Labels:
      None
    • Story Points:
      5
    • Sprint:
      2016 Sprint 14 SDK

      Description

      Properties like apiName on all proxies, or Ti.App.version are marked as read-only properties in our docs. That means the user should not be able to overwrite their values or delete them.On Windows, we cannot delete the property, but the common way of checking is to look at the configurable value of the property descriptor. That is oddly reporting true (which should mean it can be deleted).

      var target = Ti.API,
          propName = 'apiName';
       
       
      while (!Object.prototype.hasOwnProperty.call(target, propName)) {
          target = Object.getPrototypeOf(target); // go up the prototype chain
          if (!target) {
              alert('Failed!');
          }
      }
       
      Ti.API.info(JSON.stringify(Object.getOwnPropertyDescriptor(Object(target), propName)));
       
       
      Ti.API.info(Ti.API.apiName);
      delete Ti.API.apiName;
      Ti.API.info(Ti.API.apiName);
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                kiguchi Kota Iguchi (Inactive)
                Reporter:
                cwilliams Christopher Williams
              • Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Backbone Issue Sync

                  • Titanium SDK/CLI <> Titanium Mobile
                    Synced with:
                    TIMOB-9896
                    Sync status:
                    ERROR
                    Last received:
                    Last sent:

                    Git Integration