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

Side by Side Diff: third_party/WebKit/Source/platform/v8_inspector/InjectedScriptSource.js

Issue 2112673003: [DevTools] Move suspended generator location to internal properties (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressed comments Created 4 years, 5 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2007 Apple Inc. All rights reserved. 2 * Copyright (C) 2007 Apple Inc. All rights reserved.
3 * Copyright (C) 2013 Google Inc. All rights reserved. 3 * Copyright (C) 2013 Google Inc. All rights reserved.
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 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 * @return {boolean} 205 * @return {boolean}
206 */ 206 */
207 isPrimitiveValue: function(object) 207 isPrimitiveValue: function(object)
208 { 208 {
209 // FIXME(33716): typeof document.all is always 'undefined'. 209 // FIXME(33716): typeof document.all is always 'undefined'.
210 return InjectedScript.primitiveTypes[typeof object] && !this._isHTMLAllC ollection(object); 210 return InjectedScript.primitiveTypes[typeof object] && !this._isHTMLAllC ollection(object);
211 }, 211 },
212 212
213 /** 213 /**
214 * @param {*} object 214 * @param {*} object
215 * @return {boolean}
216 */
217 _shouldPassByValue: function(object)
218 {
219 return typeof object === "object" && InjectedScriptHost.subtype(object) === "internal#location";
220 },
221
222 /**
223 * @param {*} object
215 * @param {string} groupName 224 * @param {string} groupName
216 * @param {boolean} canAccessInspectedGlobalObject 225 * @param {boolean} canAccessInspectedGlobalObject
217 * @param {boolean} forceValueType 226 * @param {boolean} forceValueType
218 * @param {boolean} generatePreview 227 * @param {boolean} generatePreview
219 * @return {!RuntimeAgent.RemoteObject} 228 * @return {!RuntimeAgent.RemoteObject}
220 */ 229 */
221 wrapObject: function(object, groupName, canAccessInspectedGlobalObject, forc eValueType, generatePreview) 230 wrapObject: function(object, groupName, canAccessInspectedGlobalObject, forc eValueType, generatePreview)
222 { 231 {
223 if (canAccessInspectedGlobalObject) 232 if (canAccessInspectedGlobalObject)
224 return this._wrapObject(object, groupName, forceValueType, generateP review); 233 return this._wrapObject(object, groupName, forceValueType, generateP review);
(...skipping 484 matching lines...) Expand 10 before | Expand all | Expand 10 after
709 case "-Infinity": 718 case "-Infinity":
710 case "-0": 719 case "-0":
711 this.value = this.description; 720 this.value = this.description;
712 break; 721 break;
713 } 722 }
714 } 723 }
715 724
716 return; 725 return;
717 } 726 }
718 727
728 if (injectedScript._shouldPassByValue(object)) {
729 this.value = object;
730 this.subtype = injectedScript._subtype(object);
731 this.description = injectedScript._describeIncludingPrimitives(object);
732 return;
733 }
734
719 object = /** @type {!Object} */ (object); 735 object = /** @type {!Object} */ (object);
720 736
721 if (!doNotBind) 737 if (!doNotBind)
722 this.objectId = injectedScript._bind(object, objectGroupName); 738 this.objectId = injectedScript._bind(object, objectGroupName);
723 var subtype = injectedScript._subtype(object); 739 var subtype = injectedScript._subtype(object);
724 if (subtype) 740 if (subtype)
725 this.subtype = subtype; 741 this.subtype = subtype;
726 var className = InjectedScriptHost.internalConstructorName(object); 742 var className = InjectedScriptHost.internalConstructorName(object);
727 if (className) 743 if (className)
728 this.className = className; 744 this.className = className;
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after
1029 return string.substr(0, leftHalf) + "\u2026" + string.substr(string. length - rightHalf, rightHalf); 1045 return string.substr(0, leftHalf) + "\u2026" + string.substr(string. length - rightHalf, rightHalf);
1030 } 1046 }
1031 return string.substr(0, maxLength) + "\u2026"; 1047 return string.substr(0, maxLength) + "\u2026";
1032 }, 1048 },
1033 1049
1034 __proto__: null 1050 __proto__: null
1035 } 1051 }
1036 1052
1037 return injectedScript; 1053 return injectedScript;
1038 }) 1054 })
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698