| 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 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 return result; | 83 return result; |
| 84 } | 84 } |
| 85 | 85 |
| 86 /** | 86 /** |
| 87 * @param {*} obj | 87 * @param {*} obj |
| 88 * @return {string} | 88 * @return {string} |
| 89 * @suppress {uselessCode} | 89 * @suppress {uselessCode} |
| 90 */ | 90 */ |
| 91 function toString(obj) | 91 function toString(obj) |
| 92 { | 92 { |
| 93 // We don't use String(obj) because String could be overridden. | 93 // We don't use String(obj) because String16 could be overridden. |
| 94 // Also the ("" + obj) expression may throw. | 94 // Also the ("" + obj) expression may throw. |
| 95 try { | 95 try { |
| 96 return "" + obj; | 96 return "" + obj; |
| 97 } catch (e) { | 97 } catch (e) { |
| 98 var name = InjectedScriptHost.internalConstructorName(obj) || InjectedSc
riptHost.subtype(obj) || (typeof obj); | 98 var name = InjectedScriptHost.internalConstructorName(obj) || InjectedSc
riptHost.subtype(obj) || (typeof obj); |
| 99 return "#<" + name + ">"; | 99 return "#<" + name + ">"; |
| 100 } | 100 } |
| 101 } | 101 } |
| 102 | 102 |
| 103 /** | 103 /** |
| (...skipping 1806 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1910 */ | 1910 */ |
| 1911 _logEvent: function(event) | 1911 _logEvent: function(event) |
| 1912 { | 1912 { |
| 1913 inspectedGlobalObject.console.log(event.type, event); | 1913 inspectedGlobalObject.console.log(event.type, event); |
| 1914 } | 1914 } |
| 1915 } | 1915 } |
| 1916 | 1916 |
| 1917 injectedScript._commandLineAPIImpl = new CommandLineAPIImpl(); | 1917 injectedScript._commandLineAPIImpl = new CommandLineAPIImpl(); |
| 1918 return injectedScript; | 1918 return injectedScript; |
| 1919 }) | 1919 }) |
| OLD | NEW |