| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |