Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-5090] Giving names to KrollContext, KrollCallback, etc.

GitHub Issuen/a
TypeNew Feature
PriorityTrivial
StatusClosed
ResolutionWon't Fix
Resolution Date2020-02-13T15:14:09.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsiOS
Labelscore, tbs-1.9.0
ReporterRick Blalock
AssigneeEric Merriman
Created2011-08-24T06:15:23.000+0000
Updated2020-02-13T15:14:09.000+0000

Description

If you do something like console out 'this' inside a callback you get back "KrollCallback 0x000123". In Instruments you can see where this is at by looking at the '0x000123' or however many characters it is. Is there a way to name these? A good example is NodeJS. When you're doing any debugging in NodeJS you can name your callbacks in place and they will show up in the stack trace. I.e. someEvent('res', function coolbeans() {}); Then 'coolbeans' will show up in the stack trace. Is it possible to give KrollCallbacks actual names?

Comments

  1. Blain Hamon 2013-05-20

    I do want the memory address (it'd be 32 bits, so 8 digits) to stay, as it vastly helps in differentiating between objects on the native side. However, we do have some options on what other information is provided as well. The following Kroll classes have JS analogs. * KrollBridge: Not visible to JS. * KrollContext: Not visible to JS. * KrollMethod: Represents a function on a proxy. * KrollCallback: Represents a JS function held natively. * KrollWrapper: Represents a JS object, not held. * KrollObject: Proxy, already reports the proxy information.
  2. Rene Pot 2020-02-13

    no longer relevant

JSON Source