Bug 144227

Summary: Unexpected custom DOM wrapper property is undefined soon after it was assigned
Product: WebKit Reporter: Timothy Hatcher <timothy>
Component: JavaScriptCoreAssignee: Nobody <webkit-unassigned>
Status: RESOLVED CONFIGURATION CHANGED    
Severity: Normal CC: bfulgham, fpizlo, ggaren, joepeck, mark.lam, msaboff, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 144228    

Timothy Hatcher
Reported 2015-04-26 10:50:30 PDT
TimelineRuler.js in the Web Inspector occasionally throws an exception and never records. The _labelElement property we add to a DOM node at the beginning of a loop body ends up being undefined at the end of the loop body. This smells like a JIT optimization bug to me since this code has always worked fine and only recently started happening. It is also very inconsistent on when it happens. Because it is so random when it happens, we haven't been able to pin point steps or make a reduction. Just resting the Inspector window, or zooming the Timeline in and out causes updateLayout to be called. From the TimelineRuler updateLayout function: var dividerElement = this._headerElement.firstChild; for (var i = 0; i <= dividerCount; ++i) { if (!dividerElement) { dividerElement = document.createElement("div"); dividerElement.className = WebInspector.TimelineRuler.DividerElementStyleClassName; this._headerElement.appendChild(dividerElement); var labelElement = document.createElement("div"); labelElement.className = WebInspector.TimelineRuler.DividerLabelElementStyleClassName; dividerElement._labelElement = labelElement; dividerElement.appendChild(labelElement); } // ... var dividerTime = firstDividerTime + (sliceTime * i); // ... dividerElement._labelElement.textContent = isNaN(dividerTime) ? "" : Number.secondsToString(dividerTime - this._zeroTime, true); dividerElement = dividerElement.nextSibling; } The exceptions happens on the second to last line in the loop. dividerElement._labelElement is undefined, but it should never be.
Attachments
Radar WebKit Bug Importer
Comment 1 2015-04-26 10:50:45 PDT
Note You need to log in before you can comment on or make changes to this bug.