OLD | NEW |
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 1059 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1070 | 1070 |
1071 return; | 1071 return; |
1072 } | 1072 } |
1073 | 1073 |
1074 object = /** @type {Object} */ (object); | 1074 object = /** @type {Object} */ (object); |
1075 | 1075 |
1076 this.objectId = injectedScript._bind(object, objectGroupName); | 1076 this.objectId = injectedScript._bind(object, objectGroupName); |
1077 var subtype = injectedScript._subtype(object); | 1077 var subtype = injectedScript._subtype(object); |
1078 if (subtype) | 1078 if (subtype) |
1079 this.subtype = subtype; | 1079 this.subtype = subtype; |
1080 this.className = InjectedScriptHost.internalConstructorName(object); | 1080 var className = InjectedScriptHost.internalConstructorName(object); |
| 1081 if (className) |
| 1082 this.className = className; |
1081 this.description = injectedScript._describe(object); | 1083 this.description = injectedScript._describe(object); |
1082 | 1084 |
1083 if (generatePreview && (this.type === "object" || injectedScript._isHTMLAllC
ollection(object))) | 1085 if (generatePreview && (this.type === "object" || injectedScript._isHTMLAllC
ollection(object))) |
1084 this.preview = this._generatePreview(object, undefined, columnNames, isT
able, false); | 1086 this.preview = this._generatePreview(object, undefined, columnNames, isT
able, false); |
1085 } | 1087 } |
1086 | 1088 |
1087 InjectedScript.RemoteObject.prototype = { | 1089 InjectedScript.RemoteObject.prototype = { |
1088 /** | 1090 /** |
1089 * @param {Object} object | 1091 * @param {Object} object |
1090 * @param {Array.<string>=} firstLevelKeys | 1092 * @param {Array.<string>=} firstLevelKeys |
(...skipping 538 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1629 */ | 1631 */ |
1630 _logEvent: function(event) | 1632 _logEvent: function(event) |
1631 { | 1633 { |
1632 inspectedWindow.console.log(event.type, event); | 1634 inspectedWindow.console.log(event.type, event); |
1633 } | 1635 } |
1634 } | 1636 } |
1635 | 1637 |
1636 injectedScript._commandLineAPIImpl = new CommandLineAPIImpl(); | 1638 injectedScript._commandLineAPIImpl = new CommandLineAPIImpl(); |
1637 return injectedScript; | 1639 return injectedScript; |
1638 }) | 1640 }) |
OLD | NEW |