<!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>[192064] trunk/Source</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/192064">192064</a></dd>
<dt>Author</dt> <dd>commit-queue@webkit.org</dd>
<dt>Date</dt> <dd>2015-11-05 11:31:35 -0800 (Thu, 05 Nov 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>Web Inspector: Clean up InjectedScript uses
https://bugs.webkit.org/show_bug.cgi?id=150921

Patch by Joseph Pecoraro &lt;pecoraro@apple.com&gt; on 2015-11-05
Reviewed by Timothy Hatcher.

Source/JavaScriptCore:

* inspector/InjectedScript.cpp:
(Inspector::InjectedScript::wrapCallFrames):
* inspector/InjectedScript.h:
* inspector/InjectedScriptBase.cpp:
(Inspector::InjectedScriptBase::initialize): Deleted.
* inspector/InjectedScriptBase.h:
* inspector/InjectedScriptManager.cpp:
(Inspector::InjectedScriptManager::didCreateInjectedScript):
* inspector/InjectedScriptManager.h:
* inspector/InjectedScriptModule.cpp:
(Inspector::InjectedScriptModule::ensureInjected):
* inspector/InjectedScriptModule.h:
* inspector/agents/InspectorDebuggerAgent.cpp:
(Inspector::InspectorDebuggerAgent::currentCallFrames):
* inspector/agents/InspectorDebuggerAgent.h:

Source/WebCore:

* inspector/CommandLineAPIModule.cpp:
(WebCore::CommandLineAPIModule::injectIfNeeded):
(WebCore::CommandLineAPIModule::CommandLineAPIModule):
* inspector/CommandLineAPIModule.h:
* inspector/WebInjectedScriptManager.cpp:
(WebCore::WebInjectedScriptManager::didCreateInjectedScript):
* inspector/WebInjectedScriptManager.h:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceJavaScriptCoreChangeLog">trunk/Source/JavaScriptCore/ChangeLog</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorInjectedScriptcpp">trunk/Source/JavaScriptCore/inspector/InjectedScript.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorInjectedScripth">trunk/Source/JavaScriptCore/inspector/InjectedScript.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorInjectedScriptBasecpp">trunk/Source/JavaScriptCore/inspector/InjectedScriptBase.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorInjectedScriptBaseh">trunk/Source/JavaScriptCore/inspector/InjectedScriptBase.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorInjectedScriptManagercpp">trunk/Source/JavaScriptCore/inspector/InjectedScriptManager.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorInjectedScriptManagerh">trunk/Source/JavaScriptCore/inspector/InjectedScriptManager.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorInjectedScriptModulecpp">trunk/Source/JavaScriptCore/inspector/InjectedScriptModule.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorInjectedScriptModuleh">trunk/Source/JavaScriptCore/inspector/InjectedScriptModule.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectoragentsInspectorDebuggerAgentcpp">trunk/Source/JavaScriptCore/inspector/agents/InspectorDebuggerAgent.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectoragentsInspectorDebuggerAgenth">trunk/Source/JavaScriptCore/inspector/agents/InspectorDebuggerAgent.h</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreinspectorCommandLineAPIModulecpp">trunk/Source/WebCore/inspector/CommandLineAPIModule.cpp</a></li>
<li><a href="#trunkSourceWebCoreinspectorCommandLineAPIModuleh">trunk/Source/WebCore/inspector/CommandLineAPIModule.h</a></li>
<li><a href="#trunkSourceWebCoreinspectorWebInjectedScriptManagercpp">trunk/Source/WebCore/inspector/WebInjectedScriptManager.cpp</a></li>
<li><a href="#trunkSourceWebCoreinspectorWebInjectedScriptManagerh">trunk/Source/WebCore/inspector/WebInjectedScriptManager.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceJavaScriptCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/ChangeLog (192063 => 192064)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/ChangeLog        2015-11-05 19:27:37 UTC (rev 192063)
+++ trunk/Source/JavaScriptCore/ChangeLog        2015-11-05 19:31:35 UTC (rev 192064)
</span><span class="lines">@@ -1,5 +1,28 @@
</span><span class="cx"> 2015-11-05  Joseph Pecoraro  &lt;pecoraro@apple.com&gt;
</span><span class="cx"> 
</span><ins>+        Web Inspector: Clean up InjectedScript uses
+        https://bugs.webkit.org/show_bug.cgi?id=150921
+
+        Reviewed by Timothy Hatcher.
+
+        * inspector/InjectedScript.cpp:
+        (Inspector::InjectedScript::wrapCallFrames):
+        * inspector/InjectedScript.h:
+        * inspector/InjectedScriptBase.cpp:
+        (Inspector::InjectedScriptBase::initialize): Deleted.
+        * inspector/InjectedScriptBase.h:
+        * inspector/InjectedScriptManager.cpp:
+        (Inspector::InjectedScriptManager::didCreateInjectedScript):
+        * inspector/InjectedScriptManager.h:
+        * inspector/InjectedScriptModule.cpp:
+        (Inspector::InjectedScriptModule::ensureInjected):
+        * inspector/InjectedScriptModule.h:
+        * inspector/agents/InspectorDebuggerAgent.cpp:
+        (Inspector::InspectorDebuggerAgent::currentCallFrames):
+        * inspector/agents/InspectorDebuggerAgent.h:
+
+2015-11-05  Joseph Pecoraro  &lt;pecoraro@apple.com&gt;
+
</ins><span class="cx">         Web Inspector: Put ScriptDebugServer into InspectorEnvironment and cleanup duplicate references
</span><span class="cx">         https://bugs.webkit.org/show_bug.cgi?id=150869
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorInjectedScriptcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/inspector/InjectedScript.cpp (192063 => 192064)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/InjectedScript.cpp        2015-11-05 19:27:37 UTC (rev 192063)
+++ trunk/Source/JavaScriptCore/inspector/InjectedScript.cpp        2015-11-05 19:31:35 UTC (rev 192064)
</span><span class="lines">@@ -194,7 +194,7 @@
</span><span class="cx">         *savedResultIndex = savedResultIndexInt;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-Ref&lt;Array&lt;Inspector::Protocol::Debugger::CallFrame&gt;&gt; InjectedScript::wrapCallFrames(const Deprecated::ScriptValue&amp; callFrames)
</del><ins>+Ref&lt;Array&lt;Inspector::Protocol::Debugger::CallFrame&gt;&gt; InjectedScript::wrapCallFrames(const Deprecated::ScriptValue&amp; callFrames) const
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(!hasNoValue());
</span><span class="cx">     Deprecated::ScriptFunctionCall function(injectedScriptObject(), ASCIILiteral(&quot;wrapCallFrames&quot;), inspectorEnvironment()-&gt;functionCallHandler());
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorInjectedScripth"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/inspector/InjectedScript.h (192063 => 192064)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/InjectedScript.h        2015-11-05 19:27:37 UTC (rev 192063)
+++ trunk/Source/JavaScriptCore/inspector/InjectedScript.h        2015-11-05 19:31:35 UTC (rev 192064)
</span><span class="lines">@@ -62,7 +62,7 @@
</span><span class="cx">     void getCollectionEntries(ErrorString&amp;, const String&amp; objectId, const String&amp; objectGroup, int startIndex, int numberToFetch, RefPtr&lt;Protocol::Array&lt;Protocol::Runtime::CollectionEntry&gt;&gt;* entries);
</span><span class="cx">     void saveResult(ErrorString&amp;, const String&amp; callArgumentJSON, Inspector::Protocol::OptOutput&lt;int&gt;* savedResultIndex);
</span><span class="cx"> 
</span><del>-    Ref&lt;Protocol::Array&lt;Protocol::Debugger::CallFrame&gt;&gt; wrapCallFrames(const Deprecated::ScriptValue&amp;);
</del><ins>+    Ref&lt;Protocol::Array&lt;Protocol::Debugger::CallFrame&gt;&gt; wrapCallFrames(const Deprecated::ScriptValue&amp;) const;
</ins><span class="cx">     RefPtr&lt;Protocol::Runtime::RemoteObject&gt; wrapObject(const Deprecated::ScriptValue&amp;, const String&amp; groupName, bool generatePreview = false) const;
</span><span class="cx">     RefPtr&lt;Protocol::Runtime::RemoteObject&gt; wrapTable(const Deprecated::ScriptValue&amp; table, const Deprecated::ScriptValue&amp; columns) const;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorInjectedScriptBasecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/inspector/InjectedScriptBase.cpp (192063 => 192064)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/InjectedScriptBase.cpp        2015-11-05 19:27:37 UTC (rev 192063)
+++ trunk/Source/JavaScriptCore/inspector/InjectedScriptBase.cpp        2015-11-05 19:31:35 UTC (rev 192064)
</span><span class="lines">@@ -58,12 +58,6 @@
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void InjectedScriptBase::initialize(Deprecated::ScriptObject injectedScriptObject, InspectorEnvironment* environment)
-{
-    m_injectedScriptObject = injectedScriptObject;
-    m_environment = environment;
-}
-
</del><span class="cx"> bool InjectedScriptBase::hasAccessToInspectedScriptState() const
</span><span class="cx"> {
</span><span class="cx">     return m_environment &amp;&amp; m_environment-&gt;canAccessInspectedScriptState(m_injectedScriptObject.scriptState());
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorInjectedScriptBaseh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/inspector/InjectedScriptBase.h (192063 => 192064)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/InjectedScriptBase.h        2015-11-05 19:27:37 UTC (rev 192063)
+++ trunk/Source/JavaScriptCore/inspector/InjectedScriptBase.h        2015-11-05 19:31:35 UTC (rev 192064)
</span><span class="lines">@@ -60,7 +60,6 @@
</span><span class="cx"> 
</span><span class="cx">     InspectorEnvironment* inspectorEnvironment() const { return m_environment; }
</span><span class="cx"> 
</span><del>-    void initialize(Deprecated::ScriptObject, InspectorEnvironment*);
</del><span class="cx">     bool hasAccessToInspectedScriptState() const;
</span><span class="cx"> 
</span><span class="cx">     const Deprecated::ScriptObject&amp; injectedScriptObject() const;
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorInjectedScriptManagercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/inspector/InjectedScriptManager.cpp (192063 => 192064)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/InjectedScriptManager.cpp        2015-11-05 19:27:37 UTC (rev 192063)
+++ trunk/Source/JavaScriptCore/inspector/InjectedScriptManager.cpp        2015-11-05 19:31:35 UTC (rev 192064)
</span><span class="lines">@@ -189,7 +189,7 @@
</span><span class="cx">     return result;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void InjectedScriptManager::didCreateInjectedScript(InjectedScript)
</del><ins>+void InjectedScriptManager::didCreateInjectedScript(const InjectedScript&amp;)
</ins><span class="cx"> {
</span><span class="cx">     // Intentionally empty. This allows for subclasses to inject additional scripts.
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorInjectedScriptManagerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/inspector/InjectedScriptManager.h (192063 => 192064)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/InjectedScriptManager.h        2015-11-05 19:27:37 UTC (rev 192063)
+++ trunk/Source/JavaScriptCore/inspector/InjectedScriptManager.h        2015-11-05 19:31:35 UTC (rev 192064)
</span><span class="lines">@@ -67,7 +67,7 @@
</span><span class="cx">     void clearExceptionValue();
</span><span class="cx"> 
</span><span class="cx"> protected:
</span><del>-    virtual void didCreateInjectedScript(InjectedScript);
</del><ins>+    virtual void didCreateInjectedScript(const InjectedScript&amp;);
</ins><span class="cx"> 
</span><span class="cx">     HashMap&lt;int, InjectedScript&gt; m_idToInjectedScript;
</span><span class="cx">     HashMap&lt;JSC::ExecState*, int&gt; m_scriptStateToId;
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorInjectedScriptModulecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/inspector/InjectedScriptModule.cpp (192063 => 192064)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/InjectedScriptModule.cpp        2015-11-05 19:27:37 UTC (rev 192063)
+++ trunk/Source/JavaScriptCore/inspector/InjectedScriptModule.cpp        2015-11-05 19:31:35 UTC (rev 192064)
</span><span class="lines">@@ -54,7 +54,7 @@
</span><span class="cx">     ensureInjected(injectedScriptManager, injectedScript);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void InjectedScriptModule::ensureInjected(InjectedScriptManager* injectedScriptManager, InjectedScript injectedScript)
</del><ins>+void InjectedScriptModule::ensureInjected(InjectedScriptManager* injectedScriptManager, const InjectedScript&amp; injectedScript)
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(!injectedScript.hasNoValue());
</span><span class="cx">     if (injectedScript.hasNoValue())
</span><span class="lines">@@ -73,16 +73,11 @@
</span><span class="cx">         function.appendArgument(source());
</span><span class="cx">         function.appendArgument(host(injectedScriptManager, injectedScript.scriptState()));
</span><span class="cx">         resultValue = injectedScript.callFunctionWithEvalEnabled(function, hadException);
</span><del>-        if (hadException || (returnsObject() &amp;&amp; (resultValue.hasNoValue() || !resultValue.isObject()))) {
</del><ins>+        if (hadException) {
</ins><span class="cx">             ASSERT_NOT_REACHED();
</span><span class="cx">             return;
</span><span class="cx">         }
</span><span class="cx">     }
</span><del>-
-    if (returnsObject()) {
-        Deprecated::ScriptObject moduleObject(injectedScript.scriptState(), resultValue);
-        initialize(moduleObject, &amp;injectedScriptManager-&gt;inspectorEnvironment());
-    }
</del><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> } // namespace Inspector
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorInjectedScriptModuleh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/inspector/InjectedScriptModule.h (192063 => 192064)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/InjectedScriptModule.h        2015-11-05 19:27:37 UTC (rev 192063)
+++ trunk/Source/JavaScriptCore/inspector/InjectedScriptModule.h        2015-11-05 19:31:35 UTC (rev 192064)
</span><span class="lines">@@ -49,15 +49,14 @@
</span><span class="cx">     virtual ~InjectedScriptModule();
</span><span class="cx">     virtual String source() const = 0;
</span><span class="cx">     virtual JSC::JSValue host(InjectedScriptManager*, JSC::ExecState*) const = 0;
</span><del>-    virtual bool returnsObject() const = 0;
</del><span class="cx"> 
</span><span class="cx"> protected:
</span><span class="cx">     // Do not expose constructor in the child classes as well. Instead provide
</span><span class="cx">     // a static factory method that would create a new instance of the class
</span><span class="cx">     // and call its ensureInjected() method immediately.
</span><del>-    InjectedScriptModule(const String&amp; name);
</del><ins>+    explicit InjectedScriptModule(const String&amp; name);
</ins><span class="cx">     void ensureInjected(InjectedScriptManager*, JSC::ExecState*);
</span><del>-    void ensureInjected(InjectedScriptManager*, InjectedScript);
</del><ins>+    void ensureInjected(InjectedScriptManager*, const InjectedScript&amp;);
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace Inspector
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectoragentsInspectorDebuggerAgentcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/inspector/agents/InspectorDebuggerAgent.cpp (192063 => 192064)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/agents/InspectorDebuggerAgent.cpp        2015-11-05 19:27:37 UTC (rev 192063)
+++ trunk/Source/JavaScriptCore/inspector/agents/InspectorDebuggerAgent.cpp        2015-11-05 19:31:35 UTC (rev 192064)
</span><span class="lines">@@ -594,7 +594,7 @@
</span><span class="cx">         breakProgram(DebuggerFrontendDispatcher::Reason::CSPViolation, buildCSPViolationPauseReason(directiveText));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-Ref&lt;Inspector::Protocol::Array&lt;Inspector::Protocol::Debugger::CallFrame&gt;&gt; InspectorDebuggerAgent::currentCallFrames(InjectedScript injectedScript)
</del><ins>+Ref&lt;Inspector::Protocol::Array&lt;Inspector::Protocol::Debugger::CallFrame&gt;&gt; InspectorDebuggerAgent::currentCallFrames(const InjectedScript&amp; injectedScript)
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(!injectedScript.hasNoValue());
</span><span class="cx">     if (injectedScript.hasNoValue())
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectoragentsInspectorDebuggerAgenth"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/inspector/agents/InspectorDebuggerAgent.h (192063 => 192064)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/agents/InspectorDebuggerAgent.h        2015-11-05 19:27:37 UTC (rev 192063)
+++ trunk/Source/JavaScriptCore/inspector/agents/InspectorDebuggerAgent.h        2015-11-05 19:31:35 UTC (rev 192064)
</span><span class="lines">@@ -125,7 +125,7 @@
</span><span class="cx">     void didClearGlobalObject();
</span><span class="cx"> 
</span><span class="cx"> private:
</span><del>-    Ref&lt;Inspector::Protocol::Array&lt;Inspector::Protocol::Debugger::CallFrame&gt;&gt; currentCallFrames(InjectedScript);
</del><ins>+    Ref&lt;Inspector::Protocol::Array&lt;Inspector::Protocol::Debugger::CallFrame&gt;&gt; currentCallFrames(const InjectedScript&amp;);
</ins><span class="cx"> 
</span><span class="cx">     virtual void didParseSource(JSC::SourceID, const Script&amp;) override final;
</span><span class="cx">     virtual void failedToParseSource(const String&amp; url, const String&amp; data, int firstLine, int errorLine, const String&amp; errorMessage) override final;
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (192063 => 192064)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2015-11-05 19:27:37 UTC (rev 192063)
+++ trunk/Source/WebCore/ChangeLog        2015-11-05 19:31:35 UTC (rev 192064)
</span><span class="lines">@@ -1,5 +1,20 @@
</span><span class="cx"> 2015-11-05  Joseph Pecoraro  &lt;pecoraro@apple.com&gt;
</span><span class="cx"> 
</span><ins>+        Web Inspector: Clean up InjectedScript uses
+        https://bugs.webkit.org/show_bug.cgi?id=150921
+
+        Reviewed by Timothy Hatcher.
+
+        * inspector/CommandLineAPIModule.cpp:
+        (WebCore::CommandLineAPIModule::injectIfNeeded):
+        (WebCore::CommandLineAPIModule::CommandLineAPIModule):
+        * inspector/CommandLineAPIModule.h:
+        * inspector/WebInjectedScriptManager.cpp:
+        (WebCore::WebInjectedScriptManager::didCreateInjectedScript):
+        * inspector/WebInjectedScriptManager.h:
+
+2015-11-05  Joseph Pecoraro  &lt;pecoraro@apple.com&gt;
+
</ins><span class="cx">         Web Inspector: Put ScriptDebugServer into InspectorEnvironment and cleanup duplicate references
</span><span class="cx">         https://bugs.webkit.org/show_bug.cgi?id=150869
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreinspectorCommandLineAPIModulecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/inspector/CommandLineAPIModule.cpp (192063 => 192064)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/inspector/CommandLineAPIModule.cpp        2015-11-05 19:27:37 UTC (rev 192063)
+++ trunk/Source/WebCore/inspector/CommandLineAPIModule.cpp        2015-11-05 19:31:35 UTC (rev 192064)
</span><span class="lines">@@ -37,15 +37,15 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-CommandLineAPIModule::CommandLineAPIModule()
-    : InjectedScriptModule(ASCIILiteral(&quot;CommandLineAPI&quot;))
</del><ins>+void CommandLineAPIModule::injectIfNeeded(InjectedScriptManager* injectedScriptManager, const InjectedScript&amp; injectedScript)
</ins><span class="cx"> {
</span><ins>+    CommandLineAPIModule module;
+    module.ensureInjected(injectedScriptManager, injectedScript);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void CommandLineAPIModule::injectIfNeeded(InjectedScriptManager* injectedScriptManager, InjectedScript injectedScript)
</del><ins>+CommandLineAPIModule::CommandLineAPIModule()
+    : InjectedScriptModule(ASCIILiteral(&quot;CommandLineAPI&quot;))
</ins><span class="cx"> {
</span><del>-    CommandLineAPIModule module;
-    module.ensureInjected(injectedScriptManager, injectedScript);
</del><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> String CommandLineAPIModule::source() const
</span></span></pre></div>
<a id="trunkSourceWebCoreinspectorCommandLineAPIModuleh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/inspector/CommandLineAPIModule.h (192063 => 192064)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/inspector/CommandLineAPIModule.h        2015-11-05 19:27:37 UTC (rev 192063)
+++ trunk/Source/WebCore/inspector/CommandLineAPIModule.h        2015-11-05 19:31:35 UTC (rev 192064)
</span><span class="lines">@@ -36,9 +36,8 @@
</span><span class="cx"> 
</span><span class="cx">     virtual String source() const override;
</span><span class="cx">     virtual JSC::JSValue host(Inspector::InjectedScriptManager*, JSC::ExecState*) const override;
</span><del>-    virtual bool returnsObject() const override { return false; }
</del><span class="cx"> 
</span><del>-    static void injectIfNeeded(Inspector::InjectedScriptManager*, Inspector::InjectedScript);
</del><ins>+    static void injectIfNeeded(Inspector::InjectedScriptManager*, const Inspector::InjectedScript&amp;);
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCoreinspectorWebInjectedScriptManagercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/inspector/WebInjectedScriptManager.cpp (192063 => 192064)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/inspector/WebInjectedScriptManager.cpp        2015-11-05 19:27:37 UTC (rev 192063)
+++ trunk/Source/WebCore/inspector/WebInjectedScriptManager.cpp        2015-11-05 19:31:35 UTC (rev 192064)
</span><span class="lines">@@ -47,7 +47,7 @@
</span><span class="cx">     m_commandLineAPIHost = nullptr;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebInjectedScriptManager::didCreateInjectedScript(InjectedScript injectedScript)
</del><ins>+void WebInjectedScriptManager::didCreateInjectedScript(const Inspector::InjectedScript&amp; injectedScript)
</ins><span class="cx"> {
</span><span class="cx">     CommandLineAPIModule::injectIfNeeded(this, injectedScript);
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoreinspectorWebInjectedScriptManagerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/inspector/WebInjectedScriptManager.h (192063 => 192064)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/inspector/WebInjectedScriptManager.h        2015-11-05 19:27:37 UTC (rev 192063)
+++ trunk/Source/WebCore/inspector/WebInjectedScriptManager.h        2015-11-05 19:31:35 UTC (rev 192064)
</span><span class="lines">@@ -46,7 +46,7 @@
</span><span class="cx">     void discardInjectedScriptsFor(DOMWindow*);
</span><span class="cx"> 
</span><span class="cx"> protected:
</span><del>-    virtual void didCreateInjectedScript(Inspector::InjectedScript) override;
</del><ins>+    virtual void didCreateInjectedScript(const Inspector::InjectedScript&amp;) override;
</ins><span class="cx"> 
</span><span class="cx"> private:
</span><span class="cx">     RefPtr&lt;CommandLineAPIHost&gt; m_commandLineAPIHost;
</span></span></pre>
</div>
</div>

</body>
</html>