Menu

#77 SDK JsVariable.getName should not add '[' and ']' to property name in V8 Standalone implementation

Accepted
nobody
None
Medium
Defect
2012-12-20
2012-09-12
Anonymous
No

Originally created by: peter.ry...@gmail.com
Originally owned by: peter.ry...@gmail.com

SDK/Debugger version: 0.3.6

In V8 Standalone debug protocol implementation method getName() of JsVariable returned from JsObject.getProperties() method will return "[1]" for property named "1" (because it is parsed as numeric property and because V8 internally handles it as 'indexed'.

SDK must simply return plain property name "1" without any decorations. It should be up to UI to add those decorators. Additionally, helper method "getNameAsNumber" could be provided for those who got used to handle numeric properties differently.

Related

Tickets: #75
Tickets: #76

Discussion

  • Anonymous

    Anonymous - 2012-09-12

    Originally posted by: peter.ry...@gmail.com

    This change is likely to break a current (unformal) contract about property names. It should be considered a breaking change and submitted within a major SDK update (0.4.0).

     
  • Anonymous

    Anonymous - 2012-09-12

    Originally posted by: redsandro

    Also, as discussed in the original bug:
    https://code.google.com/p/chromedevtools/issues/detail?id=75
    there is an end to this behavior, as "3000000000" will return [3000000000] but "9000000000" will (correctly) return "9000000000".

     

    Related

    Tickets: #75


Log in to post a comment.