Bug 145898 - Web Inspector: CRASH trying to inspect text that was removed/replaced
Summary: Web Inspector: CRASH trying to inspect text that was removed/replaced
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Joseph Pecoraro
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2015-06-11 14:25 PDT by Joseph Pecoraro
Modified: 2015-06-12 09:49 PDT (History)
8 users (show)

See Also:


Attachments
[PATCH] Proposed Fix (1.84 KB, patch)
2015-06-11 14:28 PDT, Joseph Pecoraro
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Joseph Pecoraro 2015-06-11 14:25:56 PDT
* SUMMARY
Trying to inspect an element via the Context Menu but that element is removed causes a crash.

* TEST
<body>
<script>
var i = 0;
var box = document.body.appendChild(document.createElement("p"));
var span = box.appendChild(document.createElement("span"));
setInterval(function() { span.textContent = (i++) + " seconds"; }, 500);
</script>

* STEPS TO REPRODUCE
1. Load test
2. Right click the "N seconds" text and wait a second for it to change
3. Select "Inspect Element"
  => CRASH

* NOTES
- We assume the focus node is in the document, but it may not be by the time Inspect Element is triggered.
Comment 1 Joseph Pecoraro 2015-06-11 14:26:25 PDT
<rdar://problem/18921081>
Comment 2 Joseph Pecoraro 2015-06-11 14:28:46 PDT
Created attachment 254758 [details]
[PATCH] Proposed Fix
Comment 3 WebKit Commit Bot 2015-06-12 09:49:34 PDT
Comment on attachment 254758 [details]
[PATCH] Proposed Fix

Clearing flags on attachment: 254758

Committed r185507: <http://trac.webkit.org/changeset/185507>
Comment 4 WebKit Commit Bot 2015-06-12 09:49:39 PDT
All reviewed patches have been landed.  Closing bug.