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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/sdk/DebuggerModel.js

Issue 2139363005: [DevTools] Fix native function console output (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/components/ObjectPopoverHelper.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) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 644 matching lines...) Expand 10 before | Expand all | Expand 10 after
655 { 655 {
656 return remoteObject.getAllPropertiesPromise(/* accessorPropertiesOnly */ false).then(buildDetails.bind(this)); 656 return remoteObject.getAllPropertiesPromise(/* accessorPropertiesOnly */ false).then(buildDetails.bind(this));
657 657
658 /** 658 /**
659 * @param {!{properties: ?Array.<!WebInspector.RemoteObjectProperty>, in ternalProperties: ?Array.<!WebInspector.RemoteObjectProperty>}} response 659 * @param {!{properties: ?Array.<!WebInspector.RemoteObjectProperty>, in ternalProperties: ?Array.<!WebInspector.RemoteObjectProperty>}} response
660 * @return {?WebInspector.DebuggerModel.FunctionDetails} 660 * @return {?WebInspector.DebuggerModel.FunctionDetails}
661 * @this {!WebInspector.DebuggerModel} 661 * @this {!WebInspector.DebuggerModel}
662 */ 662 */
663 function buildDetails(response) 663 function buildDetails(response)
664 { 664 {
665 if (!response || !response.internalProperties) 665 if (!response)
666 return null; 666 return null;
667 var location = null; 667 var location = null;
668 for (var prop of response.internalProperties) { 668 if (response.internalProperties) {
669 if (prop.name === "[[FunctionLocation]]") 669 for (var prop of response.internalProperties) {
670 location = prop.value; 670 if (prop.name === "[[FunctionLocation]]")
671 location = prop.value;
672 }
671 } 673 }
672 var functionName = null; 674 var functionName = null;
673 if (response.properties) { 675 if (response.properties) {
674 for (var prop of response.properties) { 676 for (var prop of response.properties) {
675 if (prop.name === "name" && prop.value && prop.value.type == = "string") 677 if (prop.name === "name" && prop.value && prop.value.type == = "string")
676 functionName = prop.value; 678 functionName = prop.value;
677 if (prop.name === "displayName" && prop.value && prop.value. type === "string") { 679 if (prop.name === "displayName" && prop.value && prop.value. type === "string") {
678 functionName = prop.value; 680 functionName = prop.value;
679 break; 681 break;
680 } 682 }
(...skipping 605 matching lines...) Expand 10 before | Expand all | Expand 10 after
1286 /** 1288 /**
1287 * @param {?WebInspector.Target} target 1289 * @param {?WebInspector.Target} target
1288 * @return {?WebInspector.DebuggerModel} 1290 * @return {?WebInspector.DebuggerModel}
1289 */ 1291 */
1290 WebInspector.DebuggerModel.fromTarget = function(target) 1292 WebInspector.DebuggerModel.fromTarget = function(target)
1291 { 1293 {
1292 if (!target || !target.hasJSContext()) 1294 if (!target || !target.hasJSContext())
1293 return null; 1295 return null;
1294 return /** @type {?WebInspector.DebuggerModel} */ (target.model(WebInspector .DebuggerModel)); 1296 return /** @type {?WebInspector.DebuggerModel} */ (target.model(WebInspector .DebuggerModel));
1295 } 1297 }
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/components/ObjectPopoverHelper.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698