[TIMOB-10577] iOS: Kroll: Introspection is too introspective
GitHub Issue | n/a |
Type | Bug |
Priority | Low |
Status | Open |
Resolution | Unresolved |
Affected Version/s | Release 2.0.1, Release 3.0.0 |
Fix Version/s | n/a |
Components | iOS |
Labels | architecture, core |
Reporter | Blain Hamon |
Assignee | Unknown |
Created | 2012-08-23T12:51:45.000+0000 |
Updated | 2018-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
JSON Source
No comments