Changeset 248589 in webkit
- Timestamp:
- Aug 12, 2019, 8:54:38 PM (6 years ago)
- Location:
- trunk/Source/WebInspectorUI
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebInspectorUI/ChangeLog
r248588 r248589 1 2019-08-12 Devin Rousso <drousso@apple.com> 2 3 Web Inspector: remove WI.DeprecatedRemoteObjectProperty 4 https://bugs.webkit.org/show_bug.cgi?id=200549 5 6 Reviewed by Joseph Pecoraro. 7 8 * UserInterface/Protocol/RemoteObject.js: 9 (WI.RemoteObject.prototype.deprecatedGetOwnProperties): Deleted. 10 (WI.RemoteObject.prototype.deprecatedGetAllProperties): Deleted. 11 (WI.RemoteObject.prototype.deprecatedGetDisplayableProperties): Deleted. 12 (WI.RemoteObject.prototype._deprecatedGetProperties): Deleted. 13 (WI.RemoteObject.prototype._deprecatedGetPropertiesResolver): Deleted. 14 (WI.DeprecatedRemoteObjectProperty): Deleted. 15 (WI.DeprecatedRemoteObjectProperty.prototype.fromPrimitiveValue): Deleted. 16 17 * UserInterface/Models/CallFrame.js: 18 (WI.CallFrame.prototype.collectScopeChainVariableNames): 19 20 * UserInterface/Views/DOMNodeDetailsSidebarPanel.js: 21 (WI.DOMNodeDetailsSidebarPanel.prototype._refreshProperties): 22 1 23 2019-08-12 Devin Rousso <drousso@apple.com> 2 24 -
trunk/Source/WebInspectorUI/UserInterface/Models/CallFrame.js
r236766 r248589 87 87 88 88 for (var i = 0; i < this._scopeChain.length; ++i) 89 this._scopeChain[i].objects[0]. deprecatedGetAllProperties(propertiesCollected);89 this._scopeChain[i].objects[0].getPropertyDescriptors(propertiesCollected); 90 90 } 91 91 -
trunk/Source/WebInspectorUI/UserInterface/Protocol/RemoteObject.js
r248537 r248589 310 310 } 311 311 312 // FIXME: Phase out these deprecated functions. They return DeprecatedRemoteObjectProperty instead of PropertyDescriptors.313 deprecatedGetOwnProperties(callback)314 {315 this._deprecatedGetProperties(true, callback);316 }317 318 deprecatedGetAllProperties(callback)319 {320 this._deprecatedGetProperties(false, callback);321 }322 323 deprecatedGetDisplayableProperties(callback)324 {325 if (!this._objectId || this._isSymbol() || this._isFakeObject()) {326 callback([]);327 return;328 }329 330 // COMPATIBILITY (iOS 8): RuntimeAgent.getProperties did not support ownerAndGetterProperties.331 // Here we do our best to reimplement it by getting all properties and reducing them down.332 if (!this._target.RuntimeAgent.getDisplayableProperties) {333 this._target.RuntimeAgent.getProperties(this._objectId, function(error, allProperties) {334 var ownOrGetterPropertiesList = [];335 if (allProperties) {336 for (var property of allProperties) {337 if (property.isOwn || property.get || property.name === "__proto__") {338 // Own property or getter property in prototype chain.339 ownOrGetterPropertiesList.push(property);340 } else if (property.value && property.name !== property.name.toUpperCase()) {341 var type = property.value.type;342 if (type && type !== "function" && property.name !== "constructor") {343 // Possible native binding getter property converted to a value. Also, no CONSTANT name style and not "constructor".344 ownOrGetterPropertiesList.push(property);345 }346 }347 }348 }349 350 this._deprecatedGetPropertiesResolver(callback, error, ownOrGetterPropertiesList);351 }.bind(this));352 return;353 }354 355 this._target.RuntimeAgent.getDisplayableProperties(this._objectId, this._deprecatedGetPropertiesResolver.bind(this, callback));356 }357 358 312 setPropertyValue(name, value, callback) 359 313 { … … 671 625 callback(descriptors); 672 626 } 673 674 // FIXME: Phase out these deprecated functions. They return DeprecatedRemoteObjectProperty instead of PropertyDescriptors.675 _deprecatedGetProperties(ownProperties, callback)676 {677 if (!this._objectId || this._isSymbol() || this._isFakeObject()) {678 callback([]);679 return;680 }681 682 this._target.RuntimeAgent.getProperties(this._objectId, ownProperties, this._deprecatedGetPropertiesResolver.bind(this, callback));683 }684 685 _deprecatedGetPropertiesResolver(callback, error, properties, internalProperties)686 {687 if (error) {688 callback(null);689 return;690 }691 692 if (internalProperties) {693 properties = properties.concat(internalProperties.map(function(descriptor) {694 descriptor.writable = false;695 descriptor.configurable = false;696 descriptor.enumerable = false;697 descriptor.isOwn = true;698 return descriptor;699 }));700 }701 702 var result = [];703 for (var i = 0; properties && i < properties.length; ++i) {704 var property = properties[i];705 if (property.get || property.set) {706 if (property.get)707 result.push(new WI.DeprecatedRemoteObjectProperty("get " + property.name, WI.RemoteObject.fromPayload(property.get, this._target), property));708 if (property.set)709 result.push(new WI.DeprecatedRemoteObjectProperty("set " + property.name, WI.RemoteObject.fromPayload(property.set, this._target), property));710 } else711 result.push(new WI.DeprecatedRemoteObjectProperty(property.name, WI.RemoteObject.fromPayload(property.value, this._target), property));712 }713 714 callback(result);715 }716 627 }; 717 628 … … 722 633 MissingObjectId: "remote-object-source-code-location-promise-missing-object-id" 723 634 }; 724 725 // FIXME: Phase out this deprecated class.726 WI.DeprecatedRemoteObjectProperty = class DeprecatedRemoteObjectProperty727 {728 constructor(name, value, descriptor)729 {730 this.name = name;731 this.value = value;732 this.enumerable = descriptor ? !!descriptor.enumerable : true;733 this.writable = descriptor ? !!descriptor.writable : true;734 if (descriptor && descriptor.wasThrown)735 this.wasThrown = true;736 }737 738 // Static739 740 fromPrimitiveValue(name, value)741 {742 return new WI.DeprecatedRemoteObjectProperty(name, WI.RemoteObject.fromPrimitiveValue(value));743 }744 }; -
trunk/Source/WebInspectorUI/UserInterface/Views/DOMNodeDetailsSidebarPanel.js
r248052 r248589 289 289 return; 290 290 291 object. deprecatedGetOwnProperties(fillSection.bind(this));291 object.getPropertyDescriptors(fillSection.bind(this), {ownProperties: true}); 292 292 } 293 293
Note:
See TracChangeset
for help on using the changeset viewer.