Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-10577] iOS: Kroll: Introspection is too introspective

GitHub Issuen/a
TypeBug
PriorityLow
StatusOpen
ResolutionUnresolved
Affected Version/sRelease 2.0.1, Release 3.0.0
Fix Version/sn/a
ComponentsiOS
Labelsarchitecture, core
ReporterBlain Hamon
AssigneeUnknown
Created2012-08-23T12:51:45.000+0000
Updated2018-02-28T20:04:15.000+0000

Description

Ever since 0.9, we expose properties based on key value coding and checking for method selectors. The problem is that this inadvertently expose items that:

Internal proxy properties not designed to work with JS

NSObject properties and methods not designed for JS

For example, TiWindowProxy has an internal method _window pointing to the App's UIWindow. Or even more comically, the -[retain] and -[autorelease] meet the signature of a property. JS can refer to these false properties and crash the app. This is bad. This was part of the design, dating back to 0.9. Steps:

Come up with new protocol that is not KVC-discoverable

Implement secondary protocol

Transition to secondary protocol

Phase out older KVC-based ones

Comments

No comments

JSON Source