<!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>[162874] 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/162874">162874</a></dd>
<dt>Author</dt> <dd>commit-queue@webkit.org</dd>
<dt>Date</dt> <dd>2014-01-27 15:25:17 -0800 (Mon, 27 Jan 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>Web Inspector: Feature Check all Protocol Generated Interfaces to get JSContext Inspection working
https://bugs.webkit.org/show_bug.cgi?id=127712

Patch by Joseph Pecoraro &lt;pecoraro@apple.com&gt; on 2014-01-27
Reviewed by Timothy Hatcher.

Feature check protocol generated interfaces (e.g. FooAgent and registerFooObserver).
Also drive by handle a possible exception if a SourceCode's URL is null, which is possible.

* UserInterface/ApplicationCacheManager.js:
(WebInspector.ApplicationCacheManager):
(WebInspector.ApplicationCacheManager.prototype.initialize):
* UserInterface/CSSCompletions.js:
(WebInspector.CSSCompletions.requestCSSNameCompletions):
* UserInterface/CSSStyleManager.js:
(WebInspector.CSSStyleManager):
(WebInspector.CSSStyleManager.prototype.canForcePseudoClasses):
* UserInterface/DebuggerManager.js:
* UserInterface/FrameResourceManager.js:
(WebInspector.FrameResourceManager):
(WebInspector.FrameResourceManager.prototype.initialize):
* UserInterface/Main.js:
(WebInspector.loaded):
* UserInterface/ProfileManager.js:
(WebInspector.ProfileManager):
* UserInterface/StorageManager.js:
(WebInspector.StorageManager):
Type check generated interfaces.

(WebInspector.DebuggerManager):
(WebInspector.DebuggerManager.prototype.debuggerDidPause):
Null check a SourceCode URL, which can be null for a Script with no URL.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebInspectorUIChangeLog">trunk/Source/WebInspectorUI/ChangeLog</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceApplicationCacheManagerjs">trunk/Source/WebInspectorUI/UserInterface/ApplicationCacheManager.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceCSSCompletionsjs">trunk/Source/WebInspectorUI/UserInterface/CSSCompletions.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceCSSStyleManagerjs">trunk/Source/WebInspectorUI/UserInterface/CSSStyleManager.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceDebuggerManagerjs">trunk/Source/WebInspectorUI/UserInterface/DebuggerManager.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceFrameResourceManagerjs">trunk/Source/WebInspectorUI/UserInterface/FrameResourceManager.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceMainjs">trunk/Source/WebInspectorUI/UserInterface/Main.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceProfileManagerjs">trunk/Source/WebInspectorUI/UserInterface/ProfileManager.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceStorageManagerjs">trunk/Source/WebInspectorUI/UserInterface/StorageManager.js</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebInspectorUIChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/ChangeLog (162873 => 162874)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/ChangeLog        2014-01-27 23:22:39 UTC (rev 162873)
+++ trunk/Source/WebInspectorUI/ChangeLog        2014-01-27 23:25:17 UTC (rev 162874)
</span><span class="lines">@@ -1,3 +1,37 @@
</span><ins>+2014-01-27  Joseph Pecoraro  &lt;pecoraro@apple.com&gt;
+
+        Web Inspector: Feature Check all Protocol Generated Interfaces to get JSContext Inspection working
+        https://bugs.webkit.org/show_bug.cgi?id=127712
+
+        Reviewed by Timothy Hatcher.
+
+        Feature check protocol generated interfaces (e.g. FooAgent and registerFooObserver).
+        Also drive by handle a possible exception if a SourceCode's URL is null, which is possible.
+
+        * UserInterface/ApplicationCacheManager.js:
+        (WebInspector.ApplicationCacheManager):
+        (WebInspector.ApplicationCacheManager.prototype.initialize):
+        * UserInterface/CSSCompletions.js:
+        (WebInspector.CSSCompletions.requestCSSNameCompletions):
+        * UserInterface/CSSStyleManager.js:
+        (WebInspector.CSSStyleManager):
+        (WebInspector.CSSStyleManager.prototype.canForcePseudoClasses):
+        * UserInterface/DebuggerManager.js:
+        * UserInterface/FrameResourceManager.js:
+        (WebInspector.FrameResourceManager):
+        (WebInspector.FrameResourceManager.prototype.initialize):
+        * UserInterface/Main.js:
+        (WebInspector.loaded):
+        * UserInterface/ProfileManager.js:
+        (WebInspector.ProfileManager):
+        * UserInterface/StorageManager.js:
+        (WebInspector.StorageManager):
+        Type check generated interfaces.
+
+        (WebInspector.DebuggerManager):
+        (WebInspector.DebuggerManager.prototype.debuggerDidPause):
+        Null check a SourceCode URL, which can be null for a Script with no URL.
+
</ins><span class="cx"> 2014-01-25  Timothy Hatcher  &lt;timothy@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Remove dead code from the JSC profiler.
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceApplicationCacheManagerjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/ApplicationCacheManager.js (162873 => 162874)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/ApplicationCacheManager.js        2014-01-27 23:22:39 UTC (rev 162873)
+++ trunk/Source/WebInspectorUI/UserInterface/ApplicationCacheManager.js        2014-01-27 23:25:17 UTC (rev 162874)
</span><span class="lines">@@ -27,7 +27,8 @@
</span><span class="cx"> {
</span><span class="cx">     WebInspector.Object.call(this);
</span><span class="cx"> 
</span><del>-    ApplicationCacheAgent.enable();
</del><ins>+    if (window.ApplicationCacheAgent)
+        ApplicationCacheAgent.enable();
</ins><span class="cx"> 
</span><span class="cx">     WebInspector.Frame.addEventListener(WebInspector.Frame.Event.MainResourceDidChange, this._mainResourceDidChange, this);
</span><span class="cx">     WebInspector.Frame.addEventListener(WebInspector.Frame.Event.ChildFrameWasRemoved, this._childFrameWasRemoved, this);
</span><span class="lines">@@ -63,7 +64,8 @@
</span><span class="cx">     {
</span><span class="cx">         this._applicationCacheObjects = [];
</span><span class="cx"> 
</span><del>-        ApplicationCacheAgent.getFramesWithManifests(this._framesWithManifestsLoaded.bind(this));
</del><ins>+        if (window.ApplicationCacheAgent)
+            ApplicationCacheAgent.getFramesWithManifests(this._framesWithManifestsLoaded.bind(this));
</ins><span class="cx">     },
</span><span class="cx"> 
</span><span class="cx">     networkStateUpdated: function(isNowOnline)
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceCSSCompletionsjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/CSSCompletions.js (162873 => 162874)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/CSSCompletions.js        2014-01-27 23:22:39 UTC (rev 162873)
+++ trunk/Source/WebInspectorUI/UserInterface/CSSCompletions.js        2014-01-27 23:25:17 UTC (rev 162874)
</span><span class="lines">@@ -153,7 +153,8 @@
</span><span class="cx">         updateCodeMirrorCSSMode(&quot;text/x-scss&quot;);
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    CSSAgent.getSupportedCSSProperties(propertyNamesCallback);
</del><ins>+    if (window.CSSAgent)
+        CSSAgent.getSupportedCSSProperties(propertyNamesCallback);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> WebInspector.CSSCompletions.prototype = {
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceCSSStyleManagerjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/CSSStyleManager.js (162873 => 162874)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/CSSStyleManager.js        2014-01-27 23:22:39 UTC (rev 162873)
+++ trunk/Source/WebInspectorUI/UserInterface/CSSStyleManager.js        2014-01-27 23:25:17 UTC (rev 162874)
</span><span class="lines">@@ -27,7 +27,8 @@
</span><span class="cx"> {
</span><span class="cx">     WebInspector.Object.call(this);
</span><span class="cx"> 
</span><del>-    CSSAgent.enable();
</del><ins>+    if (window.CSSAgent)
+        CSSAgent.enable();
</ins><span class="cx"> 
</span><span class="cx">     WebInspector.Frame.addEventListener(WebInspector.Frame.Event.MainResourceDidChange, this._mainResourceDidChange, this);
</span><span class="cx">     WebInspector.Frame.addEventListener(WebInspector.Frame.Event.ResourceWasAdded, this._resourceAdded, this);
</span><span class="lines">@@ -59,7 +60,7 @@
</span><span class="cx"> 
</span><span class="cx">     canForcePseudoClasses: function()
</span><span class="cx">     {
</span><del>-        return !!CSSAgent.forcePseudoState;
</del><ins>+        return window.CSSAgent &amp;&amp; !!CSSAgent.forcePseudoState;
</ins><span class="cx">     },
</span><span class="cx"> 
</span><span class="cx">     propertyNameHasOtherVendorPrefix: function(name)
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceDebuggerManagerjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/DebuggerManager.js (162873 => 162874)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/DebuggerManager.js        2014-01-27 23:22:39 UTC (rev 162873)
+++ trunk/Source/WebInspectorUI/UserInterface/DebuggerManager.js        2014-01-27 23:25:17 UTC (rev 162874)
</span><span class="lines">@@ -27,7 +27,8 @@
</span><span class="cx"> {
</span><span class="cx">     WebInspector.Object.call(this);
</span><span class="cx"> 
</span><del>-    DebuggerAgent.enable();
</del><ins>+    if (window.DebuggerAgent)
+        DebuggerAgent.enable();
</ins><span class="cx"> 
</span><span class="cx">     WebInspector.Breakpoint.addEventListener(WebInspector.Breakpoint.Event.DisplayLocationDidChange, this._breakpointDisplayLocationDidChange, this);
</span><span class="cx">     WebInspector.Breakpoint.addEventListener(WebInspector.Breakpoint.Event.DisabledStateDidChange, this._breakpointDisabledStateDidChange, this);
</span><span class="lines">@@ -58,7 +59,8 @@
</span><span class="cx">     this._breakpointsSetting = new WebInspector.Setting(&quot;breakpoints&quot;, []);
</span><span class="cx">     this._breakpointsEnabledSetting = new WebInspector.Setting(&quot;breakpoints-enabled&quot;, true);
</span><span class="cx"> 
</span><del>-    DebuggerAgent.setBreakpointsActive(this._breakpointsEnabledSetting.value);
</del><ins>+    if (window.DebuggerAgent)
+        DebuggerAgent.setBreakpointsActive(this._breakpointsEnabledSetting.value);
</ins><span class="cx"> 
</span><span class="cx">     this._updateBreakOnExceptionsState();
</span><span class="cx"> 
</span><span class="lines">@@ -345,7 +347,7 @@
</span><span class="cx">             var callFramePayload = callFramesPayload[i];
</span><span class="cx">             var sourceCodeLocation = this._sourceCodeLocationFromPayload(callFramePayload.location);
</span><span class="cx">             // Exclude the case where the call frame is in the inspector code.
</span><del>-            if (!sourceCodeLocation || sourceCodeLocation._sourceCode._url.indexOf(&quot;__WebInspector&quot;) === 0)
</del><ins>+            if (!sourceCodeLocation || !sourceCodeLocation._sourceCode || !sourceCodeLocation._sourceCode._url || sourceCodeLocation._sourceCode._url.indexOf(&quot;__WebInspector&quot;) === 0)
</ins><span class="cx">                 continue;
</span><span class="cx">             var thisObject = WebInspector.RemoteObject.fromPayload(callFramePayload.this);
</span><span class="cx">             var scopeChain = this._scopeChainFromPayload(callFramePayload.scopeChain);
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceFrameResourceManagerjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/FrameResourceManager.js (162873 => 162874)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/FrameResourceManager.js        2014-01-27 23:22:39 UTC (rev 162873)
+++ trunk/Source/WebInspectorUI/UserInterface/FrameResourceManager.js        2014-01-27 23:25:17 UTC (rev 162874)
</span><span class="lines">@@ -27,8 +27,10 @@
</span><span class="cx"> {
</span><span class="cx">     WebInspector.Object.call(this);
</span><span class="cx"> 
</span><del>-    PageAgent.enable();
-    NetworkAgent.enable();
</del><ins>+    if (window.PageAgent)
+        PageAgent.enable();
+    if (window.NetworkAgent)
+        NetworkAgent.enable();
</ins><span class="cx"> 
</span><span class="cx">     this.initialize();
</span><span class="cx"> };
</span><span class="lines">@@ -58,7 +60,8 @@
</span><span class="cx">             this._mainFrameDidChange(oldMainFrame);
</span><span class="cx"> 
</span><span class="cx">         this._waitingForMainFrameResourceTreePayload = true;
</span><del>-        PageAgent.getResourceTree(this._processMainFrameResourceTreePayload.bind(this));
</del><ins>+        if (window.PageAgent)
+            PageAgent.getResourceTree(this._processMainFrameResourceTreePayload.bind(this));
</ins><span class="cx">     },
</span><span class="cx"> 
</span><span class="cx">     get mainFrame()
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceMainjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Main.js (162873 => 162874)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Main.js        2014-01-27 23:22:39 UTC (rev 162873)
+++ trunk/Source/WebInspectorUI/UserInterface/Main.js        2014-01-27 23:25:17 UTC (rev 162874)
</span><span class="lines">@@ -52,27 +52,40 @@
</span><span class="cx">     this._initializeWebSocketIfNeeded();
</span><span class="cx"> 
</span><span class="cx">     // Register observers for events from the InspectorBackend.
</span><del>-    InspectorBackend.registerInspectorDispatcher(new WebInspector.InspectorObserver);
-    InspectorBackend.registerPageDispatcher(new WebInspector.PageObserver);
</del><ins>+    if (InspectorBackend.registerInspectorDispatcher)
+        InspectorBackend.registerInspectorDispatcher(new WebInspector.InspectorObserver);
+    if (InspectorBackend.registerPageDispatcher)
+        InspectorBackend.registerPageDispatcher(new WebInspector.PageObserver);
</ins><span class="cx">     if (InspectorBackend.registerCanvasDispatcher)
</span><span class="cx">         InspectorBackend.registerCanvasDispatcher(new WebInspector.CanvasObserver);
</span><del>-    InspectorBackend.registerConsoleDispatcher(new WebInspector.ConsoleObserver);
-    InspectorBackend.registerNetworkDispatcher(new WebInspector.NetworkObserver);
-    InspectorBackend.registerDOMDispatcher(new WebInspector.DOMObserver);
-    InspectorBackend.registerDebuggerDispatcher(new WebInspector.DebuggerObserver);
-    InspectorBackend.registerDatabaseDispatcher(new WebInspector.DatabaseObserver);
-    InspectorBackend.registerDOMStorageDispatcher(new WebInspector.DOMStorageObserver);
-    InspectorBackend.registerApplicationCacheDispatcher(new WebInspector.ApplicationCacheObserver);
-    InspectorBackend.registerTimelineDispatcher(new WebInspector.TimelineObserver);
-    InspectorBackend.registerProfilerDispatcher(new WebInspector.ProfilerObserver);
-    InspectorBackend.registerCSSDispatcher(new WebInspector.CSSObserver);
</del><ins>+    if (InspectorBackend.registerConsoleDispatcher)
+        InspectorBackend.registerConsoleDispatcher(new WebInspector.ConsoleObserver);
+    if (InspectorBackend.registerNetworkDispatcher)
+        InspectorBackend.registerNetworkDispatcher(new WebInspector.NetworkObserver);
+    if (InspectorBackend.registerDOMDispatcher)
+        InspectorBackend.registerDOMDispatcher(new WebInspector.DOMObserver);
+    if (InspectorBackend.registerDebuggerDispatcher)
+        InspectorBackend.registerDebuggerDispatcher(new WebInspector.DebuggerObserver);
+    if (InspectorBackend.registerDatabaseDispatcher)
+        InspectorBackend.registerDatabaseDispatcher(new WebInspector.DatabaseObserver);
+    if (InspectorBackend.registerDOMStorageDispatcher)
+        InspectorBackend.registerDOMStorageDispatcher(new WebInspector.DOMStorageObserver);
+    if (InspectorBackend.registerApplicationCacheDispatcher)
+        InspectorBackend.registerApplicationCacheDispatcher(new WebInspector.ApplicationCacheObserver);
+    if (InspectorBackend.registerTimelineDispatcher)
+        InspectorBackend.registerTimelineDispatcher(new WebInspector.TimelineObserver);
+    if (InspectorBackend.registerProfilerDispatcher)
+        InspectorBackend.registerProfilerDispatcher(new WebInspector.ProfilerObserver);
+    if (InspectorBackend.registerCSSDispatcher)
+        InspectorBackend.registerCSSDispatcher(new WebInspector.CSSObserver);
</ins><span class="cx">     if (InspectorBackend.registerLayerTreeDispatcher)
</span><span class="cx">         InspectorBackend.registerLayerTreeDispatcher(new WebInspector.LayerTreeObserver);
</span><span class="cx">     if (InspectorBackend.registerRuntimeDispatcher)
</span><span class="cx">         InspectorBackend.registerRuntimeDispatcher(new WebInspector.RuntimeObserver);
</span><span class="cx"> 
</span><span class="cx">     // Enable agents.
</span><del>-    InspectorAgent.enable();
</del><ins>+    if (window.InspectorAgent)
+        InspectorAgent.enable();
</ins><span class="cx"> 
</span><span class="cx">     // Perform one-time tasks.
</span><span class="cx">     WebInspector.CSSCompletions.requestCSSNameCompletions();
</span><span class="lines">@@ -101,7 +114,8 @@
</span><span class="cx">     this.dashboardManager = new WebInspector.DashboardManager;
</span><span class="cx"> 
</span><span class="cx">     // Enable the Console Agent after creating the singleton managers.
</span><del>-    ConsoleAgent.enable();
</del><ins>+    if (window.ConsoleAgent)
+        ConsoleAgent.enable();
</ins><span class="cx"> 
</span><span class="cx">     // Register for events.
</span><span class="cx">     this.debuggerManager.addEventListener(WebInspector.DebuggerManager.Event.Paused, this._debuggerDidPause, this);
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceProfileManagerjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/ProfileManager.js (162873 => 162874)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/ProfileManager.js        2014-01-27 23:22:39 UTC (rev 162873)
+++ trunk/Source/WebInspectorUI/UserInterface/ProfileManager.js        2014-01-27 23:25:17 UTC (rev 162874)
</span><span class="lines">@@ -30,8 +30,10 @@
</span><span class="cx">     this._javaScriptProfileType = new WebInspector.JavaScriptProfileType;
</span><span class="cx">     this._canvasProfileType = new WebInspector.CanvasProfileType;
</span><span class="cx"> 
</span><del>-    ProfilerAgent.enable();
-    ProfilerAgent.getProfileHeaders();
</del><ins>+    if (window.ProfilerAgent) {
+        ProfilerAgent.enable();
+        ProfilerAgent.getProfileHeaders();
+    }
</ins><span class="cx"> 
</span><span class="cx">     WebInspector.Frame.addEventListener(WebInspector.Frame.Event.MainResourceDidChange, this._mainResourceDidChange, this);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceStorageManagerjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/StorageManager.js (162873 => 162874)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/StorageManager.js        2014-01-27 23:22:39 UTC (rev 162873)
+++ trunk/Source/WebInspectorUI/UserInterface/StorageManager.js        2014-01-27 23:25:17 UTC (rev 162874)
</span><span class="lines">@@ -28,15 +28,17 @@
</span><span class="cx"> {
</span><span class="cx">     WebInspector.Object.call(this);
</span><span class="cx"> 
</span><del>-    DOMStorageAgent.enable();
-    DatabaseAgent.enable();
</del><ins>+    if (window.DOMStorageAgent)
+        DOMStorageAgent.enable();
+    if (window.DatabaseAgent)
+        DatabaseAgent.enable();
</ins><span class="cx"> 
</span><span class="cx">     WebInspector.Frame.addEventListener(WebInspector.Frame.Event.MainResourceDidChange, this._mainResourceDidChange, this);
</span><span class="cx"> 
</span><span class="cx">     // COMPATIBILITY (iOS 6): DOMStorage was discovered via a DOMStorageObserver event. Now DOM Storage
</span><span class="cx">     // is added whenever a new securityOrigin is discovered. Check for DOMStorageAgent.getDOMStorageItems,
</span><span class="cx">     // which was renamed at the same time the change to start using securityOrigin was made.
</span><del>-    if (DOMStorageAgent.getDOMStorageItems)
</del><ins>+    if (window.DOMStorageAgent &amp;&amp; DOMStorageAgent.getDOMStorageItems)
</ins><span class="cx">         WebInspector.Frame.addEventListener(WebInspector.Frame.Event.SecurityOriginDidChange, this._securityOriginDidChange, this);
</span><span class="cx"> 
</span><span class="cx">     this.initialize();
</span></span></pre>
</div>
</div>

</body>
</html>