Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 Components.JavaScriptAutocomplete = {}; | 5 Components.JavaScriptAutocomplete = {}; |
| 6 | 6 |
| 7 /** @typedef {{title:(string|undefined), items:Array<string>}} */ | 7 /** @typedef {{title:(string|undefined), items:Array<string>}} */ |
| 8 Components.JavaScriptAutocomplete.CompletionGroup; | 8 Components.JavaScriptAutocomplete.CompletionGroup; |
| 9 | 9 |
| 10 /** | 10 /** |
| (...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 197 group.items.push(properties[i].name); | 197 group.items.push(properties[i].name); |
| 198 if (--pendingRequests === 0) | 198 if (--pendingRequests === 0) |
| 199 callback(result); | 199 callback(result); |
| 200 } | 200 } |
| 201 | 201 |
| 202 var scopeChain = callFrame.scopeChain(); | 202 var scopeChain = callFrame.scopeChain(); |
| 203 var pendingRequests = scopeChain.length; | 203 var pendingRequests = scopeChain.length; |
| 204 for (var i = 0; i < scopeChain.length; ++i) { | 204 for (var i = 0; i < scopeChain.length; ++i) { |
| 205 var scope = scopeChain[i]; | 205 var scope = scopeChain[i]; |
| 206 var object = scope.object(); | 206 var object = scope.object(); |
| 207 object.getAllProperties(false, propertiesCollected.bind(null, scope.typeNa me())); | 207 object.getAllProperties(false, false, propertiesCollected.bind(null, scope .typeName())); |
|
dgozman
2017/01/13 02:55:41
While you are here, could you please annotate it l
luoe
2017/01/13 23:20:12
Done.
| |
| 208 } | 208 } |
| 209 } | 209 } |
| 210 | 210 |
| 211 /** | 211 /** |
| 212 * @param {?SDK.RemoteObject} result | 212 * @param {?SDK.RemoteObject} result |
| 213 * @param {!Protocol.Runtime.ExceptionDetails=} exceptionDetails | 213 * @param {!Protocol.Runtime.ExceptionDetails=} exceptionDetails |
| 214 */ | 214 */ |
| 215 function receivedPropertyNamesFromEval(result, exceptionDetails) { | 215 function receivedPropertyNamesFromEval(result, exceptionDetails) { |
| 216 executionContext.target().runtimeAgent().releaseObjectGroup('completion'); | 216 executionContext.target().runtimeAgent().releaseObjectGroup('completion'); |
| 217 if (result && !exceptionDetails) | 217 if (result && !exceptionDetails) |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 326 var structuredGroup = | 326 var structuredGroup = |
| 327 caseSensitivePrefix.concat(caseInsensitivePrefix, caseSensitiveAnywhere, caseInsensitiveAnywhere); | 327 caseSensitivePrefix.concat(caseInsensitivePrefix, caseSensitiveAnywhere, caseInsensitiveAnywhere); |
| 328 if (structuredGroup.length && group.title !== lastGroupTitle) { | 328 if (structuredGroup.length && group.title !== lastGroupTitle) { |
| 329 structuredGroup[0].subtitle = group.title; | 329 structuredGroup[0].subtitle = group.title; |
| 330 lastGroupTitle = group.title; | 330 lastGroupTitle = group.title; |
| 331 } | 331 } |
| 332 result = result.concat(structuredGroup); | 332 result = result.concat(structuredGroup); |
| 333 } | 333 } |
| 334 return result; | 334 return result; |
| 335 }; | 335 }; |
| OLD | NEW |