<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[171790] trunk/Source/WebInspectorUI</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/171790">171790</a></dd>
<dt>Author</dt> <dd>commit-queue@webkit.org</dd>
<dt>Date</dt> <dd>2014-07-29 22:42:21 -0700 (Tue, 29 Jul 2014)</dd>
</dl>
<h3>Log Message</h3>
<pre>Web Inspector: 80% of time during recording is spent creating source code locations for profile nodes
https://bugs.webkit.org/show_bug.cgi?id=135399
Patch by Joseph Pecoraro <pecoraro@apple.com> on 2014-07-29
Reviewed by Timothy Hatcher.
Profiling the inspector while recording a timeline, a significant amount of
time was spent creating SourceCodeLocation objects for profiling information
and call frames. A lot of this data was eagerly being processed, even though
it would not immediately be presentable to the user.
This makes two significant changes. We create a LazySourceCodeLocation class
which does as little as possible until display information is requested. We
also lazily convert the profiler payload data to a Profile object, so the
processing is only done if you drill into the Script specific timeline.
This results in a significant performance improvement in the overview view.
* UserInterface/Controllers/TimelineManager.js:
(WebInspector.TimelineManager.prototype.eventRecorded.processRecord):
(WebInspector.TimelineManager.prototype.eventRecorded):
(WebInspector.TimelineManager.prototype._callFramesFromPayload.createCallFrame):
(WebInspector.TimelineManager.prototype._callFramesFromPayload):
(WebInspector.TimelineManager.prototype._profileFromPayload.profileNodeFromPayload): Deleted.
(WebInspector.TimelineManager.prototype._profileFromPayload.profileNodeCallFromPayload): Deleted.
(WebInspector.TimelineManager.prototype._profileFromPayload): Deleted.
Do not eagerly process profile payloads. Instead pass the payload to ScriptTimelineRecords.
Likewise create callframes with lazy source code locations to do the minimum amount of work.
* UserInterface/Models/ScriptTimelineRecord.js:
(WebInspector.ScriptTimelineRecord):
(WebInspector.ScriptTimelineRecord.prototype.get profile):
(WebInspector.ScriptTimelineRecord.prototype._initializeProfileFromPayload.profileNodeFromPayload):
(WebInspector.ScriptTimelineRecord.prototype._initializeProfileFromPayload.profileNodeCallFromPayload):
(WebInspector.ScriptTimelineRecord.prototype._initializeProfileFromPayload):
Only when the profile is asked do we process the profiler payload information.
This defer the processing until at least the user drills into the Script timeline.
* UserInterface/Main.html:
Add the new class and ensure SourceCodeLocation is available beforehand.
* UserInterface/Models/LazySourceCodeLocation.js: Added.
(WebInspector.LazySourceCodeLocation):
(WebInspector.LazySourceCodeLocation.prototype.isEqual):
(WebInspector.LazySourceCodeLocation.prototype.get sourceCode):
(WebInspector.LazySourceCodeLocation.prototype.set sourceCode):
(WebInspector.LazySourceCodeLocation.prototype.get formattedLineNumber):
(WebInspector.LazySourceCodeLocation.prototype.get formattedColumnNumber):
(WebInspector.LazySourceCodeLocation.prototype.formattedPosition):
(WebInspector.LazySourceCodeLocation.prototype.hasFormattedLocation):
(WebInspector.LazySourceCodeLocation.prototype.hasDifferentDisplayLocation):
(WebInspector.LazySourceCodeLocation.prototype.resolveMappedLocation):
(WebInspector.LazySourceCodeLocation.prototype._lazyInitialization):
Only when display information is requested will we perform extra processing.
For basic information we do not need to check for formatted (pretty-printed) info.
* UserInterface/Models/SourceCode.js:
(WebInspector.SourceCode.prototype.createLazySourceCodeLocation):
Provide an explict create function for lazy source codes.
* UserInterface/Models/SourceCodeLocation.js:
(WebInspector.SourceCodeLocation.prototype.set sourceCode):
(WebInspector.SourceCodeLocation.prototype.get displaySourceCode):
(WebInspector.SourceCodeLocation.prototype.get displayLineNumber):
(WebInspector.SourceCodeLocation.prototype.get displayColumnNumber):
(WebInspector.SourceCodeLocation.prototype.hasMappedLocation):
(WebInspector.SourceCodeLocation.prototype.setSourceCode):
(WebInspector.SourceCodeLocation.prototype.resolveMappedLocation):
(WebInspector.SourceCodeLocation.prototype._makeChangeAndDispatchChangeEventIfNeeded):
(WebInspector.SourceCodeLocation.prototype._resolveMappedLocation): Deleted.
Include two protected functions which LazySourceCodeLocation overrides.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebInspectorUIChangeLog">trunk/Source/WebInspectorUI/ChangeLog</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceControllersTimelineManagerjs">trunk/Source/WebInspectorUI/UserInterface/Controllers/TimelineManager.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceMainhtml">trunk/Source/WebInspectorUI/UserInterface/Main.html</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceModelsScriptTimelineRecordjs">trunk/Source/WebInspectorUI/UserInterface/Models/ScriptTimelineRecord.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceModelsSourceCodejs">trunk/Source/WebInspectorUI/UserInterface/Models/SourceCode.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceModelsSourceCodeLocationjs">trunk/Source/WebInspectorUI/UserInterface/Models/SourceCodeLocation.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceModelsTimelineRecordingjs">trunk/Source/WebInspectorUI/UserInterface/Models/TimelineRecording.js</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceModelsLazySourceCodeLocationjs">trunk/Source/WebInspectorUI/UserInterface/Models/LazySourceCodeLocation.js</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebInspectorUIChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/ChangeLog (171789 => 171790)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/ChangeLog        2014-07-30 04:49:32 UTC (rev 171789)
+++ trunk/Source/WebInspectorUI/ChangeLog        2014-07-30 05:42:21 UTC (rev 171790)
</span><span class="lines">@@ -1,5 +1,78 @@
</span><span class="cx"> 2014-07-29 Joseph Pecoraro <pecoraro@apple.com>
</span><span class="cx">
</span><ins>+ Web Inspector: 80% of time during recording is spent creating source code locations for profile nodes
+ https://bugs.webkit.org/show_bug.cgi?id=135399
+
+ Reviewed by Timothy Hatcher.
+
+ Profiling the inspector while recording a timeline, a significant amount of
+ time was spent creating SourceCodeLocation objects for profiling information
+ and call frames. A lot of this data was eagerly being processed, even though
+ it would not immediately be presentable to the user.
+
+ This makes two significant changes. We create a LazySourceCodeLocation class
+ which does as little as possible until display information is requested. We
+ also lazily convert the profiler payload data to a Profile object, so the
+ processing is only done if you drill into the Script specific timeline.
+
+ This results in a significant performance improvement in the overview view.
+
+ * UserInterface/Controllers/TimelineManager.js:
+ (WebInspector.TimelineManager.prototype.eventRecorded.processRecord):
+ (WebInspector.TimelineManager.prototype.eventRecorded):
+ (WebInspector.TimelineManager.prototype._callFramesFromPayload.createCallFrame):
+ (WebInspector.TimelineManager.prototype._callFramesFromPayload):
+ (WebInspector.TimelineManager.prototype._profileFromPayload.profileNodeFromPayload): Deleted.
+ (WebInspector.TimelineManager.prototype._profileFromPayload.profileNodeCallFromPayload): Deleted.
+ (WebInspector.TimelineManager.prototype._profileFromPayload): Deleted.
+ Do not eagerly process profile payloads. Instead pass the payload to ScriptTimelineRecords.
+ Likewise create callframes with lazy source code locations to do the minimum amount of work.
+
+ * UserInterface/Models/ScriptTimelineRecord.js:
+ (WebInspector.ScriptTimelineRecord):
+ (WebInspector.ScriptTimelineRecord.prototype.get profile):
+ (WebInspector.ScriptTimelineRecord.prototype._initializeProfileFromPayload.profileNodeFromPayload):
+ (WebInspector.ScriptTimelineRecord.prototype._initializeProfileFromPayload.profileNodeCallFromPayload):
+ (WebInspector.ScriptTimelineRecord.prototype._initializeProfileFromPayload):
+ Only when the profile is asked do we process the profiler payload information.
+ This defer the processing until at least the user drills into the Script timeline.
+
+ * UserInterface/Main.html:
+ Add the new class and ensure SourceCodeLocation is available beforehand.
+
+ * UserInterface/Models/LazySourceCodeLocation.js: Added.
+ (WebInspector.LazySourceCodeLocation):
+ (WebInspector.LazySourceCodeLocation.prototype.isEqual):
+ (WebInspector.LazySourceCodeLocation.prototype.get sourceCode):
+ (WebInspector.LazySourceCodeLocation.prototype.set sourceCode):
+ (WebInspector.LazySourceCodeLocation.prototype.get formattedLineNumber):
+ (WebInspector.LazySourceCodeLocation.prototype.get formattedColumnNumber):
+ (WebInspector.LazySourceCodeLocation.prototype.formattedPosition):
+ (WebInspector.LazySourceCodeLocation.prototype.hasFormattedLocation):
+ (WebInspector.LazySourceCodeLocation.prototype.hasDifferentDisplayLocation):
+ (WebInspector.LazySourceCodeLocation.prototype.resolveMappedLocation):
+ (WebInspector.LazySourceCodeLocation.prototype._lazyInitialization):
+ Only when display information is requested will we perform extra processing.
+ For basic information we do not need to check for formatted (pretty-printed) info.
+
+ * UserInterface/Models/SourceCode.js:
+ (WebInspector.SourceCode.prototype.createLazySourceCodeLocation):
+ Provide an explict create function for lazy source codes.
+
+ * UserInterface/Models/SourceCodeLocation.js:
+ (WebInspector.SourceCodeLocation.prototype.set sourceCode):
+ (WebInspector.SourceCodeLocation.prototype.get displaySourceCode):
+ (WebInspector.SourceCodeLocation.prototype.get displayLineNumber):
+ (WebInspector.SourceCodeLocation.prototype.get displayColumnNumber):
+ (WebInspector.SourceCodeLocation.prototype.hasMappedLocation):
+ (WebInspector.SourceCodeLocation.prototype.setSourceCode):
+ (WebInspector.SourceCodeLocation.prototype.resolveMappedLocation):
+ (WebInspector.SourceCodeLocation.prototype._makeChangeAndDispatchChangeEventIfNeeded):
+ (WebInspector.SourceCodeLocation.prototype._resolveMappedLocation): Deleted.
+ Include two protected functions which LazySourceCodeLocation overrides.
+
+2014-07-29 Joseph Pecoraro <pecoraro@apple.com>
+
</ins><span class="cx"> Web Inspector: Only compute full ProfileNode times if needed - Legacy Profiler
</span><span class="cx"> https://bugs.webkit.org/show_bug.cgi?id=135406
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceControllersTimelineManagerjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Controllers/TimelineManager.js (171789 => 171790)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Controllers/TimelineManager.js        2014-07-30 04:49:32 UTC (rev 171789)
+++ trunk/Source/WebInspectorUI/UserInterface/Controllers/TimelineManager.js        2014-07-30 05:42:21 UTC (rev 171790)
</span><span class="lines">@@ -215,16 +215,14 @@
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><del>- var profile = null;
- if (recordPayload.data.profile)
- profile = this._profileFromPayload(recordPayload.data.profile);
</del><ins>+ var profileData = recordPayload.data.profile;
</ins><span class="cx">
</span><span class="cx"> switch (parentRecordPayload && parentRecordPayload.type) {
</span><span class="cx"> case TimelineAgent.EventType.TimerFire:
</span><del>- this._addRecord(new WebInspector.ScriptTimelineRecord(WebInspector.ScriptTimelineRecord.EventType.TimerFired, startTime, endTime, callFrames, sourceCodeLocation, parentRecordPayload.data.timerId, profile));
</del><ins>+ this._addRecord(new WebInspector.ScriptTimelineRecord(WebInspector.ScriptTimelineRecord.EventType.TimerFired, startTime, endTime, callFrames, sourceCodeLocation, parentRecordPayload.data.timerId, profileData));
</ins><span class="cx"> break;
</span><span class="cx"> default:
</span><del>- this._addRecord(new WebInspector.ScriptTimelineRecord(WebInspector.ScriptTimelineRecord.EventType.ScriptEvaluated, startTime, endTime, callFrames, sourceCodeLocation, null, profile));
</del><ins>+ this._addRecord(new WebInspector.ScriptTimelineRecord(WebInspector.ScriptTimelineRecord.EventType.ScriptEvaluated, startTime, endTime, callFrames, sourceCodeLocation, null, profileData));
</ins><span class="cx"> break;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -236,9 +234,9 @@
</span><span class="cx"> break;
</span><span class="cx">
</span><span class="cx"> case TimelineAgent.EventType.ConsoleProfile:
</span><del>- var profile = this._profileFromPayload(recordPayload.data.profile);
- console.assert(profile);
- this._addRecord(new WebInspector.ScriptTimelineRecord(WebInspector.ScriptTimelineRecord.EventType.ConsoleProfileRecorded, startTime, endTime, callFrames, sourceCodeLocation, recordPayload.data.title, profile));
</del><ins>+ var profileData = recordPayload.data.profile;
+ console.assert(profileData);
+ this._addRecord(new WebInspector.ScriptTimelineRecord(WebInspector.ScriptTimelineRecord.EventType.ConsoleProfileRecorded, startTime, endTime, callFrames, sourceCodeLocation, recordPayload.data.title, profileData));
</ins><span class="cx"> break;
</span><span class="cx">
</span><span class="cx"> case TimelineAgent.EventType.FunctionCall:
</span><span class="lines">@@ -247,10 +245,6 @@
</span><span class="cx"> if (!parentRecordPayload)
</span><span class="cx"> break;
</span><span class="cx">
</span><del>- var profile = null;
- if (recordPayload.data.profile)
- profile = this._profileFromPayload(recordPayload.data.profile);
-
</del><span class="cx"> if (!sourceCodeLocation) {
</span><span class="cx"> var mainFrame = WebInspector.frameResourceManager.mainFrame;
</span><span class="cx"> var scriptResource = mainFrame.url === recordPayload.data.scriptName ? mainFrame.mainResource : mainFrame.resourceForURL(recordPayload.data.scriptName, true);
</span><span class="lines">@@ -263,21 +257,23 @@
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+ var profileData = recordPayload.data.profile;
+
</ins><span class="cx"> switch (parentRecordPayload.type) {
</span><span class="cx"> case TimelineAgent.EventType.TimerFire:
</span><del>- this._addRecord(new WebInspector.ScriptTimelineRecord(WebInspector.ScriptTimelineRecord.EventType.TimerFired, startTime, endTime, callFrames, sourceCodeLocation, parentRecordPayload.data.timerId, profile));
</del><ins>+ this._addRecord(new WebInspector.ScriptTimelineRecord(WebInspector.ScriptTimelineRecord.EventType.TimerFired, startTime, endTime, callFrames, sourceCodeLocation, parentRecordPayload.data.timerId, profileData));
</ins><span class="cx"> break;
</span><span class="cx"> case TimelineAgent.EventType.EventDispatch:
</span><del>- this._addRecord(new WebInspector.ScriptTimelineRecord(WebInspector.ScriptTimelineRecord.EventType.EventDispatched, startTime, endTime, callFrames, sourceCodeLocation, parentRecordPayload.data.type, profile));
</del><ins>+ this._addRecord(new WebInspector.ScriptTimelineRecord(WebInspector.ScriptTimelineRecord.EventType.EventDispatched, startTime, endTime, callFrames, sourceCodeLocation, parentRecordPayload.data.type, profileData));
</ins><span class="cx"> break;
</span><span class="cx"> case TimelineAgent.EventType.XHRLoad:
</span><del>- this._addRecord(new WebInspector.ScriptTimelineRecord(WebInspector.ScriptTimelineRecord.EventType.EventDispatched, startTime, endTime, callFrames, sourceCodeLocation, "load", profile));
</del><ins>+ this._addRecord(new WebInspector.ScriptTimelineRecord(WebInspector.ScriptTimelineRecord.EventType.EventDispatched, startTime, endTime, callFrames, sourceCodeLocation, "load", profileData));
</ins><span class="cx"> break;
</span><span class="cx"> case TimelineAgent.EventType.XHRReadyStateChange:
</span><del>- this._addRecord(new WebInspector.ScriptTimelineRecord(WebInspector.ScriptTimelineRecord.EventType.EventDispatched, startTime, endTime, callFrames, sourceCodeLocation, "readystatechange", profile));
</del><ins>+ this._addRecord(new WebInspector.ScriptTimelineRecord(WebInspector.ScriptTimelineRecord.EventType.EventDispatched, startTime, endTime, callFrames, sourceCodeLocation, "readystatechange", profileData));
</ins><span class="cx"> break;
</span><span class="cx"> case TimelineAgent.EventType.FireAnimationFrame:
</span><del>- this._addRecord(new WebInspector.ScriptTimelineRecord(WebInspector.ScriptTimelineRecord.EventType.AnimationFrameFired, startTime, endTime, callFrames, sourceCodeLocation, parentRecordPayload.data.id, profile));
</del><ins>+ this._addRecord(new WebInspector.ScriptTimelineRecord(WebInspector.ScriptTimelineRecord.EventType.AnimationFrameFired, startTime, endTime, callFrames, sourceCodeLocation, parentRecordPayload.data.id, profileData));
</ins><span class="cx"> break;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -286,7 +282,7 @@
</span><span class="cx"> case TimelineAgent.EventType.ProbeSample:
</span><span class="cx"> // Pass the startTime as the endTime since this record type has no duration.
</span><span class="cx"> sourceCodeLocation = WebInspector.probeManager.probeForIdentifier(recordPayload.data.probeId).breakpoint.sourceCodeLocation;
</span><del>- this._addRecord(new WebInspector.ScriptTimelineRecord(WebInspector.ScriptTimelineRecord.EventType.ProbeSampleRecorded, startTime, startTime, callFrames, sourceCodeLocation, recordPayload.data.probeId, profile));
</del><ins>+ this._addRecord(new WebInspector.ScriptTimelineRecord(WebInspector.ScriptTimelineRecord.EventType.ProbeSampleRecorded, startTime, startTime, callFrames, sourceCodeLocation, recordPayload.data.probeId));
</ins><span class="cx"> break;
</span><span class="cx">
</span><span class="cx"> case TimelineAgent.EventType.TimerInstall:
</span><span class="lines">@@ -348,74 +344,6 @@
</span><span class="cx">
</span><span class="cx"> // Private
</span><span class="cx">
</span><del>- _profileFromPayload: function(payload)
- {
- if (!payload)
- return null;
-
- console.assert(payload.rootNodes instanceof Array);
-
- function profileNodeFromPayload(nodePayload)
- {
- console.assert("id" in nodePayload);
- console.assert(nodePayload.calls instanceof Array);
-
- if (nodePayload.url) {
- var sourceCode = WebInspector.frameResourceManager.resourceForURL(nodePayload.url);
- if (!sourceCode)
- sourceCode = WebInspector.debuggerManager.scriptsForURL(nodePayload.url)[0];
-
- // The lineNumber is 1-based, but we expect 0-based.
- var lineNumber = nodePayload.lineNumber - 1;
-
- var sourceCodeLocation = sourceCode ? sourceCode.createSourceCodeLocation(lineNumber, nodePayload.columnNumber) : null;
- }
-
- var isProgramCode = nodePayload.functionName === "(program)";
- var isAnonymousFunction = nodePayload.functionName === "(anonymous function)";
-
- var type = isProgramCode ? WebInspector.ProfileNode.Type.Program : WebInspector.ProfileNode.Type.Function;
- var functionName = !isProgramCode && !isAnonymousFunction && nodePayload.functionName !== "(unknown)" ? nodePayload.functionName : null;
- var calls = nodePayload.calls.map(profileNodeCallFromPayload);
-
- return new WebInspector.ProfileNode(nodePayload.id, type, functionName, sourceCodeLocation, calls, nodePayload.children);
- }
-
- function profileNodeCallFromPayload(nodeCallPayload)
- {
- console.assert("startTime" in nodeCallPayload);
- console.assert("totalTime" in nodeCallPayload);
-
- return new WebInspector.ProfileNodeCall(nodeCallPayload.startTime, nodeCallPayload.totalTime);
- }
-
- var rootNodes = payload.rootNodes;
-
- // Iterate over the node tree using a stack. Doing this recursively can easily cause a stack overflow.
- // We traverse the profile in post-order and convert the payloads in place until we get back to the root.
- var stack = [{parent: {children: rootNodes}, index: 0, root: true}];
- while (stack.length) {
- var entry = stack.lastValue;
-
- if (entry.index < entry.parent.children.length) {
- var childNodePayload = entry.parent.children[entry.index];
- if (childNodePayload.children && childNodePayload.children.length)
- stack.push({parent: childNodePayload, index: 0});
-
- ++entry.index;
- } else {
- if (!entry.root)
- entry.parent.children = entry.parent.children.map(profileNodeFromPayload);
- else
- rootNodes = rootNodes.map(profileNodeFromPayload);
-
- stack.pop();
- }
- }
-
- return new WebInspector.Profile(rootNodes, payload.idleTime);
- },
-
</del><span class="cx"> _callFramesFromPayload: function(payload)
</span><span class="cx"> {
</span><span class="cx"> if (!payload)
</span><span class="lines">@@ -438,7 +366,7 @@
</span><span class="cx"> // The lineNumber is 1-based, but we expect 0-based.
</span><span class="cx"> var lineNumber = payload.lineNumber - 1;
</span><span class="cx">
</span><del>- var sourceCodeLocation = sourceCode ? sourceCode.createSourceCodeLocation(lineNumber, payload.columnNumber) : null;
</del><ins>+ var sourceCodeLocation = sourceCode ? sourceCode.createLazySourceCodeLocation(lineNumber, payload.columnNumber) : null;
</ins><span class="cx"> var functionName = payload.functionName !== "global code" ? payload.functionName : null;
</span><span class="cx">
</span><span class="cx"> return new WebInspector.CallFrame(null, sourceCodeLocation, functionName, null, null, nativeCode);
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceMainhtml"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Main.html (171789 => 171790)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Main.html        2014-07-30 04:49:32 UTC (rev 171789)
+++ trunk/Source/WebInspectorUI/UserInterface/Main.html        2014-07-30 05:42:21 UTC (rev 171790)
</span><span class="lines">@@ -198,6 +198,7 @@
</span><span class="cx">
</span><span class="cx"> <script src="Models/BreakpointAction.js"></script>
</span><span class="cx"> <script src="Models/SourceCode.js"></script>
</span><ins>+ <script src="Models/SourceCodeLocation.js"></script>
</ins><span class="cx"> <script src="Models/Timeline.js"></script>
</span><span class="cx"> <script src="Models/TimelineRecord.js"></script>
</span><span class="cx">
</span><span class="lines">@@ -237,6 +238,7 @@
</span><span class="cx"> <script src="Models/IssueMessage.js"></script>
</span><span class="cx"> <script src="Models/KeyboardShortcut.js"></script>
</span><span class="cx"> <script src="Models/LayoutTimelineRecord.js"></script>
</span><ins>+ <script src="Models/LazySourceCodeLocation.js"></script>
</ins><span class="cx"> <script src="Models/LogObject.js"></script>
</span><span class="cx"> <script src="Models/NetworkTimeline.js"></script>
</span><span class="cx"> <script src="Models/Probe.js"></script>
</span><span class="lines">@@ -257,7 +259,6 @@
</span><span class="cx"> <script src="Models/Script.js"></script>
</span><span class="cx"> <script src="Models/ScriptTimelineRecord.js"></script>
</span><span class="cx"> <script src="Models/Setting.js"></script>
</span><del>- <script src="Models/SourceCodeLocation.js"></script>
</del><span class="cx"> <script src="Models/SourceCodePosition.js"></script>
</span><span class="cx"> <script src="Models/SourceCodeRevision.js"></script>
</span><span class="cx"> <script src="Models/SourceCodeTextRange.js"></script>
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceModelsLazySourceCodeLocationjs"></a>
<div class="addfile"><h4>Added: trunk/Source/WebInspectorUI/UserInterface/Models/LazySourceCodeLocation.js (0 => 171790)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Models/LazySourceCodeLocation.js         (rev 0)
+++ trunk/Source/WebInspectorUI/UserInterface/Models/LazySourceCodeLocation.js        2014-07-30 05:42:21 UTC (rev 171790)
</span><span class="lines">@@ -0,0 +1,115 @@
</span><ins>+/*
+ * Copyright (C) 2014 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+// FIXME: Investigate folding this into SourceCodeLocation proper so it can always be as lazy as possible.
+
+// Lazily compute the full SourceCodeLocation information only when such information is needed.
+// - raw information doesn't require initialization, we have that information
+// - formatted information does require initialization, done by overriding public APIs.
+// - display information does require initialization, done by overriding private funnel API resolveMappedLocation.
+
+WebInspector.LazySourceCodeLocation = function(sourceCode, lineNumber, columnNumber)
+{
+ WebInspector.SourceCodeLocation.call(this, null, lineNumber, columnNumber);
+
+ console.assert(sourceCode);
+
+ this._initialized = false;
+ this._lazySourceCode = sourceCode;
+};
+
+WebInspector.LazySourceCodeLocation.prototype = {
+ constructor: WebInspector.LazySourceCodeLocation,
+
+ // Public
+
+ isEqual: function(other)
+ {
+ if (!other)
+ return false;
+ return this._lazySourceCode === other._sourceCode && this._lineNumber === other._lineNumber && this._columnNumber === other._columnNumber;
+ },
+
+ get sourceCode()
+ {
+ return this._lazySourceCode;
+ },
+
+ set sourceCode(sourceCode)
+ {
+ // Getter and setter must be provided together.
+ this.setSourceCode(sourceCode);
+ },
+
+ get formattedLineNumber()
+ {
+ this._lazyInitialization();
+ return this._formattedLineNumber;
+ },
+
+ get formattedColumnNumber()
+ {
+ this._lazyInitialization();
+ return this._formattedColumnNumber;
+ },
+
+ formattedPosition: function()
+ {
+ this._lazyInitialization();
+ return new WebInspector.SourceCodePosition(this._formattedLineNumber, this._formattedColumnNumber);
+ },
+
+ hasFormattedLocation: function()
+ {
+ this._lazyInitialization();
+ return WebInspector.SourceCodeLocation.prototype.hasFormattedLocation.call(this);
+ },
+
+ hasDifferentDisplayLocation: function()
+ {
+ this._lazyInitialization();
+ return WebInspector.SourceCodeLocation.prototype.hasDifferentDisplayLocation.call(this);
+ },
+
+ // Protected
+
+ resolveMappedLocation: function()
+ {
+ this._lazyInitialization();
+ WebInspector.SourceCodeLocation.prototype.resolveMappedLocation.call(this);
+ },
+
+ // Private
+
+ _lazyInitialization: function()
+ {
+ if (!this._initialized) {
+ this._initialized = true;
+ this.sourceCode = this._lazySourceCode;
+ }
+ }
+};
+
+WebInspector.LazySourceCodeLocation.prototype.__proto__ = WebInspector.SourceCodeLocation.prototype;
</ins></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceModelsScriptTimelineRecordjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Models/ScriptTimelineRecord.js (171789 => 171790)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Models/ScriptTimelineRecord.js        2014-07-30 04:49:32 UTC (rev 171789)
+++ trunk/Source/WebInspectorUI/UserInterface/Models/ScriptTimelineRecord.js        2014-07-30 05:42:21 UTC (rev 171790)
</span><span class="lines">@@ -23,7 +23,7 @@
</span><span class="cx"> * THE POSSIBILITY OF SUCH DAMAGE.
</span><span class="cx"> */
</span><span class="cx">
</span><del>-WebInspector.ScriptTimelineRecord = function(eventType, startTime, endTime, callFrames, sourceCodeLocation, details, profile)
</del><ins>+WebInspector.ScriptTimelineRecord = function(eventType, startTime, endTime, callFrames, sourceCodeLocation, details, profilePayload)
</ins><span class="cx"> {
</span><span class="cx"> WebInspector.TimelineRecord.call(this, WebInspector.TimelineRecord.Type.Script, startTime, endTime, callFrames, sourceCodeLocation);
</span><span class="cx">
</span><span class="lines">@@ -34,7 +34,8 @@
</span><span class="cx">
</span><span class="cx"> this._eventType = eventType;
</span><span class="cx"> this._details = details || "";
</span><del>- this._profile = profile || null;
</del><ins>+ this._profilePayload = profilePayload || null;
+ this._profile = null;
</ins><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> WebInspector.ScriptTimelineRecord.EventType = {
</span><span class="lines">@@ -263,6 +264,7 @@
</span><span class="cx">
</span><span class="cx"> get profile()
</span><span class="cx"> {
</span><ins>+ this._initializeProfileFromPayload();
</ins><span class="cx"> return this._profile;
</span><span class="cx"> },
</span><span class="cx">
</span><span class="lines">@@ -272,6 +274,78 @@
</span><span class="cx">
</span><span class="cx"> cookie[WebInspector.ScriptTimelineRecord.EventTypeCookieKey] = this._eventType;
</span><span class="cx"> cookie[WebInspector.ScriptTimelineRecord.DetailsCookieKey] = this._details;
</span><ins>+ },
+
+ // Private
+
+ _initializeProfileFromPayload: function(payload)
+ {
+ if (this._profile || !this._profilePayload)
+ return;
+
+ var payload = this._profilePayload;
+
+ console.assert(payload.rootNodes instanceof Array);
+
+ function profileNodeFromPayload(nodePayload)
+ {
+ console.assert("id" in nodePayload);
+ console.assert(nodePayload.calls instanceof Array);
+
+ if (nodePayload.url) {
+ var sourceCode = WebInspector.frameResourceManager.resourceForURL(nodePayload.url);
+ if (!sourceCode)
+ sourceCode = WebInspector.debuggerManager.scriptsForURL(nodePayload.url)[0];
+
+ // The lineNumber is 1-based, but we expect 0-based.
+ var lineNumber = nodePayload.lineNumber - 1;
+
+ var sourceCodeLocation = sourceCode ? sourceCode.createLazySourceCodeLocation(lineNumber, nodePayload.columnNumber) : null;
+ }
+
+ var isProgramCode = nodePayload.functionName === "(program)";
+ var isAnonymousFunction = nodePayload.functionName === "(anonymous function)";
+
+ var type = isProgramCode ? WebInspector.ProfileNode.Type.Program : WebInspector.ProfileNode.Type.Function;
+ var functionName = !isProgramCode && !isAnonymousFunction && nodePayload.functionName !== "(unknown)" ? nodePayload.functionName : null;
+ var calls = nodePayload.calls.map(profileNodeCallFromPayload);
+
+ return new WebInspector.ProfileNode(nodePayload.id, type, functionName, sourceCodeLocation, calls, nodePayload.children);
+ }
+
+ function profileNodeCallFromPayload(nodeCallPayload)
+ {
+ console.assert("startTime" in nodeCallPayload);
+ console.assert("totalTime" in nodeCallPayload);
+
+ return new WebInspector.ProfileNodeCall(nodeCallPayload.startTime, nodeCallPayload.totalTime);
+ }
+
+ var rootNodes = payload.rootNodes;
+
+ // Iterate over the node tree using a stack. Doing this recursively can easily cause a stack overflow.
+ // We traverse the profile in post-order and convert the payloads in place until we get back to the root.
+ var stack = [{parent: {children: rootNodes}, index: 0, root: true}];
+ while (stack.length) {
+ var entry = stack.lastValue;
+
+ if (entry.index < entry.parent.children.length) {
+ var childNodePayload = entry.parent.children[entry.index];
+ if (childNodePayload.children && childNodePayload.children.length)
+ stack.push({parent: childNodePayload, index: 0});
+
+ ++entry.index;
+ } else {
+ if (!entry.root)
+ entry.parent.children = entry.parent.children.map(profileNodeFromPayload);
+ else
+ rootNodes = rootNodes.map(profileNodeFromPayload);
+
+ stack.pop();
+ }
+ }
+
+ this._profile = new WebInspector.Profile(rootNodes, payload.idleTime);
</ins><span class="cx"> }
</span><span class="cx"> };
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceModelsSourceCodejs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Models/SourceCode.js (171789 => 171790)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Models/SourceCode.js        2014-07-30 04:49:32 UTC (rev 171789)
+++ trunk/Source/WebInspectorUI/UserInterface/Models/SourceCode.js        2014-07-30 05:42:21 UTC (rev 171790)
</span><span class="lines">@@ -142,6 +142,11 @@
</span><span class="cx"> return new WebInspector.SourceCodeLocation(this, lineNumber, columnNumber);
</span><span class="cx"> },
</span><span class="cx">
</span><ins>+ createLazySourceCodeLocation: function(lineNumber, columnNumber)
+ {
+ return new WebInspector.LazySourceCodeLocation(this, lineNumber, columnNumber);
+ },
+
</ins><span class="cx"> createSourceCodeTextRange: function(textRange)
</span><span class="cx"> {
</span><span class="cx"> return new WebInspector.SourceCodeTextRange(this, textRange);
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceModelsSourceCodeLocationjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Models/SourceCodeLocation.js (171789 => 171790)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Models/SourceCodeLocation.js        2014-07-30 04:49:32 UTC (rev 171789)
+++ trunk/Source/WebInspectorUI/UserInterface/Models/SourceCodeLocation.js        2014-07-30 05:42:21 UTC (rev 171790)
</span><span class="lines">@@ -85,24 +85,7 @@
</span><span class="cx">
</span><span class="cx"> set sourceCode(sourceCode)
</span><span class="cx"> {
</span><del>- console.assert((this._sourceCode === null && sourceCode instanceof WebInspector.SourceCode) || (this._sourceCode instanceof WebInspector.SourceCode && sourceCode === null));
-
- if (sourceCode === this._sourceCode)
- return;
-
- this._makeChangeAndDispatchChangeEventIfNeeded(function() {
- if (this._sourceCode) {
- this._sourceCode.removeEventListener(WebInspector.SourceCode.Event.SourceMapAdded, this._sourceCodeSourceMapAdded, this);
- this._sourceCode.removeEventListener(WebInspector.SourceCode.Event.FormatterDidChange, this._sourceCodeFormatterDidChange, this);
- }
-
- this._sourceCode = sourceCode;
-
- if (this._sourceCode) {
- this._sourceCode.addEventListener(WebInspector.SourceCode.Event.SourceMapAdded, this._sourceCodeSourceMapAdded, this);
- this._sourceCode.addEventListener(WebInspector.SourceCode.Event.FormatterDidChange, this._sourceCodeFormatterDidChange, this);
- }
- });
</del><ins>+ this.setSourceCode(sourceCode);
</ins><span class="cx"> },
</span><span class="cx">
</span><span class="cx"> // Raw line and column in the original source code.
</span><span class="lines">@@ -146,19 +129,19 @@
</span><span class="cx">
</span><span class="cx"> get displaySourceCode()
</span><span class="cx"> {
</span><del>- this._resolveMappedLocation();
</del><ins>+ this.resolveMappedLocation();
</ins><span class="cx"> return this._mappedResource || this._sourceCode;
</span><span class="cx"> },
</span><span class="cx">
</span><span class="cx"> get displayLineNumber()
</span><span class="cx"> {
</span><del>- this._resolveMappedLocation();
</del><ins>+ this.resolveMappedLocation();
</ins><span class="cx"> return isNaN(this._mappedLineNumber) ? this._formattedLineNumber : this._mappedLineNumber;
</span><span class="cx"> },
</span><span class="cx">
</span><span class="cx"> get displayColumnNumber()
</span><span class="cx"> {
</span><del>- this._resolveMappedLocation();
</del><ins>+ this.resolveMappedLocation();
</ins><span class="cx"> return isNaN(this._mappedColumnNumber) ? this._formattedColumnNumber : this._mappedColumnNumber;
</span><span class="cx"> },
</span><span class="cx">
</span><span class="lines">@@ -196,7 +179,7 @@
</span><span class="cx">
</span><span class="cx"> hasMappedLocation: function()
</span><span class="cx"> {
</span><del>- this._resolveMappedLocation();
</del><ins>+ this.resolveMappedLocation();
</ins><span class="cx"> return this._mappedResource !== null;
</span><span class="cx"> },
</span><span class="cx">
</span><span class="lines">@@ -287,6 +270,65 @@
</span><span class="cx"> }.bind(this));
</span><span class="cx"> },
</span><span class="cx">
</span><ins>+ // Protected
+
+ setSourceCode: function(sourceCode)
+ {
+ console.assert((this._sourceCode === null && sourceCode instanceof WebInspector.SourceCode) || (this._sourceCode instanceof WebInspector.SourceCode && sourceCode === null));
+
+ if (sourceCode === this._sourceCode)
+ return;
+
+ this._makeChangeAndDispatchChangeEventIfNeeded(function() {
+ if (this._sourceCode) {
+ this._sourceCode.removeEventListener(WebInspector.SourceCode.Event.SourceMapAdded, this._sourceCodeSourceMapAdded, this);
+ this._sourceCode.removeEventListener(WebInspector.SourceCode.Event.FormatterDidChange, this._sourceCodeFormatterDidChange, this);
+ }
+
+ this._sourceCode = sourceCode;
+
+ if (this._sourceCode) {
+ this._sourceCode.addEventListener(WebInspector.SourceCode.Event.SourceMapAdded, this._sourceCodeSourceMapAdded, this);
+ this._sourceCode.addEventListener(WebInspector.SourceCode.Event.FormatterDidChange, this._sourceCodeFormatterDidChange, this);
+ }
+ });
+ },
+
+ resolveMappedLocation: function()
+ {
+ if (this._mappedLocationIsResolved)
+ return;
+
+ console.assert(this._mappedResource === null);
+ console.assert(isNaN(this._mappedLineNumber));
+ console.assert(isNaN(this._mappedColumnNumber));
+
+ this._mappedLocationIsResolved = true;
+
+ if (!this._sourceCode)
+ return;
+
+ var sourceMaps = this._sourceCode.sourceMaps;
+ if (!sourceMaps.length)
+ return;
+
+ for (var i = 0; i < sourceMaps.length; ++i) {
+ var sourceMap = sourceMaps[i];
+ var entry = sourceMap.findEntry(this._lineNumber, this._columnNumber);
+ if (!entry || entry.length === 2)
+ continue;
+ console.assert(entry.length === 5);
+ var url = entry[2];
+ var sourceMapResource = sourceMap.resourceForURL(url);
+ if (!sourceMapResource)
+ return;
+ this._mappedResource = sourceMapResource;
+ this._mappedLineNumber = entry[3];
+ this._mappedColumnNumber = entry[4];
+ return;
+ }
+ },
+
</ins><span class="cx"> // Private
</span><span class="cx">
</span><span class="cx"> _locationString: function(sourceCode, lineNumber, columnNumber, columnStyle, nameStyle, prefix)
</span><span class="lines">@@ -337,41 +379,6 @@
</span><span class="cx"> this._mappedColumnNumber = mappedColumnNumber;
</span><span class="cx"> },
</span><span class="cx">
</span><del>- _resolveMappedLocation: function()
- {
- if (this._mappedLocationIsResolved)
- return;
-
- console.assert(this._mappedResource === null);
- console.assert(isNaN(this._mappedLineNumber));
- console.assert(isNaN(this._mappedColumnNumber));
-
- this._mappedLocationIsResolved = true;
-
- if (!this._sourceCode)
- return;
-
- var sourceMaps = this._sourceCode.sourceMaps;
- if (!sourceMaps.length)
- return;
-
- for (var i = 0; i < sourceMaps.length; ++i) {
- var sourceMap = sourceMaps[i];
- var entry = sourceMap.findEntry(this._lineNumber, this._columnNumber);
- if (!entry || entry.length === 2)
- continue;
- console.assert(entry.length === 5);
- var url = entry[2];
- var sourceMapResource = sourceMap.resourceForURL(url);
- if (!sourceMapResource)
- return;
- this._mappedResource = sourceMapResource;
- this._mappedLineNumber = entry[3];
- this._mappedColumnNumber = entry[4];
- return;
- }
- },
-
</del><span class="cx"> _resolveFormattedLocation: function()
</span><span class="cx"> {
</span><span class="cx"> if (this._sourceCode && this._sourceCode.formatterSourceMap) {
</span><span class="lines">@@ -402,7 +409,7 @@
</span><span class="cx"> if (changeFunction)
</span><span class="cx"> changeFunction.call(this);
</span><span class="cx">
</span><del>- this._resolveMappedLocation();
</del><ins>+ this.resolveMappedLocation();
</ins><span class="cx"> this._resolveFormattedLocation();
</span><span class="cx">
</span><span class="cx"> // If the display source code is non-null then the addresses are not NaN and can be compared.
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceModelsTimelineRecordingjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Models/TimelineRecording.js (171789 => 171790)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Models/TimelineRecording.js        2014-07-30 04:49:32 UTC (rev 171789)
+++ trunk/Source/WebInspectorUI/UserInterface/Models/TimelineRecording.js        2014-07-30 05:42:21 UTC (rev 171790)
</span><span class="lines">@@ -99,7 +99,7 @@
</span><span class="cx"> // Add the record to the global timeline by type.
</span><span class="cx"> this._timelines.get(record.type).addRecord(record);
</span><span class="cx">
</span><del>- // Netowrk records don't have source code timelines.
</del><ins>+ // Network records don't have source code timelines.
</ins><span class="cx"> if (record.type === WebInspector.TimelineRecord.Type.Network)
</span><span class="cx"> return;
</span><span class="cx">
</span></span></pre>
</div>
</div>
</body>
</html>