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 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
215 this._target = target; | 215 this._target = target; |
216 this._runtimeAgent = target.runtimeAgent(); | 216 this._runtimeAgent = target.runtimeAgent(); |
217 this._domModel = target.domModel; | 217 this._domModel = target.domModel; |
218 | 218 |
219 this._type = type; | 219 this._type = type; |
220 this._subtype = subtype; | 220 this._subtype = subtype; |
221 if (objectId) { | 221 if (objectId) { |
222 // handle | 222 // handle |
223 this._objectId = objectId; | 223 this._objectId = objectId; |
224 this._description = description; | 224 this._description = description; |
225 this._hasChildren = true; | 225 this._hasChildren = this._type === "symbol" ? false : true; |
aandrey
2014/06/17 12:29:37
this._hasChildren = (type !== "symbol");
Alexandra Mikhaylova
2014/06/17 12:32:29
Done.
| |
226 this._preview = preview; | 226 this._preview = preview; |
227 } else { | 227 } else { |
228 // Primitive or null object. | 228 // Primitive or null object. |
229 console.assert(type !== "object" || value === null); | 229 console.assert(type !== "object" || value === null); |
230 this._description = description || (value + ""); | 230 this._description = description || (value + ""); |
231 this._hasChildren = false; | 231 this._hasChildren = false; |
232 // Handle special numbers: NaN, Infinity, -Infinity, -0. | 232 // Handle special numbers: NaN, Infinity, -Infinity, -0. |
233 if (type === "number" && typeof value !== "number") | 233 if (type === "number" && typeof value !== "number") |
234 this.value = Number(value); | 234 this.value = Number(value); |
235 else | 235 else |
(...skipping 772 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1008 result = functionDeclaration.apply(target, rawArgs); | 1008 result = functionDeclaration.apply(target, rawArgs); |
1009 } catch (e) { | 1009 } catch (e) { |
1010 result = null; | 1010 result = null; |
1011 } | 1011 } |
1012 | 1012 |
1013 callback(result); | 1013 callback(result); |
1014 }, | 1014 }, |
1015 | 1015 |
1016 __proto__: WebInspector.RemoteObject.prototype | 1016 __proto__: WebInspector.RemoteObject.prototype |
1017 } | 1017 } |
OLD | NEW |