| 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 958 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 969 | 969 |
| 970 /** | 970 /** |
| 971 * @param {!Object} topCallFrame | 971 * @param {!Object} topCallFrame |
| 972 * @param {!Object} parsedCallFrameId | 972 * @param {!Object} parsedCallFrameId |
| 973 * @param {!Array.<!Object>} asyncCallStacks | 973 * @param {!Array.<!Object>} asyncCallStacks |
| 974 * @return {?Object} | 974 * @return {?Object} |
| 975 */ | 975 */ |
| 976 _callFrameForParsedId: function(topCallFrame, parsedCallFrameId, asyncCallSt
acks) | 976 _callFrameForParsedId: function(topCallFrame, parsedCallFrameId, asyncCallSt
acks) |
| 977 { | 977 { |
| 978 var asyncOrdinal = parsedCallFrameId["asyncOrdinal"]; // 1-based index | 978 var asyncOrdinal = parsedCallFrameId["asyncOrdinal"]; // 1-based index |
| 979 if (asyncOrdinal) | 979 // FIXMEDART: change this next line back to |
| 980 // if (asyncOrdinal) |
| 981 // once we can remove the hack of giving JavaScript callframes from |
| 982 // mixed Dart-JavaScript call stacks ordinal -1 to trigger the |
| 983 // safer code path used to simulate evaluating code on the call frame |
| 984 // for async call frames. |
| 985 if (asyncOrdinal >= 1) |
| 980 topCallFrame = asyncCallStacks[asyncOrdinal - 1]; | 986 topCallFrame = asyncCallStacks[asyncOrdinal - 1]; |
| 981 var ordinal = parsedCallFrameId["ordinal"]; | 987 var ordinal = parsedCallFrameId["ordinal"]; |
| 982 var callFrame = topCallFrame; | 988 var callFrame = topCallFrame; |
| 983 while (--ordinal >= 0 && callFrame) | 989 while (--ordinal >= 0 && callFrame) |
| 984 callFrame = callFrame.caller; | 990 callFrame = callFrame.caller; |
| 985 return callFrame; | 991 return callFrame; |
| 986 }, | 992 }, |
| 987 | 993 |
| 988 /** | 994 /** |
| 989 * @param {!Object} objectId | 995 * @param {!Object} objectId |
| (...skipping 815 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1805 */ | 1811 */ |
| 1806 _logEvent: function(event) | 1812 _logEvent: function(event) |
| 1807 { | 1813 { |
| 1808 inspectedWindow.console.log(event.type, event); | 1814 inspectedWindow.console.log(event.type, event); |
| 1809 } | 1815 } |
| 1810 } | 1816 } |
| 1811 | 1817 |
| 1812 injectedScript._commandLineAPIImpl = new CommandLineAPIImpl(); | 1818 injectedScript._commandLineAPIImpl = new CommandLineAPIImpl(); |
| 1813 return injectedScript; | 1819 return injectedScript; |
| 1814 }) | 1820 }) |
| OLD | NEW |