Consider this program: ``` var shouldComputeSin = false; var shouldComputeCos = true; function computeSin(obj, x) { if (shouldComputeSin) obj.sin = Math.sin(x); } function computeCos(obj, x) { if (shouldComputeCos) obj.sin = Math.cos(x); } function computeResults(x) { var obj = {}; computeSin(obj, x); computeCos(obj, x); } for (var i = 0; i < 1000000; i++) { computeResults(i); } ``` Put that in a <script> inside a page. Open Web Inspector. Record a timeline. Refresh the page 10 times. The call tree will have 10 duplicates at the same tree representing the above program. If you select that last of the 10 refreshes, only that tree has frames that aren't native frames. The first 9 all have native frames for all their frames even though they are all user defined functions/programs. (Feel free to replace 10 with another number: Anything > 2).
<rdar://problem/26645146>
Web give any call frame that doesn't have a source code location a "Native" appearance. We should see if we aren't getting a location, or maybe we get a location but it no longer makes sense. My bet is the location has a script identifier, but we clear the scripts when the page navigates.
(In reply to comment #2) > Web give any call frame that doesn't have a source code location a "Native" > appearance. We should see if we aren't getting a location, or maybe we get a > location but it no longer makes sense. My bet is the location has a script > identifier, but we clear the scripts when the page navigates. Makes sense.
As Joe says, in general we don't have source for old pages. We might want to flag these differently in the UI to have a non-native appearance but show we don't have source location anymore.