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

Side by Side Diff: Source/core/inspector/InjectedScriptSource.js

Issue 466243002: Support merged Dart-JS callstacks (Closed) Base URL: svn://svn.chromium.org/blink/branches/dart/dartium
Patch Set: Created 6 years, 4 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 | Annotate | Revision Log
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 958 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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 })
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698