OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 return remoteObject.type; | 63 return remoteObject.type; |
64 } | 64 } |
65 | 65 |
66 /** | 66 /** |
67 * @param {!SDK.RemoteObject|!Protocol.Runtime.RemoteObject|!Protocol.Runtime.
ObjectPreview} object | 67 * @param {!SDK.RemoteObject|!Protocol.Runtime.RemoteObject|!Protocol.Runtime.
ObjectPreview} object |
68 * @return {number} | 68 * @return {number} |
69 */ | 69 */ |
70 static arrayLength(object) { | 70 static arrayLength(object) { |
71 if (object.subtype !== 'array' && object.subtype !== 'typedarray') | 71 if (object.subtype !== 'array' && object.subtype !== 'typedarray') |
72 return 0; | 72 return 0; |
73 var matches = object.description.match(/\[([0-9]+)\]/); | 73 var matches = object.description.match(/\[([0-9]+)\]/) || object.description
.match(/\(([0-9]+)\)/); |
74 if (!matches) | 74 if (!matches) |
75 return 0; | 75 return 0; |
76 return parseInt(matches[1], 10); | 76 return parseInt(matches[1], 10); |
77 } | 77 } |
78 | 78 |
79 /** | 79 /** |
80 * @param {!Protocol.Runtime.RemoteObject|!SDK.RemoteObject|number|string|bool
ean|undefined|null} object | 80 * @param {!Protocol.Runtime.RemoteObject|!SDK.RemoteObject|number|string|bool
ean|undefined|null} object |
81 * @return {!Protocol.Runtime.CallArgument} | 81 * @return {!Protocol.Runtime.CallArgument} |
82 */ | 82 */ |
83 static toCallArgument(object) { | 83 static toCallArgument(object) { |
(...skipping 1330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1414 } | 1414 } |
1415 } | 1415 } |
1416 | 1416 |
1417 /** | 1417 /** |
1418 * @return {!SDK.RemoteObject} | 1418 * @return {!SDK.RemoteObject} |
1419 */ | 1419 */ |
1420 object() { | 1420 object() { |
1421 return this._object; | 1421 return this._object; |
1422 } | 1422 } |
1423 }; | 1423 }; |
OLD | NEW |