Skip to content

Commit

Permalink
DevTools: expect length/size hints in descriptions with parenthesis
Browse files Browse the repository at this point in the history
This CL let's DevTools properly handle array lengths following a change to the
way descriptions are generated in injected-script-source, "Array(10)" instead of
"Array[10]".

Related CL in V8: https://codereview.chromium.org/2521853003

BUG=405845

Review-Url: https://codereview.chromium.org/2524913002
Cr-Commit-Position: refs/heads/master@{#434282}
  • Loading branch information
psybuzz authored and Commit bot committed Nov 23, 2016
1 parent b729888 commit fe72c28
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion front_end/sdk/RemoteObject.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ SDK.RemoteObject = class {
static arrayLength(object) {
if (object.subtype !== 'array' && object.subtype !== 'typedarray')
return 0;
var matches = object.description.match(/\[([0-9]+)\]/);
var matches = object.description.match(/\[([0-9]+)\]/) || object.description.match(/\(([0-9]+)\)/);
if (!matches)
return 0;
return parseInt(matches[1], 10);
Expand Down

0 comments on commit fe72c28

Please sign in to comment.