Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(96)

Side by Side Diff: Source/devtools/front_end/sdk/RemoteObject.js

Issue 881263002: DevTools: use target-based model accessors only. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 264 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 this._type = type; 275 this._type = type;
276 this._subtype = subtype; 276 this._subtype = subtype;
277 if (objectId) { 277 if (objectId) {
278 // handle 278 // handle
279 this._objectId = objectId; 279 this._objectId = objectId;
280 this._description = description; 280 this._description = description;
281 this._hasChildren = (type !== "symbol"); 281 this._hasChildren = (type !== "symbol");
282 this._preview = preview; 282 this._preview = preview;
283 } else { 283 } else {
284 // Primitive or null object. 284 // Primitive or null object.
285 console.assert(type !== "object" || value === null);
286 this._description = description || (value + ""); 285 this._description = description || (value + "");
287 this._hasChildren = false; 286 this._hasChildren = false;
288 // Handle special numbers: NaN, Infinity, -Infinity, -0. 287 // Handle special numbers: NaN, Infinity, -Infinity, -0.
289 if (type === "number" && typeof value !== "number") 288 if (type === "number" && typeof value !== "number")
290 this.value = Number(value); 289 this.value = Number(value);
291 else 290 else
292 this.value = value; 291 this.value = value;
293 } 292 }
294 this._customPreview = customPreview || null; 293 this._customPreview = customPreview || null;
295 } 294 }
(...skipping 897 matching lines...) Expand 10 before | Expand all | Expand 10 after
1193 { 1192 {
1194 if (!this._cachedDescription) { 1193 if (!this._cachedDescription) {
1195 var children = this._children(); 1194 var children = this._children();
1196 this._cachedDescription = "{" + this._formatValue(children[0].value) + " => " + this._formatValue(children[1].value) + "}"; 1195 this._cachedDescription = "{" + this._formatValue(children[0].value) + " => " + this._formatValue(children[1].value) + "}";
1197 } 1196 }
1198 return this._cachedDescription; 1197 return this._cachedDescription;
1199 }, 1198 },
1200 1199
1201 __proto__: WebInspector.LocalJSONObject.prototype 1200 __proto__: WebInspector.LocalJSONObject.prototype
1202 } 1201 }
OLDNEW
« no previous file with comments | « Source/devtools/front_end/sdk/PowerProfiler.js ('k') | Source/devtools/front_end/sdk/ResourceTreeModel.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698