cczw2010 / chromedevtools

Automatically exported from code.google.com/p/chromedevtools
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

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

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
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.

Original issue reported on code.google.com by peter.ry...@gmail.com on 12 Sep 2012 at 4:54

GoogleCodeExporter commented 8 years ago
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).

Original comment by peter.ry...@gmail.com on 12 Sep 2012 at 4:56

GoogleCodeExporter commented 8 years ago
Also, as discussed in the original bug:
http://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".

Original comment by redsandro on 12 Sep 2012 at 7:07

GoogleCodeExporter commented 8 years ago
Fixed in HEAD

Original comment by peter.ry...@gmail.com on 20 Dec 2012 at 10:39