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

Side by Side Diff: Source/core/inspector/InjectedScriptSource.js

Issue 307533006: DevTools: Fix closure compiler error. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
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 | Annotate | Revision Log
« no previous file with comments | « Source/core/inspector/InjectedScriptExterns.js ('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) 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 955 matching lines...) Expand 10 before | Expand all | Expand 10 after
966 966
967 /** 967 /**
968 * @param {*} obj 968 * @param {*} obj
969 * @return {string?} 969 * @return {string?}
970 */ 970 */
971 _describe: function(obj) 971 _describe: function(obj)
972 { 972 {
973 if (this.isPrimitiveValue(obj)) 973 if (this.isPrimitiveValue(obj))
974 return null; 974 return null;
975 975
976 // Type is object, get subtype. 976 var type = typeof obj;
977 var subtype = this._subtype(obj); 977 var subtype = this._subtype(obj);
978 978
979 if (subtype === "regexp") 979 if (subtype === "regexp")
980 return toString(obj); 980 return toString(obj);
981 981
982 if (subtype === "date") 982 if (subtype === "date")
983 return toString(obj); 983 return toString(obj);
984 984
985 if (subtype === "node") { 985 if (subtype === "node") {
986 var description = obj.nodeName.toLowerCase(); 986 var description = obj.nodeName.toLowerCase();
(...skipping 11 matching lines...) Expand all
998 } 998 }
999 999
1000 var className = InjectedScriptHost.internalConstructorName(obj); 1000 var className = InjectedScriptHost.internalConstructorName(obj);
1001 if (subtype === "array") { 1001 if (subtype === "array") {
1002 if (typeof obj.length === "number") 1002 if (typeof obj.length === "number")
1003 className += "[" + obj.length + "]"; 1003 className += "[" + obj.length + "]";
1004 return className; 1004 return className;
1005 } 1005 }
1006 1006
1007 // NodeList in JSC is a function, check for array prior to this. 1007 // NodeList in JSC is a function, check for array prior to this.
1008 if (typeof obj === "function") 1008 if (type === "function")
1009 return toString(obj); 1009 return toString(obj);
1010 1010
1011 if (typeof obj === "symbol") { 1011 if (type === "symbol") {
1012 try { 1012 try {
1013 return Symbol.prototype.toString.call(obj) || "Symbol"; 1013 return Symbol.prototype.toString.call(obj) || "Symbol";
1014 } catch (e) { 1014 } catch (e) {
1015 return "Symbol"; 1015 return "Symbol";
1016 } 1016 }
1017 } 1017 }
1018 1018
1019 if (className === "Object") { 1019 if (className === "Object") {
1020 // In Chromium DOM wrapper prototypes will have Object as their cons tructor name, 1020 // In Chromium DOM wrapper prototypes will have Object as their cons tructor name,
1021 // get the real DOM wrapper name from the constructor property. 1021 // get the real DOM wrapper name from the constructor property.
(...skipping 607 matching lines...) Expand 10 before | Expand all | Expand 10 after
1629 */ 1629 */
1630 _logEvent: function(event) 1630 _logEvent: function(event)
1631 { 1631 {
1632 inspectedWindow.console.log(event.type, event); 1632 inspectedWindow.console.log(event.type, event);
1633 } 1633 }
1634 } 1634 }
1635 1635
1636 injectedScript._commandLineAPIImpl = new CommandLineAPIImpl(); 1636 injectedScript._commandLineAPIImpl = new CommandLineAPIImpl();
1637 return injectedScript; 1637 return injectedScript;
1638 }) 1638 })
OLDNEW
« no previous file with comments | « Source/core/inspector/InjectedScriptExterns.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698