OLD | NEW |
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 316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
327 function remoteObjectBinder(error, properties, internalProperties) | 327 function remoteObjectBinder(error, properties, internalProperties) |
328 { | 328 { |
329 if (error) { | 329 if (error) { |
330 callback(null, null); | 330 callback(null, null); |
331 return; | 331 return; |
332 } | 332 } |
333 var result = []; | 333 var result = []; |
334 for (var i = 0; properties && i < properties.length; ++i) { | 334 for (var i = 0; properties && i < properties.length; ++i) { |
335 var property = properties[i]; | 335 var property = properties[i]; |
336 var propertyValue = property.value ? this._target.runtimeModel.c
reateRemoteObject(property.value) : null; | 336 var propertyValue = property.value ? this._target.runtimeModel.c
reateRemoteObject(property.value) : null; |
| 337 var propertySymbol = property.symbol ? this._target.runtimeModel
.createRemoteObject(property.symbol) : null; |
337 var remoteProperty = new WebInspector.RemoteObjectProperty(prope
rty.name, propertyValue, | 338 var remoteProperty = new WebInspector.RemoteObjectProperty(prope
rty.name, propertyValue, |
338 !!property.enumerable, !!property.writable, !!property.i
sOwn, !!property.wasThrown); | 339 !!property.enumerable, !!property.writable, !!property.i
sOwn, !!property.wasThrown, propertySymbol); |
339 | 340 |
340 if (typeof property.value === "undefined") { | 341 if (typeof property.value === "undefined") { |
341 if (property.get && property.get.type !== "undefined") | 342 if (property.get && property.get.type !== "undefined") |
342 remoteProperty.getter = this._target.runtimeModel.create
RemoteObject(property.get); | 343 remoteProperty.getter = this._target.runtimeModel.create
RemoteObject(property.get); |
343 if (property.set && property.set.type !== "undefined") | 344 if (property.set && property.set.type !== "undefined") |
344 remoteProperty.setter = this._target.runtimeModel.create
RemoteObject(property.set); | 345 remoteProperty.setter = this._target.runtimeModel.create
RemoteObject(property.set); |
345 } | 346 } |
346 | 347 |
347 result.push(remoteProperty); | 348 result.push(remoteProperty); |
348 } | 349 } |
(...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
714 } | 715 } |
715 | 716 |
716 /** | 717 /** |
717 * @constructor | 718 * @constructor |
718 * @param {string} name | 719 * @param {string} name |
719 * @param {?WebInspector.RemoteObject} value | 720 * @param {?WebInspector.RemoteObject} value |
720 * @param {boolean=} enumerable | 721 * @param {boolean=} enumerable |
721 * @param {boolean=} writable | 722 * @param {boolean=} writable |
722 * @param {boolean=} isOwn | 723 * @param {boolean=} isOwn |
723 * @param {boolean=} wasThrown | 724 * @param {boolean=} wasThrown |
| 725 * @param {?WebInspector.RemoteObject=} symbol |
724 */ | 726 */ |
725 WebInspector.RemoteObjectProperty = function(name, value, enumerable, writable,
isOwn, wasThrown) | 727 WebInspector.RemoteObjectProperty = function(name, value, enumerable, writable,
isOwn, wasThrown, symbol) |
726 { | 728 { |
727 this.name = name; | 729 this.name = name; |
728 if (value !== null) | 730 if (value !== null) |
729 this.value = value; | 731 this.value = value; |
730 this.enumerable = typeof enumerable !== "undefined" ? enumerable : true; | 732 this.enumerable = typeof enumerable !== "undefined" ? enumerable : true; |
731 this.writable = typeof writable !== "undefined" ? writable : true; | 733 this.writable = typeof writable !== "undefined" ? writable : true; |
732 this.isOwn = !!isOwn; | 734 this.isOwn = !!isOwn; |
733 this.wasThrown = !!wasThrown; | 735 this.wasThrown = !!wasThrown; |
| 736 if (symbol) |
| 737 this.symbol = symbol; |
734 } | 738 } |
735 | 739 |
736 WebInspector.RemoteObjectProperty.prototype = { | 740 WebInspector.RemoteObjectProperty.prototype = { |
737 /** | 741 /** |
738 * @return {boolean} | 742 * @return {boolean} |
739 */ | 743 */ |
740 isAccessorProperty: function() | 744 isAccessorProperty: function() |
741 { | 745 { |
742 return !!(this.getter || this.setter); | 746 return !!(this.getter || this.setter); |
743 } | 747 } |
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
962 result = functionDeclaration.apply(target, rawArgs); | 966 result = functionDeclaration.apply(target, rawArgs); |
963 } catch (e) { | 967 } catch (e) { |
964 result = null; | 968 result = null; |
965 } | 969 } |
966 | 970 |
967 callback(result); | 971 callback(result); |
968 }, | 972 }, |
969 | 973 |
970 __proto__: WebInspector.RemoteObject.prototype | 974 __proto__: WebInspector.RemoteObject.prototype |
971 } | 975 } |
OLD | NEW |