Bug 158413
Summary: | Web Inspector: Native frames when refreshing page during timeline recording even though frames aren't native | ||
---|---|---|---|
Product: | WebKit | Reporter: | Saam Barati <saam> |
Component: | Web Inspector | Assignee: | Nobody <webkit-unassigned> |
Status: | NEW | ||
Severity: | Normal | CC: | graouts, inspector-bugzilla-changes, webkit-bug-importer |
Priority: | P2 | Keywords: | InRadar |
Version: | WebKit Local Build | ||
Hardware: | All | ||
OS: | All |
Saam Barati
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 | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/26645146>
Joseph Pecoraro
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
(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
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.