Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. | 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. |
| 3 * Copyright (C) 2009 Joseph Pecoraro | 3 * Copyright (C) 2009 Joseph Pecoraro |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 870 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 881 this._editingCancelled(); | 881 this._editingCancelled(); |
| 882 return; | 882 return; |
| 883 } | 883 } |
| 884 } | 884 } |
| 885 | 885 |
| 886 /** | 886 /** |
| 887 * @param {string} expression | 887 * @param {string} expression |
| 888 */ | 888 */ |
| 889 _applyExpression(expression) { | 889 _applyExpression(expression) { |
| 890 var property = SDK.RemoteObject.toCallArgument(this.property.symbol || this. property.name); | 890 var property = SDK.RemoteObject.toCallArgument(this.property.symbol || this. property.name); |
| 891 expression = expression.trim(); | 891 expression = SDK.RuntimeModel.wrapObjectLiteralExpressionIfNeeded(expression .trim()); |
|
lushnikov
2017/04/08 00:11:09
why can't we always surround with parentheses? + @
kozy
2017/04/20 00:17:20
it changes semantic.
| |
| 892 if (expression) | 892 if (expression) |
| 893 this.property.parentObject.setPropertyValue(property, expression, callback .bind(this)); | 893 this.property.parentObject.setPropertyValue(property, expression, callback .bind(this)); |
| 894 else | 894 else |
| 895 this.property.parentObject.deleteProperty(property, callback.bind(this)); | 895 this.property.parentObject.deleteProperty(property, callback.bind(this)); |
| 896 | 896 |
| 897 /** | 897 /** |
| 898 * @param {?Protocol.Error} error | 898 * @param {?Protocol.Error} error |
| 899 * @this {ObjectUI.ObjectPropertyTreeElement} | 899 * @this {ObjectUI.ObjectPropertyTreeElement} |
| 900 */ | 900 */ |
| 901 function callback(error) { | 901 function callback(error) { |
| (...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1343 } | 1343 } |
| 1344 var treeOutlineId = treeElement.treeOutline[ObjectUI.ObjectPropertiesSection ExpandController._treeOutlineId]; | 1344 var treeOutlineId = treeElement.treeOutline[ObjectUI.ObjectPropertiesSection ExpandController._treeOutlineId]; |
| 1345 result = treeOutlineId + (result ? ':' + result : ''); | 1345 result = treeOutlineId + (result ? ':' + result : ''); |
| 1346 treeElement[ObjectUI.ObjectPropertiesSectionExpandController._cachedPathSymb ol] = result; | 1346 treeElement[ObjectUI.ObjectPropertiesSectionExpandController._cachedPathSymb ol] = result; |
| 1347 return result; | 1347 return result; |
| 1348 } | 1348 } |
| 1349 }; | 1349 }; |
| 1350 | 1350 |
| 1351 ObjectUI.ObjectPropertiesSectionExpandController._cachedPathSymbol = Symbol('cac hedPath'); | 1351 ObjectUI.ObjectPropertiesSectionExpandController._cachedPathSymbol = Symbol('cac hedPath'); |
| 1352 ObjectUI.ObjectPropertiesSectionExpandController._treeOutlineId = Symbol('treeOu tlineId'); | 1352 ObjectUI.ObjectPropertiesSectionExpandController._treeOutlineId = Symbol('treeOu tlineId'); |
| OLD | NEW |