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

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

Issue 1767883002: DevTools: generate string16-based handlers for v8_inspector. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: for landing 2 Created 4 years, 9 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 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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 })
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698