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

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

Issue 324013005: Make object property symbols pinnable and adjust symbol color in console. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 6 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
« no previous file with comments | « Source/devtools/front_end/inspector.css ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 316 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
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 }
OLDNEW
« no previous file with comments | « Source/devtools/front_end/inspector.css ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698