Changeset 249268 in webkit
- Timestamp:
- Aug 29, 2019, 6:11:15 AM (7 years ago)
- Location:
- releases/WebKitGTK/webkit-2.26/Source/WebInspectorUI
- Files:
-
- 3 edited
-
ChangeLog (modified) (1 diff)
-
UserInterface/Controllers/JavaScriptRuntimeCompletionProvider.js (modified) (4 diffs)
-
UserInterface/Models/CallFrame.js (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
releases/WebKitGTK/webkit-2.26/Source/WebInspectorUI/ChangeLog
r249185 r249268 1 2019-08-28 Devin Rousso <drousso@apple.com> 2 3 Web Inspector: REGRESSION(r249078): JavaScript autocomplete doesn't work when evaluating properties of values 4 https://bugs.webkit.org/show_bug.cgi?id=201226 5 6 Reviewed by Joseph Pecoraro. 7 8 r249078 modified `WI.JavaScriptRuntimeCompletionProvider` to use arrays of property names 9 instead of objects for completion, but a few code paths were missed. 10 11 * UserInterface/Controllers/JavaScriptRuntimeCompletionProvider.js: 12 (WI.JavaScriptRuntimeCompletionProvider.prototype.completionControllerCompletionsNeeded.evaluated): 13 (WI.JavaScriptRuntimeCompletionProvider.prototype.completionControllerCompletionsNeeded.receivedPropertyNamesFromEvaluate): 14 (WI.JavaScriptRuntimeCompletionProvider.prototype.completionControllerCompletionsNeeded.receivedObjectPropertyNames): Added. 15 (WI.JavaScriptRuntimeCompletionProvider.prototype.completionControllerCompletionsNeeded.receivedArrayPropertyNames): 16 17 * UserInterface/Models/CallFrame.js: 18 (WI.CallFrame.prototype.collectScopeChainVariableNames): 19 (WI.CallFrame.prototype.collectScopeChainVariableNames.propertiesCollected): 20 1 21 2019-08-27 Devin Rousso <drousso@apple.com> 2 22 -
releases/WebKitGTK/webkit-2.26/Source/WebInspectorUI/UserInterface/Controllers/JavaScriptRuntimeCompletionProvider.js
r249185 r249268 166 166 WI.runtimeManager.activeExecutionContext.target.RuntimeAgent.releaseObjectGroup("completion"); 167 167 168 updateLastPropertyNames.call(this, {});168 updateLastPropertyNames.call(this, []); 169 169 completionController.updateCompletions(defaultCompletions); 170 170 … … 227 227 result.callFunctionJSON(inspectedPage_evalResult_getArrayCompletions, undefined, receivedArrayPropertyNames.bind(this)); 228 228 else if (result.type === "object" || result.type === "function") 229 result.callFunctionJSON(inspectedPage_evalResult_getCompletions, undefined, received PropertyNames.bind(this));229 result.callFunctionJSON(inspectedPage_evalResult_getCompletions, undefined, receivedObjectPropertyNames.bind(this)); 230 230 else if (result.type === "string" || result.type === "number" || result.type === "boolean" || result.type === "symbol") { 231 231 let options = {objectGroup: "completion", includeCommandLineAPI: false, doNotPauseOnExceptionsAndMuteConsole: true, returnByValue: true, generatePreview: false, saveResult: false}; … … 237 237 function receivedPropertyNamesFromEvaluate(object, wasThrown, result) 238 238 { 239 receivedPropertyNames.call(this, result && !wasThrown ? result.value : null); 239 receivedPropertyNames.call(this, result && !wasThrown ? Object.keys(result.value) : null); 240 } 241 242 function receivedObjectPropertyNames(propertyNames) 243 { 244 receivedPropertyNames.call(this, Object.keys(propertyNames)); 240 245 } 241 246 … … 251 256 } 252 257 253 received PropertyNames.call(this, propertyNames);258 receivedObjectPropertyNames.call(this, propertyNames); 254 259 } 255 260 256 261 function receivedPropertyNames(propertyNames) 257 262 { 258 propertyNames = propertyNames ? Object.keys(propertyNames) : []; 263 console.assert(!propertyNames || Array.isArray(propertyNames)); 264 propertyNames = propertyNames || []; 259 265 260 266 updateLastPropertyNames.call(this, propertyNames); -
releases/WebKitGTK/webkit-2.26/Source/WebInspectorUI/UserInterface/Models/CallFrame.js
r248589 r249268 71 71 collectScopeChainVariableNames(callback) 72 72 { 73 var result = {this: true, __proto__: null};73 let result = ["this", "__proto__"]; 74 74 75 75 var pendingRequests = this._scopeChain.length; … … 78 78 { 79 79 for (var i = 0; properties && i < properties.length; ++i) 80 result [properties[i].name] = true;80 result.push(properties[i].name); 81 81 82 82 if (--pendingRequests)
Note:
See TracChangeset
for help on using the changeset viewer.