Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(434)

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/sdk/RemoteObject.js

Issue 2543303002: DevTools: rebaseline tests after V8 roll (Closed)
Patch Set: DevTools: rebaseline expectations after injected script source change Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 // Array lengths in V8-generated descriptions switched from square brackets to parentheses.
74 // Both formats are checked in case the front end is dealing with an old ver sion of V8.
73 var matches = object.description.match(/\[([0-9]+)\]/) || object.description .match(/\(([0-9]+)\)/); 75 var matches = object.description.match(/\[([0-9]+)\]/) || object.description .match(/\(([0-9]+)\)/);
74 if (!matches) 76 if (!matches)
75 return 0; 77 return 0;
76 return parseInt(matches[1], 10); 78 return parseInt(matches[1], 10);
77 } 79 }
78 80
79 /** 81 /**
80 * @param {!Protocol.Runtime.RemoteObject|!SDK.RemoteObject|number|string|bool ean|undefined|null} object 82 * @param {!Protocol.Runtime.RemoteObject|!SDK.RemoteObject|number|string|bool ean|undefined|null} object
81 * @return {!Protocol.Runtime.CallArgument} 83 * @return {!Protocol.Runtime.CallArgument}
82 */ 84 */
(...skipping 1331 matching lines...) Expand 10 before | Expand all | Expand 10 after
1414 } 1416 }
1415 } 1417 }
1416 1418
1417 /** 1419 /**
1418 * @return {!SDK.RemoteObject} 1420 * @return {!SDK.RemoteObject}
1419 */ 1421 */
1420 object() { 1422 object() {
1421 return this._object; 1423 return this._object;
1422 } 1424 }
1423 }; 1425 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698