<!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>[201855] trunk</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/201855">201855</a></dd>
<dt>Author</dt> <dd>commit-queue@webkit.org</dd>
<dt>Date</dt> <dd>2016-06-08 23:20:55 -0700 (Wed, 08 Jun 2016)</dd>
</dl>
<h3>Log Message</h3>
<pre>REGRESSION: Web Inspector: Should be able to evaluate "{a:1, b:2}" in the console
https://bugs.webkit.org/show_bug.cgi?id=158548
<rdar://problem/26708513>
Patch by Joseph Pecoraro <pecoraro@apple.com> on 2016-06-08
Reviewed by Timothy Hatcher.
Source/WebInspectorUI:
* UserInterface/Controllers/RuntimeManager.js:
(WebInspector.RuntimeManager.prototype.evaluateInInspectedWindow):
Switch the many parameters to an options dictionary.
Include a new option for sourceURL appender, so that
Console evaluations can have its own append.
* UserInterface/Controllers/JavaScriptLogViewController.js:
(WebInspector.JavaScriptLogViewController.prototype.consolePromptTextCommitted):
Use the appendWebInspectorConsoleEvaluationSourceURL appender.
* UserInterface/Controllers/JavaScriptRuntimeCompletionProvider.js:
(WebInspector.JavaScriptRuntimeCompletionProvider.prototype.completionControllerCompletionsNeeded.evaluated):
* UserInterface/Views/ScopeChainDetailsSidebarPanel.js:
(WebInspector.ScopeChainDetailsSidebarPanel.prototype._generateWatchExpressionsSection.):
(WebInspector.ScopeChainDetailsSidebarPanel.prototype._generateWatchExpressionsSection):
Use the new options dictionary.
LayoutTests:
* inspector/console/addInspectedNode.html:
* inspector/console/command-line-api-copy.html:
* inspector/console/command-line-api.html:
* inspector/console/console-api.html:
* inspector/console/console-table.html:
* inspector/console/messagesCleared.html:
* inspector/controller/runtime-controller.html:
* inspector/debugger/command-line-api-exception-nested-catch.html:
* inspector/debugger/command-line-api-exception.html:
* inspector/model/remote-object-get-properties.html:
* inspector/model/remote-object-weak-collection.html:
* inspector/model/remote-object.html:
* inspector/timeline/exception-in-injected-script-while-recording.html:
Update evaluateInInspectedWindow callsites to use options dictionary.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsinspectorconsoleaddInspectedNodehtml">trunk/LayoutTests/inspector/console/addInspectedNode.html</a></li>
<li><a href="#trunkLayoutTestsinspectorconsolecommandlineapicopyhtml">trunk/LayoutTests/inspector/console/command-line-api-copy.html</a></li>
<li><a href="#trunkLayoutTestsinspectorconsolecommandlineapihtml">trunk/LayoutTests/inspector/console/command-line-api.html</a></li>
<li><a href="#trunkLayoutTestsinspectorconsoleconsoleapihtml">trunk/LayoutTests/inspector/console/console-api.html</a></li>
<li><a href="#trunkLayoutTestsinspectorconsoleconsoletablehtml">trunk/LayoutTests/inspector/console/console-table.html</a></li>
<li><a href="#trunkLayoutTestsinspectorconsolemessagesClearedhtml">trunk/LayoutTests/inspector/console/messagesCleared.html</a></li>
<li><a href="#trunkLayoutTestsinspectorcontrollerruntimecontrollerhtml">trunk/LayoutTests/inspector/controller/runtime-controller.html</a></li>
<li><a href="#trunkLayoutTestsinspectordebuggercommandlineapiexceptionnestedcatchhtml">trunk/LayoutTests/inspector/debugger/command-line-api-exception-nested-catch.html</a></li>
<li><a href="#trunkLayoutTestsinspectordebuggercommandlineapiexceptionhtml">trunk/LayoutTests/inspector/debugger/command-line-api-exception.html</a></li>
<li><a href="#trunkLayoutTestsinspectormodelremoteobjectgetpropertieshtml">trunk/LayoutTests/inspector/model/remote-object-get-properties.html</a></li>
<li><a href="#trunkLayoutTestsinspectormodelremoteobjectweakcollectionhtml">trunk/LayoutTests/inspector/model/remote-object-weak-collection.html</a></li>
<li><a href="#trunkLayoutTestsinspectormodelremoteobjecthtml">trunk/LayoutTests/inspector/model/remote-object.html</a></li>
<li><a href="#trunkLayoutTestsinspectortimelineexceptionininjectedscriptwhilerecordinghtml">trunk/LayoutTests/inspector/timeline/exception-in-injected-script-while-recording.html</a></li>
<li><a href="#trunkSourceWebInspectorUIChangeLog">trunk/Source/WebInspectorUI/ChangeLog</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceControllersJavaScriptLogViewControllerjs">trunk/Source/WebInspectorUI/UserInterface/Controllers/JavaScriptLogViewController.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceControllersJavaScriptRuntimeCompletionProviderjs">trunk/Source/WebInspectorUI/UserInterface/Controllers/JavaScriptRuntimeCompletionProvider.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceControllersRuntimeManagerjs">trunk/Source/WebInspectorUI/UserInterface/Controllers/RuntimeManager.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsScopeChainDetailsSidebarPaneljs">trunk/Source/WebInspectorUI/UserInterface/Views/ScopeChainDetailsSidebarPanel.js</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (201854 => 201855)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2016-06-09 06:17:40 UTC (rev 201854)
+++ trunk/LayoutTests/ChangeLog        2016-06-09 06:20:55 UTC (rev 201855)
</span><span class="lines">@@ -1,3 +1,26 @@
</span><ins>+2016-06-08 Joseph Pecoraro <pecoraro@apple.com>
+
+ REGRESSION: Web Inspector: Should be able to evaluate "{a:1, b:2}" in the console
+ https://bugs.webkit.org/show_bug.cgi?id=158548
+ <rdar://problem/26708513>
+
+ Reviewed by Timothy Hatcher.
+
+ * inspector/console/addInspectedNode.html:
+ * inspector/console/command-line-api-copy.html:
+ * inspector/console/command-line-api.html:
+ * inspector/console/console-api.html:
+ * inspector/console/console-table.html:
+ * inspector/console/messagesCleared.html:
+ * inspector/controller/runtime-controller.html:
+ * inspector/debugger/command-line-api-exception-nested-catch.html:
+ * inspector/debugger/command-line-api-exception.html:
+ * inspector/model/remote-object-get-properties.html:
+ * inspector/model/remote-object-weak-collection.html:
+ * inspector/model/remote-object.html:
+ * inspector/timeline/exception-in-injected-script-while-recording.html:
+ Update evaluateInInspectedWindow callsites to use options dictionary.
+
</ins><span class="cx"> 2016-06-08 Chris Dumez <cdumez@apple.com>
</span><span class="cx">
</span><span class="cx"> DedicatedWorkerGlobalScope prototype chain is incorrect
</span></span></pre></div>
<a id="trunkLayoutTestsinspectorconsoleaddInspectedNodehtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/inspector/console/addInspectedNode.html (201854 => 201855)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/console/addInspectedNode.html        2016-06-09 06:17:40 UTC (rev 201854)
+++ trunk/LayoutTests/inspector/console/addInspectedNode.html        2016-06-09 06:20:55 UTC (rev 201855)
</span><span class="lines">@@ -6,13 +6,7 @@
</span><span class="cx"> function test()
</span><span class="cx"> {
</span><span class="cx"> function evaluate$0(callback) {
</span><del>- const objectGroup = "test";
- const includeCommandLineAPI = true;
- const ignorePauseOnExceptionsAndMute = false;
- const shouldReturnByValue = false;
- const shouldGeneratePreview = false;
- const shouldSaveResult = false;
- WebInspector.runtimeManager.evaluateInInspectedWindow("$0", objectGroup, includeCommandLineAPI, ignorePauseOnExceptionsAndMute, shouldReturnByValue, shouldGeneratePreview, shouldSaveResult, callback);
</del><ins>+ WebInspector.runtimeManager.evaluateInInspectedWindow("$0", {objectGroup: "test", includeCommandLineAPI: true}, callback);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> let nodeA, nodeB;
</span></span></pre></div>
<a id="trunkLayoutTestsinspectorconsolecommandlineapicopyhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/inspector/console/command-line-api-copy.html (201854 => 201855)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/console/command-line-api-copy.html        2016-06-09 06:17:40 UTC (rev 201854)
+++ trunk/LayoutTests/inspector/console/command-line-api-copy.html        2016-06-09 06:20:55 UTC (rev 201855)
</span><span class="lines">@@ -22,14 +22,8 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> function commandLineAPICopyAndPaste(expression, callback) {
</span><del>- const objectGroup = "test";
- const includeCommandLineAPI = true;
- const ignorePauseOnExceptionsAndMute = false;
- const shouldReturnByValue = false;
- const shouldGeneratePreview = false;
- const shouldSaveResult = false;
</del><span class="cx"> InspectorTest.assert(typeof expression === "string", "Test requires string expression to evaluate on the page.");
</span><del>- WebInspector.runtimeManager.evaluateInInspectedWindow(`copy(${expression})`, objectGroup, includeCommandLineAPI, ignorePauseOnExceptionsAndMute, shouldReturnByValue, shouldGeneratePreview, shouldSaveResult, () => {
</del><ins>+ WebInspector.runtimeManager.evaluateInInspectedWindow(`copy(${expression})`, {objectGroup: "test", includeCommandLineAPI: true}, () => {
</ins><span class="cx"> InspectorTest.evaluateInPage("pasteAndReturnString()", (error, remoteObjectPayload) => {
</span><span class="cx"> let remoteObject = WebInspector.RemoteObject.fromPayload(remoteObjectPayload);
</span><span class="cx"> InspectorTest.assert(remoteObject.type === "string", "RemoteObject from pasteAndReturnString should return a string.");
</span></span></pre></div>
<a id="trunkLayoutTestsinspectorconsolecommandlineapihtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/inspector/console/command-line-api.html (201854 => 201855)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/console/command-line-api.html        2016-06-09 06:17:40 UTC (rev 201854)
+++ trunk/LayoutTests/inspector/console/command-line-api.html        2016-06-09 06:20:55 UTC (rev 201855)
</span><span class="lines">@@ -69,13 +69,7 @@
</span><span class="cx"> reject();
</span><span class="cx"> }
</span><span class="cx">
</span><del>- const objectGroup = "test";
- const includeCommandLineAPI = true;
- const ignorePauseOnExceptionsAndMute = false;
- const shouldReturnByValue = false;
- const shouldGeneratePreview = false;
- const shouldSaveResult = false;
- WebInspector.runtimeManager.evaluateInInspectedWindow(`String(${input})`, objectGroup, includeCommandLineAPI, ignorePauseOnExceptionsAndMute, shouldReturnByValue, shouldGeneratePreview, shouldSaveResult, callback);
</del><ins>+ WebInspector.runtimeManager.evaluateInInspectedWindow(`String(${input})`, {objectGroup: "test", includeCommandLineAPI: true}, callback);
</ins><span class="cx"> }
</span><span class="cx"> })
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkLayoutTestsinspectorconsoleconsoleapihtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/inspector/console/console-api.html (201854 => 201855)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/console/console-api.html        2016-06-09 06:17:40 UTC (rev 201854)
+++ trunk/LayoutTests/inspector/console/console-api.html        2016-06-09 06:20:55 UTC (rev 201855)
</span><span class="lines">@@ -66,7 +66,7 @@
</span><span class="cx"> });
</span><span class="cx">
</span><span class="cx"> for (var step of steps)
</span><del>- WebInspector.runtimeManager.evaluateInInspectedWindow(step, "test", false, true, false, true, false, function(){});
</del><ins>+ WebInspector.runtimeManager.evaluateInInspectedWindow(step, {objectGroup: "test", doNotPauseOnExceptionsAndMuteConsole: true, generatePreview: true}, function(){});
</ins><span class="cx"> }
</span><span class="cx"> </script>
</span><span class="cx"> </head>
</span></span></pre></div>
<a id="trunkLayoutTestsinspectorconsoleconsoletablehtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/inspector/console/console-table.html (201854 => 201855)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/console/console-table.html        2016-06-09 06:17:40 UTC (rev 201854)
+++ trunk/LayoutTests/inspector/console/console-table.html        2016-06-09 06:20:55 UTC (rev 201855)
</span><span class="lines">@@ -44,7 +44,7 @@
</span><span class="cx"> });
</span><span class="cx">
</span><span class="cx"> for (var step of steps)
</span><del>- WebInspector.runtimeManager.evaluateInInspectedWindow(step, "test", false, true, false, true, false, function(){});
</del><ins>+ WebInspector.runtimeManager.evaluateInInspectedWindow(step, {objectGroup: "test", doNotPauseOnExceptionsAndMuteConsole: true, generatePreview: true}, function(){});
</ins><span class="cx"> }
</span><span class="cx"> </script>
</span><span class="cx"> </head>
</span></span></pre></div>
<a id="trunkLayoutTestsinspectorconsolemessagesClearedhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/inspector/console/messagesCleared.html (201854 => 201855)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/console/messagesCleared.html        2016-06-09 06:17:40 UTC (rev 201854)
+++ trunk/LayoutTests/inspector/console/messagesCleared.html        2016-06-09 06:20:55 UTC (rev 201855)
</span><span class="lines">@@ -35,13 +35,7 @@
</span><span class="cx"> name: "ClearViaCommandLineAPI",
</span><span class="cx"> description: "Calling `clear()` in the command line API should trigger Console.messagesCleared.",
</span><span class="cx"> test: (resolve, reject) => {
</span><del>- const objectGroup = "test";
- const includeCommandLineAPI = true;
- const ignorePauseOnExceptionsAndMute = false;
- const shouldReturnByValue = false;
- const shouldGeneratePreview = false;
- const shouldSaveResult = false;
- WebInspector.runtimeManager.evaluateInInspectedWindow("clear()", objectGroup, includeCommandLineAPI, ignorePauseOnExceptionsAndMute, shouldReturnByValue, shouldGeneratePreview, shouldSaveResult, function(){});
</del><ins>+ WebInspector.runtimeManager.evaluateInInspectedWindow("clear()", {objectGroup: "test", includeCommandLineAPI: true}, function(){});
</ins><span class="cx"> WebInspector.logManager.singleFireEventListener(WebInspector.LogManager.Event.Cleared, (event) => {
</span><span class="cx"> InspectorTest.expectThat(event, "Cleared event should fire.");
</span><span class="cx"> resolve();
</span></span></pre></div>
<a id="trunkLayoutTestsinspectorcontrollerruntimecontrollerhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/inspector/controller/runtime-controller.html (201854 => 201855)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/controller/runtime-controller.html        2016-06-09 06:17:40 UTC (rev 201854)
+++ trunk/LayoutTests/inspector/controller/runtime-controller.html        2016-06-09 06:20:55 UTC (rev 201855)
</span><span class="lines">@@ -12,13 +12,7 @@
</span><span class="cx"> description: "Test evaluating an object literal string conveniently converts wraps it in parenthesis to avoid misinterpretation as a program with a block and labeled statement.",
</span><span class="cx"> test: (resolve, reject) => {
</span><span class="cx"> function testSource(expression, callback) {
</span><del>- const objectGroup = "test";
- const includeCommandLineAPI = false;
- const ignorePauseOnExceptionsAndMute = false;
- const shouldReturnByValue = false;
- const shouldGeneratePreview = false;
- const shouldSaveResult = false;
- WebInspector.runtimeManager.evaluateInInspectedWindow(expression, objectGroup, includeCommandLineAPI, ignorePauseOnExceptionsAndMute, shouldReturnByValue, shouldGeneratePreview, shouldSaveResult, (result, wasThrown) => {
</del><ins>+ WebInspector.runtimeManager.evaluateInInspectedWindow(expression, {objectGroup: "test"}, (result, wasThrown) => {
</ins><span class="cx"> InspectorTest.log("Source: " + expression);
</span><span class="cx"> callback(result, wasThrown);
</span><span class="cx"> });
</span></span></pre></div>
<a id="trunkLayoutTestsinspectordebuggercommandlineapiexceptionnestedcatchhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/inspector/debugger/command-line-api-exception-nested-catch.html (201854 => 201855)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/debugger/command-line-api-exception-nested-catch.html        2016-06-09 06:17:40 UTC (rev 201854)
+++ trunk/LayoutTests/inspector/debugger/command-line-api-exception-nested-catch.html        2016-06-09 06:20:55 UTC (rev 201855)
</span><span class="lines">@@ -16,13 +16,13 @@
</span><span class="cx"> WebInspector.debuggerManager.allExceptionsBreakpoint.disabled = false;
</span><span class="cx">
</span><span class="cx"> function dumpCommandLineAPIValue(prefix) {
</span><del>- WebInspector.runtimeManager.evaluateInInspectedWindow("$exception", "test", true, true, false, false, false, function(result, wasThrown) {
</del><ins>+ WebInspector.runtimeManager.evaluateInInspectedWindow("$exception", {objectGroup: "test", includeCommandLineAPI: true, doNotPauseOnExceptionsAndMuteConsole: true}, function(result, wasThrown) {
</ins><span class="cx"> InspectorTest.log(prefix + ": $exception => " + result.description);
</span><span class="cx"> });
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> function checkIfExceptionValueMatchesVariable(varName) {
</span><del>- WebInspector.runtimeManager.evaluateInInspectedWindow("$exception === " + varName, "test", true, true, false, false, false, function(result, wasThrown) {
</del><ins>+ WebInspector.runtimeManager.evaluateInInspectedWindow("$exception === " + varName, {objectGroup: "test", includeCommandLineAPI: true, doNotPauseOnExceptionsAndMuteConsole: true}, function(result, wasThrown) {
</ins><span class="cx"> InspectorTest.log(" CATCH: $exception === " + varName + " ? " + result.description);
</span><span class="cx"> });
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkLayoutTestsinspectordebuggercommandlineapiexceptionhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/inspector/debugger/command-line-api-exception.html (201854 => 201855)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/debugger/command-line-api-exception.html        2016-06-09 06:17:40 UTC (rev 201854)
+++ trunk/LayoutTests/inspector/debugger/command-line-api-exception.html        2016-06-09 06:20:55 UTC (rev 201855)
</span><span class="lines">@@ -40,13 +40,13 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> function dumpCommandLineAPIValue(prefix) {
</span><del>- WebInspector.runtimeManager.evaluateInInspectedWindow("$exception", "test", true, true, false, false, false, function(result, wasThrown) {
</del><ins>+ WebInspector.runtimeManager.evaluateInInspectedWindow("$exception", {objectGroup: "test", includeCommandLineAPI: true, doNotPauseOnExceptionsAndMuteConsole: true}, function(result, wasThrown) {
</ins><span class="cx"> InspectorTest.log(prefix + ": $exception => " + result.description);
</span><span class="cx"> });
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> function checkIfExceptionValueMatchesCatchVariable() {
</span><del>- WebInspector.runtimeManager.evaluateInInspectedWindow("$exception === e", "test", true, true, false, false, false, function(result, wasThrown) {
</del><ins>+ WebInspector.runtimeManager.evaluateInInspectedWindow("$exception === e", {objectGroup: "test", includeCommandLineAPI: true, doNotPauseOnExceptionsAndMuteConsole: true}, function(result, wasThrown) {
</ins><span class="cx"> InspectorTest.log("STEPPED OUT TO CATCH BLOCK: $exception === e ? " + result.description);
</span><span class="cx"> });
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkLayoutTestsinspectormodelremoteobjectgetpropertieshtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/inspector/model/remote-object-get-properties.html (201854 => 201855)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/model/remote-object-get-properties.html        2016-06-09 06:17:40 UTC (rev 201854)
+++ trunk/LayoutTests/inspector/model/remote-object-get-properties.html        2016-06-09 06:20:55 UTC (rev 201855)
</span><span class="lines">@@ -75,7 +75,7 @@
</span><span class="cx"> InspectorTest.log("-----------------------------------------------------");
</span><span class="cx"> InspectorTest.log("EXPRESSION: " + step.expression);
</span><span class="cx">
</span><del>- WebInspector.runtimeManager.evaluateInInspectedWindow(step.expression, "test", false, true, false, false, false, function(remoteObject, wasThrown) {
</del><ins>+ WebInspector.runtimeManager.evaluateInInspectedWindow(step.expression, {objectGroup: "test", doNotPauseOnExceptionsAndMuteConsole: true}, function(remoteObject, wasThrown) {
</ins><span class="cx"> InspectorTest.assert(remoteObject instanceof WebInspector.RemoteObject);
</span><span class="cx"> InspectorTest.log("type: " + remoteObject.type);
</span><span class="cx"> if (remoteObject.subtype)
</span></span></pre></div>
<a id="trunkLayoutTestsinspectormodelremoteobjectweakcollectionhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/inspector/model/remote-object-weak-collection.html (201854 => 201855)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/model/remote-object-weak-collection.html        2016-06-09 06:17:40 UTC (rev 201854)
+++ trunk/LayoutTests/inspector/model/remote-object-weak-collection.html        2016-06-09 06:20:55 UTC (rev 201855)
</span><span class="lines">@@ -53,8 +53,8 @@
</span><span class="cx">
</span><span class="cx"> // Run the expression, and then run a garbage collection on a different
</span><span class="cx"> // event loop so no objects are kept alive by the stack.
</span><del>- WebInspector.runtimeManager.evaluateInInspectedWindow(step.expression, "test", false, true, false, true, false, function(remoteObject, wasThrown) {
- WebInspector.runtimeManager.evaluateInInspectedWindow("GCController.collect()", "test", false, true, false, false, false, function() {
</del><ins>+ WebInspector.runtimeManager.evaluateInInspectedWindow(step.expression, {objectGroup: "test", doNotPauseOnExceptionsAndMuteConsole: true, generatePreview: true}, function(remoteObject, wasThrown) {
+ WebInspector.runtimeManager.evaluateInInspectedWindow("GCController.collect()", {objectGroup: "test", doNotPauseOnExceptionsAndMuteConsole: true}, function() {
</ins><span class="cx"> InspectorTest.assert(remoteObject instanceof WebInspector.RemoteObject);
</span><span class="cx"> remoteObject.getCollectionEntries(0, 100, function(entries) {
</span><span class="cx"> InspectorTest.log("ENTRIES:");
</span></span></pre></div>
<a id="trunkLayoutTestsinspectormodelremoteobjecthtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/inspector/model/remote-object.html (201854 => 201855)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/model/remote-object.html        2016-06-09 06:17:40 UTC (rev 201854)
+++ trunk/LayoutTests/inspector/model/remote-object.html        2016-06-09 06:20:55 UTC (rev 201855)
</span><span class="lines">@@ -215,7 +215,7 @@
</span><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- WebInspector.runtimeManager.evaluateInInspectedWindow(step.expression, "test", false, true, false, true, false, function(remoteObject, wasThrown) {
</del><ins>+ WebInspector.runtimeManager.evaluateInInspectedWindow(step.expression, {objectGroup: "test", doNotPauseOnExceptionsAndMuteConsole: true, generatePreview: true}, function(remoteObject, wasThrown) {
</ins><span class="cx"> InspectorTest.log("");
</span><span class="cx"> InspectorTest.log("-----------------------------------------------------");
</span><span class="cx"> InspectorTest.log("EXPRESSION: " + step.expression);
</span></span></pre></div>
<a id="trunkLayoutTestsinspectortimelineexceptionininjectedscriptwhilerecordinghtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/inspector/timeline/exception-in-injected-script-while-recording.html (201854 => 201855)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/timeline/exception-in-injected-script-while-recording.html        2016-06-09 06:17:40 UTC (rev 201854)
+++ trunk/LayoutTests/inspector/timeline/exception-in-injected-script-while-recording.html        2016-06-09 06:20:55 UTC (rev 201855)
</span><span class="lines">@@ -50,7 +50,7 @@
</span><span class="cx"> });
</span><span class="cx">
</span><span class="cx"> function checkIfExceptionLoopsForever() {
</span><del>- WebInspector.runtimeManager.evaluateInInspectedWindow("({}).x.x", "test", true, true, false, false, false, function(result, wasThrown) {
</del><ins>+ WebInspector.runtimeManager.evaluateInInspectedWindow("({}).x.x", {objectGroup: "test", includeCommandLineAPI: true, doNotPauseOnExceptionsAndMuteConsole: true}, function(result, wasThrown) {
</ins><span class="cx"> InspectorTest.addResult("An exception was " + (wasThrown ? "" : "not ") + "thrown from the injected script.");
</span><span class="cx"> WebInspector.debuggerManager.resume().then(function() {
</span><span class="cx"> InspectorTest.addResult("Debugger resumed; stopping timeline capture.");
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/ChangeLog (201854 => 201855)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/ChangeLog        2016-06-09 06:17:40 UTC (rev 201854)
+++ trunk/Source/WebInspectorUI/ChangeLog        2016-06-09 06:20:55 UTC (rev 201855)
</span><span class="lines">@@ -1,3 +1,28 @@
</span><ins>+2016-06-08 Joseph Pecoraro <pecoraro@apple.com>
+
+ REGRESSION: Web Inspector: Should be able to evaluate "{a:1, b:2}" in the console
+ https://bugs.webkit.org/show_bug.cgi?id=158548
+ <rdar://problem/26708513>
+
+ Reviewed by Timothy Hatcher.
+
+ * UserInterface/Controllers/RuntimeManager.js:
+ (WebInspector.RuntimeManager.prototype.evaluateInInspectedWindow):
+ Switch the many parameters to an options dictionary.
+ Include a new option for sourceURL appender, so that
+ Console evaluations can have its own append.
+
+ * UserInterface/Controllers/JavaScriptLogViewController.js:
+ (WebInspector.JavaScriptLogViewController.prototype.consolePromptTextCommitted):
+ Use the appendWebInspectorConsoleEvaluationSourceURL appender.
+
+ * UserInterface/Controllers/JavaScriptRuntimeCompletionProvider.js:
+ (WebInspector.JavaScriptRuntimeCompletionProvider.prototype.completionControllerCompletionsNeeded.evaluated):
+ * UserInterface/Views/ScopeChainDetailsSidebarPanel.js:
+ (WebInspector.ScopeChainDetailsSidebarPanel.prototype._generateWatchExpressionsSection.):
+ (WebInspector.ScopeChainDetailsSidebarPanel.prototype._generateWatchExpressionsSection):
+ Use the new options dictionary.
+
</ins><span class="cx"> 2016-06-08 Brian Burg <bburg@apple.com>
</span><span class="cx">
</span><span class="cx"> Web Inspector: an error is encountered when trying to delete nodes that have children
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceControllersJavaScriptLogViewControllerjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Controllers/JavaScriptLogViewController.js (201854 => 201855)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Controllers/JavaScriptLogViewController.js        2016-06-09 06:17:40 UTC (rev 201854)
+++ trunk/Source/WebInspectorUI/UserInterface/Controllers/JavaScriptLogViewController.js        2016-06-09 06:20:55 UTC (rev 201855)
</span><span class="lines">@@ -231,9 +231,17 @@
</span><span class="cx"> this._appendConsoleMessageView(commandResultMessageView, true);
</span><span class="cx"> }
</span><span class="cx">
</span><del>- text = appendWebInspectorConsoleEvaluationSourceURL(text);
</del><ins>+ let options = {
+ objectGroup: WebInspector.RuntimeManager.ConsoleObjectGroup,
+ includeCommandLineAPI: true,
+ doNotPauseOnExceptionsAndMuteConsole: false,
+ returnByValue: false,
+ generatePreview: true,
+ saveResult: true,
+ sourceURLAppender: appendWebInspectorConsoleEvaluationSourceURL,
+ };
</ins><span class="cx">
</span><del>- WebInspector.runtimeManager.evaluateInInspectedWindow(text, WebInspector.RuntimeManager.ConsoleObjectGroup, true, false, false, true, true, printResult.bind(this));
</del><ins>+ WebInspector.runtimeManager.evaluateInInspectedWindow(text, options, printResult.bind(this));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> // Private
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceControllersJavaScriptRuntimeCompletionProviderjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Controllers/JavaScriptRuntimeCompletionProvider.js (201854 => 201855)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Controllers/JavaScriptRuntimeCompletionProvider.js        2016-06-09 06:17:40 UTC (rev 201854)
+++ trunk/Source/WebInspectorUI/UserInterface/Controllers/JavaScriptRuntimeCompletionProvider.js        2016-06-09 06:20:55 UTC (rev 201855)
</span><span class="lines">@@ -102,8 +102,10 @@
</span><span class="cx"> var activeCallFrame = WebInspector.debuggerManager.activeCallFrame;
</span><span class="cx"> if (!base && activeCallFrame && !this._alwaysEvaluateInWindowContext)
</span><span class="cx"> activeCallFrame.collectScopeChainVariableNames(receivedPropertyNames.bind(this));
</span><del>- else
- WebInspector.runtimeManager.evaluateInInspectedWindow(base, "completion", true, true, false, false, false, evaluated.bind(this));
</del><ins>+ else {
+ let options = {objectGroup: "completion", includeCommandLineAPI: true, doNotPauseOnExceptionsAndMuteConsole: true, returnByValue: false, generatePreview: false, saveResult: false};
+ WebInspector.runtimeManager.evaluateInInspectedWindow(base, options, evaluated.bind(this));
+ }
</ins><span class="cx">
</span><span class="cx"> function updateLastPropertyNames(propertyNames)
</span><span class="cx"> {
</span><span class="lines">@@ -185,9 +187,10 @@
</span><span class="cx"> result.callFunctionJSON(inspectedPage_evalResult_getArrayCompletions, undefined, receivedArrayPropertyNames.bind(this));
</span><span class="cx"> else if (result.type === "object" || result.type === "function")
</span><span class="cx"> result.callFunctionJSON(inspectedPage_evalResult_getCompletions, undefined, receivedPropertyNames.bind(this));
</span><del>- else if (result.type === "string" || result.type === "number" || result.type === "boolean" || result.type === "symbol")
- WebInspector.runtimeManager.evaluateInInspectedWindow("(" + inspectedPage_evalResult_getCompletions + ")(\"" + result.type + "\")", "completion", false, true, true, false, false, receivedPropertyNamesFromEvaluate.bind(this));
- else
</del><ins>+ else if (result.type === "string" || result.type === "number" || result.type === "boolean" || result.type === "symbol") {
+ let options = {objectGroup: "completion", includeCommandLineAPI: false, doNotPauseOnExceptionsAndMuteConsole: true, returnByValue: false, generatePreview: false, saveResult: false};
+ WebInspector.runtimeManager.evaluateInInspectedWindow("(" + inspectedPage_evalResult_getCompletions + ")(\"" + result.type + "\")", options, receivedPropertyNamesFromEvaluate.bind(this));
+ } else
</ins><span class="cx"> console.error("Unknown result type: " + result.type);
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceControllersRuntimeManagerjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Controllers/RuntimeManager.js (201854 => 201855)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Controllers/RuntimeManager.js        2016-06-09 06:17:40 UTC (rev 201854)
+++ trunk/Source/WebInspectorUI/UserInterface/Controllers/RuntimeManager.js        2016-06-09 06:20:55 UTC (rev 201855)
</span><span class="lines">@@ -35,8 +35,20 @@
</span><span class="cx">
</span><span class="cx"> // Public
</span><span class="cx">
</span><del>- evaluateInInspectedWindow(expression, objectGroup, includeCommandLineAPI, doNotPauseOnExceptionsAndMuteConsole, returnByValue, generatePreview, saveResult, callback)
</del><ins>+ evaluateInInspectedWindow(expression, options, callback)
</ins><span class="cx"> {
</span><ins>+ let {objectGroup, includeCommandLineAPI, doNotPauseOnExceptionsAndMuteConsole, returnByValue, generatePreview, saveResult, sourceURLAppender} = options;
+
+ includeCommandLineAPI = includeCommandLineAPI || false;
+ doNotPauseOnExceptionsAndMuteConsole = doNotPauseOnExceptionsAndMuteConsole || false;
+ returnByValue = returnByValue || false;
+ generatePreview = generatePreview || false;
+ saveResult = saveResult || false;
+ sourceURLAppender = sourceURLAppender || appendWebInspectorSourceURL;
+
+ console.assert(objectGroup, "RuntimeManager.evaluateInInspectedWindow should always be called with an objectGroup");
+ console.assert(typeof sourceURLAppender === "function");
+
</ins><span class="cx"> if (!expression) {
</span><span class="cx"> // There is no expression, so the completion should happen against global properties.
</span><span class="cx"> expression = "this";
</span><span class="lines">@@ -45,7 +57,7 @@
</span><span class="cx"> expression = "(" + expression + ")";
</span><span class="cx"> }
</span><span class="cx">
</span><del>- expression = appendWebInspectorSourceURL(expression);
</del><ins>+ expression = sourceURLAppender(expression);
</ins><span class="cx">
</span><span class="cx"> function evalCallback(error, result, wasThrown, savedResultIndex)
</span><span class="cx"> {
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsScopeChainDetailsSidebarPaneljs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/ScopeChainDetailsSidebarPanel.js (201854 => 201855)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/ScopeChainDetailsSidebarPanel.js        2016-06-09 06:17:40 UTC (rev 201854)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/ScopeChainDetailsSidebarPanel.js        2016-06-09 06:20:55 UTC (rev 201855)
</span><span class="lines">@@ -350,7 +350,8 @@
</span><span class="cx"> let promises = [];
</span><span class="cx"> for (let expression of watchExpressions) {
</span><span class="cx"> promises.push(new Promise(function(resolve, reject) {
</span><del>- WebInspector.runtimeManager.evaluateInInspectedWindow(expression, WebInspector.ScopeChainDetailsSidebarPanel.WatchExpressionsObjectGroupName, false, true, false, true, false, function(object, wasThrown) {
</del><ins>+ let options = {objectGroup: WebInspector.ScopeChainDetailsSidebarPanel.WatchExpressionsObjectGroupName, includeCommandLineAPI: false, doNotPauseOnExceptionsAndMuteConsole: true, returnByValue: false, generatePreview: true, saveResult: false};
+ WebInspector.runtimeManager.evaluateInInspectedWindow(expression, options, function(object, wasThrown) {
</ins><span class="cx"> let propertyDescriptor = new WebInspector.PropertyDescriptor({name: expression, value: object}, undefined, undefined, wasThrown);
</span><span class="cx"> objectTree.appendExtraPropertyDescriptor(propertyDescriptor);
</span><span class="cx"> resolve(propertyDescriptor);
</span></span></pre>
</div>
</div>
</body>
</html>