Web Inspector: Native frames when refreshing page during timeline recording even though frames aren't native
https://bugs.webkit.org/show_bug.cgi?id=158413
Summary Web Inspector: Native frames when refreshing page during timeline recording e...
Saam Barati
Reported 2016-06-05 22:18:24 PDT
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).
Attachments
Radar WebKit Bug Importer
Comment 1 2016-06-05 22:18:36 PDT
Joseph Pecoraro
Comment 2 2016-06-06 01:00:38 PDT
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.
Saam Barati
Comment 3 2016-06-06 11:04:39 PDT
(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.
Timothy Hatcher
Comment 4 2016-06-07 10:26:53 PDT
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.
Note You need to log in before you can comment on or make changes to this bug.