<!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>[206652] 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/206652">206652</a></dd>
<dt>Author</dt> <dd>joepeck@webkit.org</dd>
<dt>Date</dt> <dd>2016-09-30 12:22:37 -0700 (Fri, 30 Sep 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>Web Inspector: Stepping out of a function finishes the line that called it.
https://bugs.webkit.org/show_bug.cgi?id=155325
&lt;rdar://problem/25094578&gt;

Reviewed by Mark Lam.

Source/JavaScriptCore:

Also addresses:
&lt;https://webkit.org/b/161721&gt; Web Inspector: Stepping all the way through program should not cause a pause on the next program that executes
&lt;https://webkit.org/b/161716&gt; Web Inspector: Stepping into a function / program should not require stepping to the first statement

This change introduces a new op_debug hook: WillExecuteExpression.
Currently this new hook is only used for pausing at function calls.
We may decide to add it to other places later where pausing with
finer granularity then statements (or lines) if useful.

This updates the location and behavior of some of the existing debug
hooks, to be more consistent and useful if the exact location of the
pause is displayed. For example, in control flow statements like
`if` and `while`, the pause location is the expression itself that
will be evaluated, not the location of the `if` or `while` keyword.
For example:

    if (|condition)
    while (|condition)

Finally, this change gets rid of some unnecessary / useless pause
locations such as on entering a function and on entering a program.
These pauses are not needed because if there is a statement, we
would pause before the statement and it is equivalent. We continue
to pause when leaving a function via stepping by uniformly jumping
to the closing brace of the function. This gives users a chance
to observe state before leaving the function.

* bytecode/CodeBlock.cpp:
(JSC::debugHookName):
* bytecode/UnlinkedCodeBlock.cpp:
(JSC::dumpLineColumnEntry):
Logging strings for the new debug hook.

* bytecompiler/BytecodeGenerator.h:
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::emitCallInTailPosition):
(JSC::BytecodeGenerator::emitCallEval):
(JSC::BytecodeGenerator::emitCallVarargsInTailPosition):
(JSC::BytecodeGenerator::emitConstructVarargs):
(JSC::BytecodeGenerator::emitCallForwardArgumentsInTailPosition):
(JSC::BytecodeGenerator::emitCallDefineProperty):
(JSC::BytecodeGenerator::emitConstruct):
(JSC::BytecodeGenerator::emitGetTemplateObject):
(JSC::BytecodeGenerator::emitIteratorNext):
(JSC::BytecodeGenerator::emitIteratorNextWithValue):
(JSC::BytecodeGenerator::emitIteratorClose):
(JSC::BytecodeGenerator::emitDelegateYield):
All emitCall variants now take an enum to decide whether or not to
emit the WillExecuteExpression debug hook.

(JSC::BytecodeGenerator::emitCall):
(JSC::BytecodeGenerator::emitCallVarargs):
In the two real implementations, actually decide to emit the debug
hook or not based on the parameter.

(JSC::BytecodeGenerator::emitEnumeration):
This is shared looping code used by for..of iteration of iterables.
When used by ForOfNode, we want to emit a pause location during
iteration.

(JSC::BytecodeGenerator::emitWillLeaveCallFrameDebugHook):
This is shared call frame leave code to emit a consistent pause
location when leaving a function.

* bytecompiler/NodesCodegen.cpp:
(JSC::EvalFunctionCallNode::emitBytecode):
(JSC::FunctionCallValueNode::emitBytecode):
(JSC::FunctionCallResolveNode::emitBytecode):
(JSC::BytecodeIntrinsicNode::emit_intrinsic_tailCallForwardArguments):
(JSC::FunctionCallBracketNode::emitBytecode):
(JSC::FunctionCallDotNode::emitBytecode):
(JSC::CallFunctionCallDotNode::emitBytecode):
(JSC::ApplyFunctionCallDotNode::emitBytecode):
(JSC::TaggedTemplateNode::emitBytecode):
(JSC::ArrayPatternNode::bindValue):
All tail position calls are the function calls that we want to emit
debug hooks for. All non-tail call calls appear to be internal
implementation details, and these should not have the debug hook.

(JSC::IfElseNode::emitBytecode):
(JSC::WhileNode::emitBytecode):
(JSC::WithNode::emitBytecode):
(JSC::SwitchNode::emitBytecode):
Make the pause location consistent at the expression.

(JSC::DoWhileNode::emitBytecode):
Make the pause location consistent at the expression.
Remove the errant pause at the do's '}' when entering the do block.

(JSC::ForNode::emitBytecode):
(JSC::ForInNode::emitMultiLoopBytecode):
(JSC::ForOfNode::emitBytecode):
Make the pause location consistent at expressions.
Also allow stepping to the traditional for loop's
update expression, which was previously not possible.

(JSC::ReturnNode::emitBytecode):
(JSC::FunctionNode::emitBytecode):
Make the pause location when leaving a function consistently be the
function's closing brace. The two cases are stepping through a return
statement, or the implicit return undefined at the end of a function.

(JSC::LabelNode::emitBytecode):
(JSC::TryNode::emitBytecode):
Remove unnecessary pauses that add no value, as they contain a
statement and we will then pause at that statement.

* parser/Nodes.h:
(JSC::StatementNode::isFunctionNode):
(JSC::StatementNode::isForOfNode):
(JSC::EnumerationNode::lexpr):
(JSC::ForOfNode::isForOfNode):
New virtual methods to distinguish different nodes.

* debugger/Debugger.h:
Rename m_pauseAtNextStatement to m_pauseAtNextOpportunity.
This is the finest granularity of stepping, and it can be
pausing at a location that is not a statement.
Introduce state to properly handle step out and stepping
when there are multiple expressions in a statement.

* debugger/Debugger.cpp:
(JSC::Debugger::Debugger):
(JSC::Debugger::setPauseOnNextStatement):
(JSC::Debugger::breakProgram):
(JSC::Debugger::continueProgram):
(JSC::Debugger::stepIntoStatement):
(JSC::Debugger::exception):
(JSC::Debugger::didReachBreakpoint):

Use new variable names, and clarify if we should attempt
to pause or not.

(JSC::Debugger::stepOutOfFunction):
Set a new state to indicate a step out action.

(JSC::Debugger::updateCallFrame):
(JSC::Debugger::updateCallFrameAndPauseIfNeeded): Deleted.
(JSC::Debugger::updateCallFrameInternal):
(JSC::Debugger::pauseIfNeeded):
Allow updateCallFrame to either attempt a pause or not.

(JSC::Debugger::atStatement):
Attempt pause and reset the at first expression flag.

(JSC::Debugger::atExpression):
Attempt a pause when not stepping over. Also skip
the first expression pause, since that would be
equivalent to when we paused for the expression.

(JSC::Debugger::callEvent):
Do not pause when entering a function.

(JSC::Debugger::returnEvent):
Attempt pause when leaving a function.
If the user did a step-over and is leaving the
function, then behave like step-out.

(JSC::Debugger::unwindEvent):
Behave like return except don't change any
pausing states. If we needed to pause the
Debugger::exception will have handled it.

(JSC::Debugger::willExecuteProgram):
Do not pause when entering a program.

(JSC::Debugger::didExecuteProgram):
Attempt pause when leaving a program that has a caller.
This can be useful for exiting an eval(...) program.
Otherwise treat this like return, and step-over out
of the program should behave like step-out. We use
pause at next opportunity because there may be extra
callframes we do not know about.
When the program doesn't have a parent, clear all
our state so we don't errantly pause on the next
JavaScript microtask that gets executed.

(JSC::Debugger::clearNextPauseState):
Helper to clear all of the pause states now that
it happens in a couple places.

* interpreter/Interpreter.cpp:
(JSC::notifyDebuggerOfUnwinding):
Treat unwinding slightly differently from returning.
We will not want to pause when unwinding callframes.

(JSC::Interpreter::debug):
* interpreter/Interpreter.h:
New debug hook.

* inspector/agents/InspectorDebuggerAgent.cpp:
(Inspector::InspectorDebuggerAgent::stepInto):
(Inspector::InspectorDebuggerAgent::didPause):
* inspector/agents/InspectorDebuggerAgent.h:
Remove unnecessary stepInto code notification for listeners.
The listeners are never notified if the debugger resumes,
so whatever state they were setting by this is going to
get out of date.

Source/WebCore:

Tests: inspector/debugger/stepping/stepInto.html
       inspector/debugger/stepping/stepOut.html
       inspector/debugger/stepping/stepOver.html
       inspector/debugger/stepping/stepping-arrow-functions.html
       inspector/debugger/stepping/stepping-classes.html
       inspector/debugger/stepping/stepping-control-flow.html
       inspector/debugger/stepping/stepping-function-calls.html
       inspector/debugger/stepping/stepping-function-default-parameters.html
       inspector/debugger/stepping/stepping-literal-construction.html
       inspector/debugger/stepping/stepping-loops.html
       inspector/debugger/stepping/stepping-misc.html
       inspector/debugger/stepping/stepping-switch.html
       inspector/debugger/stepping/stepping-template-string.html
       inspector/debugger/stepping/stepping-try-catch-finally.html

* inspector/InspectorDOMDebuggerAgent.h:
* inspector/InspectorDOMDebuggerAgent.cpp:
(WebCore::InspectorDOMDebuggerAgent::stepInto): Deleted.
Setting this state in step-into does not make sense since we do not
know when the debugger resumes and won't know when to clear it.

LayoutTests:

* inspector/debugger/break-on-exception-throw-in-promise.html:
Drive-by remove debug only code that shouldn't have been checked in.

* inspector/debugger/resources/log-pause-location.js: Added.
(TestPage.registerInitializer.String.prototype.myPadStart):
(TestPage.registerInitializer.insertCaretIntoStringAtIndex):
(TestPage.registerInitializer.logLinesWithContext):
(TestPage.registerInitializer.window.logPauseLocation):
(TestPage.registerInitializer.window.step):
(TestPage.registerInitializer.window.initializeSteppingTestSuite):
(TestPage.registerInitializer.window.addSteppingTestCase):
(TestPage.registerInitializer.window.loadMainPageContent):
Shared code for stepping tests that runs in the inspected page.

(global):
When the test page is loaded outside of the test runner,
create buttons for each of the different entry test functions.
This makes it very easy to inspect the test page and run
through an individual test.

* inspector/debugger/stepping/stepInto-expected.txt: Added.
* inspector/debugger/stepping/stepInto.html: Added.
* inspector/debugger/stepping/stepOut-expected.txt: Added.
* inspector/debugger/stepping/stepOut.html: Added.
* inspector/debugger/stepping/stepOver-expected.txt: Added.
* inspector/debugger/stepping/stepOver.html: Added.
* inspector/debugger/stepping/stepping-arrow-functions-expected.txt: Added.
* inspector/debugger/stepping/stepping-arrow-functions.html: Added.
* inspector/debugger/stepping/stepping-classes-expected.txt: Added.
* inspector/debugger/stepping/stepping-classes.html: Added.
* inspector/debugger/stepping/stepping-control-flow-expected.txt: Added.
* inspector/debugger/stepping/stepping-control-flow.html: Added.
* inspector/debugger/stepping/stepping-function-calls-expected.txt: Added.
* inspector/debugger/stepping/stepping-function-calls.html: Added.
* inspector/debugger/stepping/stepping-function-default-parameters-expected.txt: Added.
* inspector/debugger/stepping/stepping-function-default-parameters.html: Added.
* inspector/debugger/stepping/stepping-literal-construction-expected.txt: Added.
* inspector/debugger/stepping/stepping-literal-construction.html: Added.
* inspector/debugger/stepping/stepping-loops-expected.txt: Added.
* inspector/debugger/stepping/stepping-loops.html: Added.
* inspector/debugger/stepping/stepping-misc-expected.txt: Added.
* inspector/debugger/stepping/stepping-misc.html: Added.
* inspector/debugger/stepping/stepping-switch-expected.txt: Added.
* inspector/debugger/stepping/stepping-switch.html: Added.
* inspector/debugger/stepping/stepping-template-string-expected.txt: Added.
* inspector/debugger/stepping/stepping-template-string.html: Added.
* inspector/debugger/stepping/stepping-try-catch-finally-expected.txt: Added.
* inspector/debugger/stepping/stepping-try-catch-finally.html: Added.
Test stepping in different common scenarios.

* inspector/debugger/regress-133182.html:
* inspector/debugger/regress-133182-expected.txt:
* inspector/debugger/tail-deleted-frames-from-vm-entry-expected.txt:
* inspector/debugger/tail-deleted-frames-from-vm-entry.html:
Rebaseline. No need for a double step. And the second pause doesn't make any sense
in the tail deleted frames test.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsTestExpectations">trunk/LayoutTests/TestExpectations</a></li>
<li><a href="#trunkLayoutTestsinspectordebuggerregress133182expectedtxt">trunk/LayoutTests/inspector/debugger/regress-133182-expected.txt</a></li>
<li><a href="#trunkLayoutTestsinspectordebuggerregress133182html">trunk/LayoutTests/inspector/debugger/regress-133182.html</a></li>
<li><a href="#trunkLayoutTestsinspectordebuggertaildeletedframesfromvmentryexpectedtxt">trunk/LayoutTests/inspector/debugger/tail-deleted-frames-from-vm-entry-expected.txt</a></li>
<li><a href="#trunkLayoutTestsinspectordebuggertaildeletedframesfromvmentryhtml">trunk/LayoutTests/inspector/debugger/tail-deleted-frames-from-vm-entry.html</a></li>
<li><a href="#trunkSourceJavaScriptCoreChangeLog">trunk/Source/JavaScriptCore/ChangeLog</a></li>
<li><a href="#trunkSourceJavaScriptCorebytecodeCodeBlockcpp">trunk/Source/JavaScriptCore/bytecode/CodeBlock.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCorebytecodeUnlinkedCodeBlockcpp">trunk/Source/JavaScriptCore/bytecode/UnlinkedCodeBlock.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCorebytecompilerBytecodeGeneratorcpp">trunk/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCorebytecompilerBytecodeGeneratorh">trunk/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.h</a></li>
<li><a href="#trunkSourceJavaScriptCorebytecompilerNodesCodegencpp">trunk/Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoredebuggerDebuggercpp">trunk/Source/JavaScriptCore/debugger/Debugger.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoredebuggerDebuggerh">trunk/Source/JavaScriptCore/debugger/Debugger.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="#trunkSourceJavaScriptCoreinterpreterInterpretercpp">trunk/Source/JavaScriptCore/interpreter/Interpreter.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreinterpreterInterpreterh">trunk/Source/JavaScriptCore/interpreter/Interpreter.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreparserNodesh">trunk/Source/JavaScriptCore/parser/Nodes.h</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreinspectorInspectorDOMDebuggerAgentcpp">trunk/Source/WebCore/inspector/InspectorDOMDebuggerAgent.cpp</a></li>
<li><a href="#trunkSourceWebCoreinspectorInspectorDOMDebuggerAgenth">trunk/Source/WebCore/inspector/InspectorDOMDebuggerAgent.h</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsinspectordebuggerresourceslogpauselocationjs">trunk/LayoutTests/inspector/debugger/resources/log-pause-location.js</a></li>
<li>trunk/LayoutTests/inspector/debugger/stepping/</li>
<li><a href="#trunkLayoutTestsinspectordebuggersteppingstepIntoexpectedtxt">trunk/LayoutTests/inspector/debugger/stepping/stepInto-expected.txt</a></li>
<li><a href="#trunkLayoutTestsinspectordebuggersteppingstepIntohtml">trunk/LayoutTests/inspector/debugger/stepping/stepInto.html</a></li>
<li><a href="#trunkLayoutTestsinspectordebuggersteppingstepOutexpectedtxt">trunk/LayoutTests/inspector/debugger/stepping/stepOut-expected.txt</a></li>
<li><a href="#trunkLayoutTestsinspectordebuggersteppingstepOuthtml">trunk/LayoutTests/inspector/debugger/stepping/stepOut.html</a></li>
<li><a href="#trunkLayoutTestsinspectordebuggersteppingstepOverexpectedtxt">trunk/LayoutTests/inspector/debugger/stepping/stepOver-expected.txt</a></li>
<li><a href="#trunkLayoutTestsinspectordebuggersteppingstepOverhtml">trunk/LayoutTests/inspector/debugger/stepping/stepOver.html</a></li>
<li><a href="#trunkLayoutTestsinspectordebuggersteppingsteppingarrowfunctionsexpectedtxt">trunk/LayoutTests/inspector/debugger/stepping/stepping-arrow-functions-expected.txt</a></li>
<li><a href="#trunkLayoutTestsinspectordebuggersteppingsteppingarrowfunctionshtml">trunk/LayoutTests/inspector/debugger/stepping/stepping-arrow-functions.html</a></li>
<li><a href="#trunkLayoutTestsinspectordebuggersteppingsteppingclassesexpectedtxt">trunk/LayoutTests/inspector/debugger/stepping/stepping-classes-expected.txt</a></li>
<li><a href="#trunkLayoutTestsinspectordebuggersteppingsteppingclasseshtml">trunk/LayoutTests/inspector/debugger/stepping/stepping-classes.html</a></li>
<li><a href="#trunkLayoutTestsinspectordebuggersteppingsteppingcontrolflowexpectedtxt">trunk/LayoutTests/inspector/debugger/stepping/stepping-control-flow-expected.txt</a></li>
<li><a href="#trunkLayoutTestsinspectordebuggersteppingsteppingcontrolflowhtml">trunk/LayoutTests/inspector/debugger/stepping/stepping-control-flow.html</a></li>
<li><a href="#trunkLayoutTestsinspectordebuggersteppingsteppingfunctioncallsexpectedtxt">trunk/LayoutTests/inspector/debugger/stepping/stepping-function-calls-expected.txt</a></li>
<li><a href="#trunkLayoutTestsinspectordebuggersteppingsteppingfunctioncallshtml">trunk/LayoutTests/inspector/debugger/stepping/stepping-function-calls.html</a></li>
<li><a href="#trunkLayoutTestsinspectordebuggersteppingsteppingfunctiondefaultparametersexpectedtxt">trunk/LayoutTests/inspector/debugger/stepping/stepping-function-default-parameters-expected.txt</a></li>
<li><a href="#trunkLayoutTestsinspectordebuggersteppingsteppingfunctiondefaultparametershtml">trunk/LayoutTests/inspector/debugger/stepping/stepping-function-default-parameters.html</a></li>
<li><a href="#trunkLayoutTestsinspectordebuggersteppingsteppingliteralconstructionexpectedtxt">trunk/LayoutTests/inspector/debugger/stepping/stepping-literal-construction-expected.txt</a></li>
<li><a href="#trunkLayoutTestsinspectordebuggersteppingsteppingliteralconstructionhtml">trunk/LayoutTests/inspector/debugger/stepping/stepping-literal-construction.html</a></li>
<li><a href="#trunkLayoutTestsinspectordebuggersteppingsteppingloopsexpectedtxt">trunk/LayoutTests/inspector/debugger/stepping/stepping-loops-expected.txt</a></li>
<li><a href="#trunkLayoutTestsinspectordebuggersteppingsteppingloopshtml">trunk/LayoutTests/inspector/debugger/stepping/stepping-loops.html</a></li>
<li><a href="#trunkLayoutTestsinspectordebuggersteppingsteppingmiscexpectedtxt">trunk/LayoutTests/inspector/debugger/stepping/stepping-misc-expected.txt</a></li>
<li><a href="#trunkLayoutTestsinspectordebuggersteppingsteppingmischtml">trunk/LayoutTests/inspector/debugger/stepping/stepping-misc.html</a></li>
<li><a href="#trunkLayoutTestsinspectordebuggersteppingsteppingswitchexpectedtxt">trunk/LayoutTests/inspector/debugger/stepping/stepping-switch-expected.txt</a></li>
<li><a href="#trunkLayoutTestsinspectordebuggersteppingsteppingswitchhtml">trunk/LayoutTests/inspector/debugger/stepping/stepping-switch.html</a></li>
<li><a href="#trunkLayoutTestsinspectordebuggersteppingsteppingtemplatestringexpectedtxt">trunk/LayoutTests/inspector/debugger/stepping/stepping-template-string-expected.txt</a></li>
<li><a href="#trunkLayoutTestsinspectordebuggersteppingsteppingtemplatestringhtml">trunk/LayoutTests/inspector/debugger/stepping/stepping-template-string.html</a></li>
<li><a href="#trunkLayoutTestsinspectordebuggersteppingsteppingtrycatchfinallyexpectedtxt">trunk/LayoutTests/inspector/debugger/stepping/stepping-try-catch-finally-expected.txt</a></li>
<li><a href="#trunkLayoutTestsinspectordebuggersteppingsteppingtrycatchfinallyhtml">trunk/LayoutTests/inspector/debugger/stepping/stepping-try-catch-finally.html</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (206651 => 206652)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2016-09-30 19:19:44 UTC (rev 206651)
+++ trunk/LayoutTests/ChangeLog        2016-09-30 19:22:37 UTC (rev 206652)
</span><span class="lines">@@ -1,3 +1,68 @@
</span><ins>+2016-09-30  Joseph Pecoraro  &lt;pecoraro@apple.com&gt;
+
+        Web Inspector: Stepping out of a function finishes the line that called it.
+        https://bugs.webkit.org/show_bug.cgi?id=155325
+        &lt;rdar://problem/25094578&gt;
+
+        Reviewed by Mark Lam.
+
+        * inspector/debugger/break-on-exception-throw-in-promise.html:
+        Drive-by remove debug only code that shouldn't have been checked in.
+
+        * inspector/debugger/resources/log-pause-location.js: Added.
+        (TestPage.registerInitializer.String.prototype.myPadStart):
+        (TestPage.registerInitializer.insertCaretIntoStringAtIndex):
+        (TestPage.registerInitializer.logLinesWithContext):
+        (TestPage.registerInitializer.window.logPauseLocation):
+        (TestPage.registerInitializer.window.step):
+        (TestPage.registerInitializer.window.initializeSteppingTestSuite):
+        (TestPage.registerInitializer.window.addSteppingTestCase):
+        (TestPage.registerInitializer.window.loadMainPageContent):
+        Shared code for stepping tests that runs in the inspected page.
+
+        (global):
+        When the test page is loaded outside of the test runner,
+        create buttons for each of the different entry test functions.
+        This makes it very easy to inspect the test page and run
+        through an individual test.
+
+        * inspector/debugger/stepping/stepInto-expected.txt: Added.
+        * inspector/debugger/stepping/stepInto.html: Added.
+        * inspector/debugger/stepping/stepOut-expected.txt: Added.
+        * inspector/debugger/stepping/stepOut.html: Added.
+        * inspector/debugger/stepping/stepOver-expected.txt: Added.
+        * inspector/debugger/stepping/stepOver.html: Added.
+        * inspector/debugger/stepping/stepping-arrow-functions-expected.txt: Added.
+        * inspector/debugger/stepping/stepping-arrow-functions.html: Added.
+        * inspector/debugger/stepping/stepping-classes-expected.txt: Added.
+        * inspector/debugger/stepping/stepping-classes.html: Added.
+        * inspector/debugger/stepping/stepping-control-flow-expected.txt: Added.
+        * inspector/debugger/stepping/stepping-control-flow.html: Added.
+        * inspector/debugger/stepping/stepping-function-calls-expected.txt: Added.
+        * inspector/debugger/stepping/stepping-function-calls.html: Added.
+        * inspector/debugger/stepping/stepping-function-default-parameters-expected.txt: Added.
+        * inspector/debugger/stepping/stepping-function-default-parameters.html: Added.
+        * inspector/debugger/stepping/stepping-literal-construction-expected.txt: Added.
+        * inspector/debugger/stepping/stepping-literal-construction.html: Added.
+        * inspector/debugger/stepping/stepping-loops-expected.txt: Added.
+        * inspector/debugger/stepping/stepping-loops.html: Added.
+        * inspector/debugger/stepping/stepping-misc-expected.txt: Added.
+        * inspector/debugger/stepping/stepping-misc.html: Added.
+        * inspector/debugger/stepping/stepping-switch-expected.txt: Added.
+        * inspector/debugger/stepping/stepping-switch.html: Added.
+        * inspector/debugger/stepping/stepping-template-string-expected.txt: Added.
+        * inspector/debugger/stepping/stepping-template-string.html: Added.
+        * inspector/debugger/stepping/stepping-try-catch-finally-expected.txt: Added.
+        * inspector/debugger/stepping/stepping-try-catch-finally.html: Added.
+        Test stepping in different common scenarios.
+
+        * inspector/debugger/regress-133182.html:
+        * inspector/debugger/regress-133182-expected.txt:
+        * inspector/debugger/tail-deleted-frames-from-vm-entry-expected.txt:
+        * inspector/debugger/tail-deleted-frames-from-vm-entry.html:
+        Rebaseline. No need for a double step. And the second pause doesn't make any sense
+        in the tail deleted frames test.
+
</ins><span class="cx"> 2016-09-30  Chris Dumez  &lt;cdumez@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [WK2][iOS] Add radiusX / radiusY / rotationAngle to WebPlatformTouchPoint
</span></span></pre></div>
<a id="trunkLayoutTestsTestExpectations"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/TestExpectations (206651 => 206652)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/TestExpectations        2016-09-30 19:19:44 UTC (rev 206651)
+++ trunk/LayoutTests/TestExpectations        2016-09-30 19:22:37 UTC (rev 206652)
</span><span class="lines">@@ -135,6 +135,10 @@
</span><span class="cx"> webkit.org/b/148036 http/tests/inspector/page/ [ Skip ]
</span><span class="cx"> webkit.org/b/148036 http/tests/inspector/replay/ [ Skip ]
</span><span class="cx"> 
</span><ins>+# Debugger stepping tests can timeout if they run slowly due to a short timer scheduled in the frontend:
+webkit.org/b/161951 [ Debug ] inspector/debugger/stepping [ Skip ]
+webkit.org/b/161951 [ Release ] inspector/debugger/stepping [ Slow ]
+
</ins><span class="cx"> webkit.org/b/129639 inspector/dom/dom-search-crash.html [ Skip ]
</span><span class="cx"> 
</span><span class="cx"> webkit.org/b/128736 inspector/debugger/setBreakpoint-dfg.html [ Failure Pass ]
</span></span></pre></div>
<a id="trunkLayoutTestsinspectordebuggerregress133182expectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/inspector/debugger/regress-133182-expected.txt (206651 => 206652)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/debugger/regress-133182-expected.txt        2016-09-30 19:19:44 UTC (rev 206651)
+++ trunk/LayoutTests/inspector/debugger/regress-133182-expected.txt        2016-09-30 19:22:37 UTC (rev 206652)
</span><span class="lines">@@ -1,48 +1,34 @@
</span><del>-CONSOLE MESSAGE: line 56: [1] Testing statement '({}).a.b.c.d;'
-CONSOLE MESSAGE: line 57: [1] Paused and about to step
-CONSOLE MESSAGE: line 69: [1] Resumed
-CONSOLE MESSAGE: line 61: [1] Paused after stepping
-CONSOLE MESSAGE: line 69: [1] Resumed
</del><span class="cx"> CONSOLE MESSAGE: line 1: TypeError: undefined is not an object (evaluating '({}).a.b')
</span><del>-CONSOLE MESSAGE: line 56: [2] Testing statement 'exceptionBasic();'
-CONSOLE MESSAGE: line 57: [2] Paused and about to step
-CONSOLE MESSAGE: line 69: [2] Resumed
-CONSOLE MESSAGE: line 61: [2] Paused after stepping
-CONSOLE MESSAGE: line 69: [2] Resumed
</del><span class="cx"> CONSOLE MESSAGE: line 3: TypeError: undefined is not an object (evaluating '({}).a.b')
</span><del>-CONSOLE MESSAGE: line 56: [3] Testing statement 'exceptionDOM();'
-CONSOLE MESSAGE: line 57: [3] Paused and about to step
-CONSOLE MESSAGE: line 69: [3] Resumed
-CONSOLE MESSAGE: line 61: [3] Paused after stepping
-CONSOLE MESSAGE: line 69: [3] Resumed
</del><span class="cx"> CONSOLE MESSAGE: line 8: NotFoundError (DOM Exception 8): The object can not be found here.
</span><del>-CONSOLE MESSAGE: line 56: [4] Testing statement 'exceptionInHostFunction();'
-CONSOLE MESSAGE: line 57: [4] Paused and about to step
-CONSOLE MESSAGE: line 69: [4] Resumed
-CONSOLE MESSAGE: line 61: [4] Paused after stepping
-CONSOLE MESSAGE: line 69: [4] Resumed
</del><span class="cx"> CONSOLE MESSAGE: line 24: exception in host function
</span><del>-CONSOLE MESSAGE: line 56: [5] Testing statement 'throwString();'
-CONSOLE MESSAGE: line 57: [5] Paused and about to step
-CONSOLE MESSAGE: line 69: [5] Resumed
-CONSOLE MESSAGE: line 61: [5] Paused after stepping
-CONSOLE MESSAGE: line 69: [5] Resumed
</del><span class="cx"> CONSOLE MESSAGE: line 13: exception string
</span><del>-CONSOLE MESSAGE: line 56: [6] Testing statement 'throwParam({x:1});'
-CONSOLE MESSAGE: line 57: [6] Paused and about to step
-CONSOLE MESSAGE: line 69: [6] Resumed
-CONSOLE MESSAGE: line 61: [6] Paused after stepping
-CONSOLE MESSAGE: line 69: [6] Resumed
</del><span class="cx"> CONSOLE MESSAGE: line 18: [object Object]
</span><del>-CONSOLE MESSAGE: line 56: [7] Testing statement 'throwParam(new Error('error message'));'
-CONSOLE MESSAGE: line 57: [7] Paused and about to step
-CONSOLE MESSAGE: line 69: [7] Resumed
-CONSOLE MESSAGE: line 61: [7] Paused after stepping
-CONSOLE MESSAGE: line 69: [7] Resumed
</del><span class="cx"> CONSOLE MESSAGE: line 18: Error: error message
</span><span class="cx"> Regression test for https://bugs.webkit.org/show_bug.cgi?id=133182
</span><span class="cx"> 
</span><del>-Stepping after breaking on uncaught exceptions should not crash
</del><ins>+Stepping after breaking on uncaught exceptions should not crash.
</ins><span class="cx"> 
</span><ins>+[1] Testing statement '({}).a.b.c.d;'
+[1] Paused and about to step
+[1] Resumed
+[2] Testing statement 'exceptionBasic();'
+[2] Paused and about to step
+[2] Resumed
+[3] Testing statement 'exceptionDOM();'
+[3] Paused and about to step
+[3] Resumed
+[4] Testing statement 'exceptionInHostFunction();'
+[4] Paused and about to step
+[4] Resumed
+[5] Testing statement 'throwString();'
+[5] Paused and about to step
+[5] Resumed
+[6] Testing statement 'throwParam({x:1});'
+[6] Paused and about to step
+[6] Resumed
+[7] Testing statement 'throwParam(new Error('error message'));'
+[7] Paused and about to step
+[7] Resumed
</ins><span class="cx"> PASS - paused for each uncaught exception
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsinspectordebuggerregress133182html"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/inspector/debugger/regress-133182.html (206651 => 206652)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/debugger/regress-133182.html        2016-09-30 19:19:44 UTC (rev 206651)
+++ trunk/LayoutTests/inspector/debugger/regress-133182.html        2016-09-30 19:22:37 UTC (rev 206652)
</span><span class="lines">@@ -1,3 +1,4 @@
</span><ins>+&lt;!DOCTYPE html&gt;
</ins><span class="cx"> &lt;html&gt;
</span><span class="cx"> &lt;head&gt;
</span><span class="cx"> &lt;script src=&quot;../../http/tests/inspector/resources/protocol-test.js&quot;&gt;&lt;/script&gt;
</span><span class="lines">@@ -5,11 +6,9 @@
</span><span class="cx"> &lt;script&gt;
</span><span class="cx"> function test()
</span><span class="cx"> {
</span><del>-    var expectPause = false;
-    var isStepping = false;
-
-    var testIndex = 0;
-    var statementsWithUncaughtExceptions = [
</del><ins>+    let expectPause = false;
+    let testIndex = 0;
+    let statementsWithUncaughtExceptions = [
</ins><span class="cx">         &quot;({}).a.b.c.d;&quot;,
</span><span class="cx">         &quot;exceptionBasic();&quot;,
</span><span class="cx">         &quot;exceptionDOM();&quot;,
</span><span class="lines">@@ -49,23 +48,15 @@
</span><span class="cx">             return;
</span><span class="cx">         }
</span><span class="cx"> 
</span><del>-        if (!isStepping) {
-            console.log(&quot;[&quot; + testIndex + &quot;] Testing statement '&quot; + statementsWithUncaughtExceptions[testIndex - 1] + &quot;'&quot;);
-            console.log(&quot;[&quot; + testIndex + &quot;] Paused and about to step&quot;);
-            isStepping = true;
-            InspectorProtocol.sendCommand(&quot;Debugger.stepOver&quot;, {});
-        } else {
-            console.log(&quot;[&quot; + testIndex + &quot;] Paused after stepping&quot;);
-            isStepping = false;
-            InspectorProtocol.sendCommand(&quot;Debugger.resume&quot;, {});
-        }
</del><ins>+        ProtocolTest.log(&quot;[&quot; + testIndex + &quot;] Testing statement '&quot; + statementsWithUncaughtExceptions[testIndex - 1] + &quot;'&quot;);
+        ProtocolTest.log(&quot;[&quot; + testIndex + &quot;] Paused and about to step&quot;);
+        InspectorProtocol.sendCommand(&quot;Debugger.stepOver&quot;, {});
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     InspectorProtocol.eventHandler[&quot;Debugger.resumed&quot;] = function(messageObject)
</span><span class="cx">     {
</span><del>-        console.log(&quot;[&quot; + testIndex + &quot;] Resumed&quot;);
-        if (!isStepping)
-            triggerNextUncaughtException();
</del><ins>+        ProtocolTest.log(&quot;[&quot; + testIndex + &quot;] Resumed&quot;);
+        triggerNextUncaughtException();
</ins><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> &lt;/script&gt;
</span><span class="lines">@@ -72,6 +63,6 @@
</span><span class="cx"> &lt;/head&gt;
</span><span class="cx"> &lt;body onload=&quot;runTest()&quot;&gt;
</span><span class="cx"> &lt;p&gt;Regression test for https://bugs.webkit.org/show_bug.cgi?id=133182&lt;/p&gt;
</span><del>-&lt;p&gt;Stepping after breaking on uncaught exceptions should not crash&lt;/p&gt;
</del><ins>+&lt;p&gt;Stepping after breaking on uncaught exceptions should not crash.&lt;/p&gt;
</ins><span class="cx"> &lt;/body&gt;
</span><span class="cx"> &lt;/html&gt;
</span></span></pre></div>
<a id="trunkLayoutTestsinspectordebuggerresourceslogpauselocationjs"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/inspector/debugger/resources/log-pause-location.js (0 => 206652)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/debugger/resources/log-pause-location.js                                (rev 0)
+++ trunk/LayoutTests/inspector/debugger/resources/log-pause-location.js        2016-09-30 19:22:37 UTC (rev 206652)
</span><span class="lines">@@ -0,0 +1,135 @@
</span><ins>+TestPage.registerInitializer(() =&gt; {
+    let lines = [];
+
+    // Switch back to String.prototype.padStart once this is fixed:
+    // FIXME: &lt;https://webkit.org/b/161944&gt; stringProtoFuncRepeatCharacter will return `null` when it should not
+    String.prototype.myPadStart = function(desired) {
+        let length = this.length;
+        if (length &gt;= desired)
+            return this;
+        return &quot; &quot;.repeat(desired - length) + this;
+    };
+
+    function insertCaretIntoStringAtIndex(str, index) {
+        return str.slice(0, index) + &quot;|&quot; + str.slice(index);
+    }
+
+    function logLinesWithContext(location, context) {
+        if (!WebInspector.frameResourceManager.mainFrame.mainResource.scripts.includes(location.sourceCode)) {
+            InspectorTest.log(&quot;--- Source Unavailable ---&quot;);
+            return;
+        }
+
+        let startLine = location.lineNumber - context;
+        let endLine = location.lineNumber + context;
+        for (let lineNumber = startLine; lineNumber &lt;= endLine; ++lineNumber) {
+            let lineContent = lines[lineNumber];
+            if (typeof lineContent !== &quot;string&quot;)
+                continue;
+
+            let active = lineNumber === location.lineNumber;
+            let prefix = active ? &quot; -&gt; &quot; : &quot;    &quot;;
+            let number = lineNumber.toString().myPadStart(3);
+            lineContent = active ? insertCaretIntoStringAtIndex(lineContent, location.columnNumber) : lineContent;
+            InspectorTest.log(`${prefix}${number}    ${lineContent}`);
+        }
+    }
+
+    window.logPauseLocation = function() {
+        let callFrame = WebInspector.debuggerManager.activeCallFrame;
+        let name = callFrame.functionName || &quot;&lt;anonymous&gt;&quot;;
+        let location = callFrame.sourceCodeLocation;
+        let line = location.lineNumber + 1;
+        let column = location.columnNumber + 1;
+        InspectorTest.log(`PAUSE AT ${name}:${line}:${column}`);
+        logLinesWithContext(location, 3);
+        InspectorTest.log(&quot;&quot;);
+    }
+
+    let suite;
+    let currentSteps = [];
+
+    window.step = function(type) {
+        switch (type) {
+        case &quot;in&quot;:
+            InspectorTest.log(&quot;ACTION: step-in&quot;);
+            WebInspector.debuggerManager.stepInto();
+            break;
+        case &quot;over&quot;:
+            InspectorTest.log(&quot;ACTION: step-over&quot;);
+            WebInspector.debuggerManager.stepOver();
+            break;
+        case &quot;out&quot;:
+            InspectorTest.log(&quot;ACTION: step-out&quot;);
+            WebInspector.debuggerManager.stepOut();
+            break;
+        case &quot;resume&quot;:
+            InspectorTest.log(&quot;ACTION: resume&quot;);
+            WebInspector.debuggerManager.resume();
+            break;
+        default:
+            InspectorTest.fail(&quot;Unhandled step.&quot;);
+            WebInspector.debuggerManager.resume();
+            break;
+        }
+    }
+
+    window.initializeSteppingTestSuite = function(testSuite) {
+        suite = testSuite;
+        WebInspector.debuggerManager.addEventListener(WebInspector.DebuggerManager.Event.CallFramesDidChange, (event) =&gt; {
+            if (!WebInspector.debuggerManager.activeCallFrame)
+                return;
+            logPauseLocation();
+            step(currentSteps.shift());
+        });
+    }
+
+    window.addSteppingTestCase = function({name, description, expression, steps, pauseOnAllException}) {
+        suite.addTestCase({
+            name, description,
+            test(resolve, reject) {
+                // Setup.
+                currentSteps = steps;
+                InspectorTest.assert(steps[steps.length - 1] === &quot;resume&quot;, &quot;The test should always resume at the end to avoid timeouts.&quot;);
+                WebInspector.debuggerManager.allExceptionsBreakpoint.disabled = pauseOnAllException ? false : true;
+
+                // Trigger entry and step through it.
+                InspectorTest.evaluateInPage(expression);
+                InspectorTest.log(`EXPRESSION: ${expression}`);
+                InspectorTest.log(`STEPS: ${steps.join(&quot;, &quot;)}`);
+                WebInspector.debuggerManager.singleFireEventListener(WebInspector.DebuggerManager.Event.Paused, (event) =&gt; {
+                    InspectorTest.log(`PAUSED (${WebInspector.debuggerManager.pauseReason})`);
+                });
+                WebInspector.debuggerManager.singleFireEventListener(WebInspector.DebuggerManager.Event.Resumed, (event) =&gt; {
+                    InspectorTest.log(&quot;RESUMED&quot;);
+                    InspectorTest.expectThat(steps.length === 0, &quot;Should have used all steps.&quot;);
+                    resolve();
+                });
+            }
+        });
+    }
+
+    window.loadMainPageContent = function() {
+        return WebInspector.frameResourceManager.mainFrame.mainResource.requestContent()
+            .then((content) =&gt; {
+                lines = WebInspector.frameResourceManager.mainFrame.mainResource.content.split(/\n/);
+            })
+            .catch(() =&gt; {
+                InspectorTest.fail(&quot;Failed to load page content.&quot;);
+                InspectorTest.completeTest();
+            });
+    }
+});
+
+if (!window.testRunner) {
+    window.addEventListener(&quot;load&quot;, () =&gt; {
+        for (let property in window) {
+            if (property.startsWith(&quot;entry&quot;)) {
+                let button = document.body.appendChild(document.createElement(&quot;button&quot;));
+                button.textContent = property;
+                button.onclick = () =&gt; { setTimeout(window[property]); };
+                document.body.appendChild(document.createElement(&quot;br&quot;));
+            }
+        }
+    });
+}
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectordebuggersteppingstepIntoexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/inspector/debugger/stepping/stepInto-expected.txt (0 => 206652)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/debugger/stepping/stepInto-expected.txt                                (rev 0)
+++ trunk/LayoutTests/inspector/debugger/stepping/stepInto-expected.txt        2016-09-30 19:22:37 UTC (rev 206652)
</span><span class="lines">@@ -0,0 +1,216 @@
</span><ins>+ALERT: log 1
+Checking pause locations when stepping with &quot;stepInto&quot;.
+
+
+== Running test suite: Debugger.stepInto
+-- Running test case: Debugger.stepInto.statements
+PAUSED (debugger-statement)
+PAUSE AT entry1:12:5
+      8    }
+      9    
+     10    function entry1() {
+ -&gt;  11        |debugger;
+     12        let x = 1;
+     13        let y = 2;
+     14    }
+
+PAUSE AT entry1:13:5
+      9    
+     10    function entry1() {
+     11        debugger;
+ -&gt;  12        |let x = 1;
+     13        let y = 2;
+     14    }
+     15    
+
+PAUSE AT entry1:14:5
+     10    function entry1() {
+     11        debugger;
+     12        let x = 1;
+ -&gt;  13        |let y = 2;
+     14    }
+     15    
+     16    function entry2() {
+
+PAUSE AT entry1:15:2
+     11        debugger;
+     12        let x = 1;
+     13        let y = 2;
+ -&gt;  14    }|
+     15    
+     16    function entry2() {
+     17        debugger;
+
+RESUMED
+
+-- Running test case: Debugger.stepInto.function
+PAUSED (debugger-statement)
+PAUSE AT entry2:18:5
+     14    }
+     15    
+     16    function entry2() {
+ -&gt;  17        |debugger;
+     18        let before = 1;
+     19        testAlert(&quot;log 1&quot;);
+     20        let after = 2;
+
+PAUSE AT entry2:19:5
+     15    
+     16    function entry2() {
+     17        debugger;
+ -&gt;  18        |let before = 1;
+     19        testAlert(&quot;log 1&quot;);
+     20        let after = 2;
+     21    }
+
+PAUSE AT entry2:20:5
+     16    function entry2() {
+     17        debugger;
+     18        let before = 1;
+ -&gt;  19        |testAlert(&quot;log 1&quot;);
+     20        let after = 2;
+     21    }
+     22    
+
+PAUSE AT testAlert:8:5
+      4    &lt;script src=&quot;../resources/log-pause-location.js&quot;&gt;&lt;/script&gt;
+      5    &lt;script&gt;
+      6    function testAlert(str) {
+ -&gt;   7        |alert(str);
+      8    }
+      9    
+     10    function entry1() {
+
+PAUSE AT testAlert:9:2
+      5    &lt;script&gt;
+      6    function testAlert(str) {
+      7        alert(str);
+ -&gt;   8    }|
+      9    
+     10    function entry1() {
+     11        debugger;
+
+PAUSE AT entry2:21:5
+     17        debugger;
+     18        let before = 1;
+     19        testAlert(&quot;log 1&quot;);
+ -&gt;  20        |let after = 2;
+     21    }
+     22    
+     23    function entry3() {
+
+PAUSE AT entry2:22:2
+     18        let before = 1;
+     19        testAlert(&quot;log 1&quot;);
+     20        let after = 2;
+ -&gt;  21    }|
+     22    
+     23    function entry3() {
+     24        debugger;
+
+RESUMED
+
+-- Running test case: Debugger.stepInto.eval
+PAUSED (debugger-statement)
+PAUSE AT entry3:25:5
+     21    }
+     22    
+     23    function entry3() {
+ -&gt;  24        |debugger;
+     25        let before = 1;
+     26        eval(&quot;1 + 1&quot;);
+     27        let after = 2;
+
+PAUSE AT entry3:26:5
+     22    
+     23    function entry3() {
+     24        debugger;
+ -&gt;  25        |let before = 1;
+     26        eval(&quot;1 + 1&quot;);
+     27        let after = 2;
+     28    }
+
+PAUSE AT entry3:27:5
+     23    function entry3() {
+     24        debugger;
+     25        let before = 1;
+ -&gt;  26        |eval(&quot;1 + 1&quot;);
+     27        let after = 2;
+     28    }
+     29    
+
+PAUSE AT Eval Code:1:1
+--- Source Unavailable ---
+
+PAUSE AT Eval Code:1:6
+--- Source Unavailable ---
+
+PAUSE AT entry3:28:5
+     24        debugger;
+     25        let before = 1;
+     26        eval(&quot;1 + 1&quot;);
+ -&gt;  27        |let after = 2;
+     28    }
+     29    
+     30    function entry4() {
+
+PAUSE AT entry3:29:2
+     25        let before = 1;
+     26        eval(&quot;1 + 1&quot;);
+     27        let after = 2;
+ -&gt;  28    }|
+     29    
+     30    function entry4() {
+     31        (function() {
+
+RESUMED
+
+-- Running test case: Debugger.stepInto.innerFunction
+PAUSED (debugger-statement)
+PAUSE AT &lt;anonymous&gt;:33:9
+     29    
+     30    function entry4() {
+     31        (function() {
+ -&gt;  32            |debugger;
+     33            let inner = 1;
+     34        })();
+     35        let outer = 2;
+
+PAUSE AT &lt;anonymous&gt;:34:9
+     30    function entry4() {
+     31        (function() {
+     32            debugger;
+ -&gt;  33            |let inner = 1;
+     34        })();
+     35        let outer = 2;
+     36    }
+
+PAUSE AT &lt;anonymous&gt;:35:6
+     31        (function() {
+     32            debugger;
+     33            let inner = 1;
+ -&gt;  34        }|)();
+     35        let outer = 2;
+     36    }
+     37    
+
+PAUSE AT entry4:36:5
+     32            debugger;
+     33            let inner = 1;
+     34        })();
+ -&gt;  35        |let outer = 2;
+     36    }
+     37    
+     38    // ---------
+
+PAUSE AT entry4:37:2
+     33            let inner = 1;
+     34        })();
+     35        let outer = 2;
+ -&gt;  36    }|
+     37    
+     38    // ---------
+     39    
+
+RESUMED
+
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectordebuggersteppingstepIntohtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/inspector/debugger/stepping/stepInto.html (0 => 206652)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/debugger/stepping/stepInto.html                                (rev 0)
+++ trunk/LayoutTests/inspector/debugger/stepping/stepInto.html        2016-09-30 19:22:37 UTC (rev 206652)
</span><span class="lines">@@ -0,0 +1,102 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../../../http/tests/inspector/resources/inspector-test.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../resources/log-pause-location.js&quot;&gt;&lt;/script&gt;
+&lt;script&gt;
+function testAlert(str) {
+    alert(str);
+}
+
+function entry1() {
+    debugger;
+    let x = 1;
+    let y = 2;
+}
+
+function entry2() {
+    debugger;
+    let before = 1;
+    testAlert(&quot;log 1&quot;);
+    let after = 2;
+}
+
+function entry3() {
+    debugger;
+    let before = 1;
+    eval(&quot;1 + 1&quot;);
+    let after = 2;
+}
+
+function entry4() {
+    (function() {
+        debugger;
+        let inner = 1;
+    })();
+    let outer = 2;
+}
+
+// ---------
+
+function test()
+{
+    let suite = InspectorTest.createAsyncSuite(&quot;Debugger.stepInto&quot;);
+
+    // Always step-in when call frames change.
+    WebInspector.debuggerManager.addEventListener(WebInspector.DebuggerManager.Event.CallFramesDidChange, (event) =&gt; {
+        if (!WebInspector.debuggerManager.activeCallFrame)
+            return;
+        logPauseLocation();
+        WebInspector.debuggerManager.stepInto();
+    });
+
+    function addTestCase({name, description, expression}) {
+        suite.addTestCase({
+            name, description,
+            test(resolve, reject) {
+                InspectorTest.evaluateInPage(expression);
+                WebInspector.debuggerManager.singleFireEventListener(WebInspector.DebuggerManager.Event.Paused, (event) =&gt; {
+                    InspectorTest.log(`PAUSED (${WebInspector.debuggerManager.pauseReason})`);
+                });
+                WebInspector.debuggerManager.singleFireEventListener(WebInspector.DebuggerManager.Event.Resumed, (event) =&gt; {
+                    InspectorTest.log(&quot;RESUMED&quot;);
+                    resolve();
+                });
+            }
+        });
+    }
+
+    addTestCase({
+        name: &quot;Debugger.stepInto.statements&quot;,
+        description: &quot;step-into should step over statements.&quot;,
+        expression: &quot;setTimeout(entry1)&quot;,
+    });
+
+    addTestCase({
+        name: &quot;Debugger.stepInto.function&quot;,
+        description: &quot;step-into should step into function calls.&quot;,
+        expression: &quot;setTimeout(entry2)&quot;,
+    });
+
+    addTestCase({
+        name: &quot;Debugger.stepInto.eval&quot;,
+        description: &quot;step-into should step into an eval program.&quot;,
+        expression: &quot;setTimeout(entry3)&quot;,
+    });
+
+    addTestCase({
+        name: &quot;Debugger.stepInto.innerFunction&quot;,
+        description: &quot;step-into should step out of a function to its caller.&quot;,
+        expression: &quot;setTimeout(entry4)&quot;,
+    });
+
+    loadMainPageContent().then(() =&gt; {
+        suite.runTestCasesAndFinish();
+    });
+}
+&lt;/script&gt;
+&lt;/head&gt;
+&lt;body onload=&quot;runTest()&quot;&gt;
+&lt;p&gt;Checking pause locations when stepping with &quot;stepInto&quot;.&lt;/p&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectordebuggersteppingstepOutexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/inspector/debugger/stepping/stepOut-expected.txt (0 => 206652)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/debugger/stepping/stepOut-expected.txt                                (rev 0)
+++ trunk/LayoutTests/inspector/debugger/stepping/stepOut-expected.txt        2016-09-30 19:22:37 UTC (rev 206652)
</span><span class="lines">@@ -0,0 +1,77 @@
</span><ins>+Checking pause locations when stepping with &quot;stepOut&quot;.
+
+
+== Running test suite: Debugger.stepOut
+-- Running test case: Debugger.stepOut.function
+PAUSED (debugger-statement)
+PAUSE AT entry1:8:5
+      4    &lt;script src=&quot;../resources/log-pause-location.js&quot;&gt;&lt;/script&gt;
+      5    &lt;script&gt;
+      6    function entry1() {
+ -&gt;   7        |debugger;
+      8        let x = 1;
+      9        let y = 2;
+     10    }
+
+RESUMED
+
+-- Running test case: Debugger.stepOut.eval
+PAUSED (debugger-statement)
+PAUSE AT Eval Code:1:1
+--- Source Unavailable ---
+
+RESUMED
+
+-- Running test case: Debugger.stepOut.innerFunction
+PAUSED (debugger-statement)
+PAUSE AT beta:24:9
+     20            beta();
+     21        }
+     22        function beta() {
+ -&gt;  23            |debugger;
+     24        }
+     25        alpha();
+     26    }
+
+PAUSE AT alpha:22:6
+     18    function entry3() {
+     19        function alpha() {
+     20            beta();
+ -&gt;  21        }|
+     22        function beta() {
+     23            debugger;
+     24        }
+
+PAUSE AT entry3:27:2
+     23            debugger;
+     24        }
+     25        alpha();
+ -&gt;  26    }|
+     27    
+     28    function entry4() {
+     29        (function() {
+
+RESUMED
+
+-- Running test case: Debugger.stepOut.anonymousFunction
+PAUSED (debugger-statement)
+PAUSE AT &lt;anonymous&gt;:31:9
+     27    
+     28    function entry4() {
+     29        (function() {
+ -&gt;  30            |debugger;
+     31            let inner = 1;
+     32        })();
+     33        let outer = 2;
+
+PAUSE AT entry4:34:5
+     30            debugger;
+     31            let inner = 1;
+     32        })();
+ -&gt;  33        |let outer = 2;
+     34    }
+     35    
+     36    // ---------
+
+RESUMED
+
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectordebuggersteppingstepOuthtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/inspector/debugger/stepping/stepOut.html (0 => 206652)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/debugger/stepping/stepOut.html                                (rev 0)
+++ trunk/LayoutTests/inspector/debugger/stepping/stepOut.html        2016-09-30 19:22:37 UTC (rev 206652)
</span><span class="lines">@@ -0,0 +1,100 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../../../http/tests/inspector/resources/inspector-test.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../resources/log-pause-location.js&quot;&gt;&lt;/script&gt;
+&lt;script&gt;
+function entry1() {
+    debugger;
+    let x = 1;
+    let y = 2;
+}
+
+function entry2() {
+    let before = 1;
+    eval(&quot;debugger&quot;);
+    let after = 2;
+}
+
+function entry3() {
+    function alpha() {
+        beta();
+    }
+    function beta() {
+        debugger;
+    }
+    alpha();
+}
+
+function entry4() {
+    (function() {
+        debugger;
+        let inner = 1;
+    })();
+    let outer = 2;
+}
+
+// ---------
+
+function test()
+{
+    let suite = InspectorTest.createAsyncSuite(&quot;Debugger.stepOut&quot;);
+
+    // Always step-out when call frames change.
+    WebInspector.debuggerManager.addEventListener(WebInspector.DebuggerManager.Event.CallFramesDidChange, (event) =&gt; {
+        if (!WebInspector.debuggerManager.activeCallFrame)
+            return;
+        logPauseLocation();
+        WebInspector.debuggerManager.stepOut();
+    });
+
+    function addTestCase({name, description, expression}) {
+        suite.addTestCase({
+            name, description,
+            test(resolve, reject) {
+                InspectorTest.evaluateInPage(expression);
+                WebInspector.debuggerManager.singleFireEventListener(WebInspector.DebuggerManager.Event.Paused, (event) =&gt; {
+                    InspectorTest.log(`PAUSED (${WebInspector.debuggerManager.pauseReason})`);
+                });
+                WebInspector.debuggerManager.singleFireEventListener(WebInspector.DebuggerManager.Event.Resumed, (event) =&gt; {
+                    InspectorTest.log(&quot;RESUMED&quot;);
+                    resolve();
+                });
+            }
+        });
+    }
+
+    addTestCase({
+        name: &quot;Debugger.stepOut.function&quot;,
+        description: &quot;step-out should leave a function.&quot;,
+        expression: &quot;setTimeout(entry1)&quot;,
+    });
+
+    addTestCase({
+        name: &quot;Debugger.stepOut.eval&quot;,
+        description: &quot;step-out should step leave an eval program.&quot;,
+        expression: &quot;setTimeout(entry2)&quot;,
+    });
+
+    addTestCase({
+        name: &quot;Debugger.stepOut.innerFunction&quot;,
+        description: &quot;step-out should leave a function and end up after its callsite.&quot;,
+        expression: &quot;setTimeout(entry3)&quot;,
+    });
+
+    addTestCase({
+        name: &quot;Debugger.stepOut.anonymousFunction&quot;,
+        description: &quot;step-out should leave an anonymous function and end up after its callsite.&quot;,
+        expression: &quot;setTimeout(entry4)&quot;,
+    });
+
+    loadMainPageContent().then(() =&gt; {
+        suite.runTestCasesAndFinish();
+    });
+}
+&lt;/script&gt;
+&lt;/head&gt;
+&lt;body onload=&quot;runTest()&quot;&gt;
+&lt;p&gt;Checking pause locations when stepping with &quot;stepOut&quot;.&lt;/p&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectordebuggersteppingstepOverexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/inspector/debugger/stepping/stepOver-expected.txt (0 => 206652)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/debugger/stepping/stepOver-expected.txt                                (rev 0)
+++ trunk/LayoutTests/inspector/debugger/stepping/stepOver-expected.txt        2016-09-30 19:22:37 UTC (rev 206652)
</span><span class="lines">@@ -0,0 +1,192 @@
</span><ins>+ALERT: log 1
+Checking pause locations when stepping with &quot;stepOver&quot;.
+
+
+== Running test suite: Debugger.stepOver
+-- Running test case: Debugger.stepOver.statements
+PAUSED (debugger-statement)
+PAUSE AT entry1:12:5
+      8    }
+      9    
+     10    function entry1() {
+ -&gt;  11        |debugger;
+     12        let x = 1;
+     13        let y = 2;
+     14    }
+
+PAUSE AT entry1:13:5
+      9    
+     10    function entry1() {
+     11        debugger;
+ -&gt;  12        |let x = 1;
+     13        let y = 2;
+     14    }
+     15    
+
+PAUSE AT entry1:14:5
+     10    function entry1() {
+     11        debugger;
+     12        let x = 1;
+ -&gt;  13        |let y = 2;
+     14    }
+     15    
+     16    function entry2() {
+
+PAUSE AT entry1:15:2
+     11        debugger;
+     12        let x = 1;
+     13        let y = 2;
+ -&gt;  14    }|
+     15    
+     16    function entry2() {
+     17        debugger;
+
+RESUMED
+
+-- Running test case: Debugger.stepOver.function
+PAUSED (debugger-statement)
+PAUSE AT entry2:18:5
+     14    }
+     15    
+     16    function entry2() {
+ -&gt;  17        |debugger;
+     18        let before = 1;
+     19        testAlert(&quot;log 1&quot;);
+     20        let after = 2;
+
+PAUSE AT entry2:19:5
+     15    
+     16    function entry2() {
+     17        debugger;
+ -&gt;  18        |let before = 1;
+     19        testAlert(&quot;log 1&quot;);
+     20        let after = 2;
+     21    }
+
+PAUSE AT entry2:20:5
+     16    function entry2() {
+     17        debugger;
+     18        let before = 1;
+ -&gt;  19        |testAlert(&quot;log 1&quot;);
+     20        let after = 2;
+     21    }
+     22    
+
+PAUSE AT entry2:21:5
+     17        debugger;
+     18        let before = 1;
+     19        testAlert(&quot;log 1&quot;);
+ -&gt;  20        |let after = 2;
+     21    }
+     22    
+     23    function entry3() {
+
+PAUSE AT entry2:22:2
+     18        let before = 1;
+     19        testAlert(&quot;log 1&quot;);
+     20        let after = 2;
+ -&gt;  21    }|
+     22    
+     23    function entry3() {
+     24        debugger;
+
+RESUMED
+
+-- Running test case: Debugger.stepOver.eval
+PAUSED (debugger-statement)
+PAUSE AT entry3:25:5
+     21    }
+     22    
+     23    function entry3() {
+ -&gt;  24        |debugger;
+     25        let before = 1;
+     26        eval(&quot;1 + 1&quot;);
+     27        let after = 2;
+
+PAUSE AT entry3:26:5
+     22    
+     23    function entry3() {
+     24        debugger;
+ -&gt;  25        |let before = 1;
+     26        eval(&quot;1 + 1&quot;);
+     27        let after = 2;
+     28    }
+
+PAUSE AT entry3:27:5
+     23    function entry3() {
+     24        debugger;
+     25        let before = 1;
+ -&gt;  26        |eval(&quot;1 + 1&quot;);
+     27        let after = 2;
+     28    }
+     29    
+
+PAUSE AT entry3:28:5
+     24        debugger;
+     25        let before = 1;
+     26        eval(&quot;1 + 1&quot;);
+ -&gt;  27        |let after = 2;
+     28    }
+     29    
+     30    function entry4() {
+
+PAUSE AT entry3:29:2
+     25        let before = 1;
+     26        eval(&quot;1 + 1&quot;);
+     27        let after = 2;
+ -&gt;  28    }|
+     29    
+     30    function entry4() {
+     31        (function() {
+
+RESUMED
+
+-- Running test case: Debugger.stepOver.innerFunction
+PAUSED (debugger-statement)
+PAUSE AT &lt;anonymous&gt;:33:9
+     29    
+     30    function entry4() {
+     31        (function() {
+ -&gt;  32            |debugger;
+     33            let inner = 1;
+     34        })();
+     35        let outer = 2;
+
+PAUSE AT &lt;anonymous&gt;:34:9
+     30    function entry4() {
+     31        (function() {
+     32            debugger;
+ -&gt;  33            |let inner = 1;
+     34        })();
+     35        let outer = 2;
+     36    }
+
+PAUSE AT &lt;anonymous&gt;:35:6
+     31        (function() {
+     32            debugger;
+     33            let inner = 1;
+ -&gt;  34        }|)();
+     35        let outer = 2;
+     36    }
+     37    
+
+PAUSE AT entry4:36:5
+     32            debugger;
+     33            let inner = 1;
+     34        })();
+ -&gt;  35        |let outer = 2;
+     36    }
+     37    
+     38    // ---------
+
+PAUSE AT entry4:37:2
+     33            let inner = 1;
+     34        })();
+     35        let outer = 2;
+ -&gt;  36    }|
+     37    
+     38    // ---------
+     39    
+
+RESUMED
+
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectordebuggersteppingstepOverhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/inspector/debugger/stepping/stepOver.html (0 => 206652)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/debugger/stepping/stepOver.html                                (rev 0)
+++ trunk/LayoutTests/inspector/debugger/stepping/stepOver.html        2016-09-30 19:22:37 UTC (rev 206652)
</span><span class="lines">@@ -0,0 +1,102 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../../../http/tests/inspector/resources/inspector-test.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../resources/log-pause-location.js&quot;&gt;&lt;/script&gt;
+&lt;script&gt;
+function testAlert(str) {
+    alert(str);
+}
+
+function entry1() {
+    debugger;
+    let x = 1;
+    let y = 2;
+}
+
+function entry2() {
+    debugger;
+    let before = 1;
+    testAlert(&quot;log 1&quot;);
+    let after = 2;
+}
+
+function entry3() {
+    debugger;
+    let before = 1;
+    eval(&quot;1 + 1&quot;);
+    let after = 2;
+}
+
+function entry4() {
+    (function() {
+        debugger;
+        let inner = 1;
+    })();
+    let outer = 2;
+}
+
+// ---------
+
+function test()
+{
+    let suite = InspectorTest.createAsyncSuite(&quot;Debugger.stepOver&quot;);
+
+    // Always step-over when call frames change.
+    WebInspector.debuggerManager.addEventListener(WebInspector.DebuggerManager.Event.CallFramesDidChange, (event) =&gt; {
+        if (!WebInspector.debuggerManager.activeCallFrame)
+            return;
+        logPauseLocation();
+        WebInspector.debuggerManager.stepOver();
+    });
+
+    function addTestCase({name, description, expression}) {
+        suite.addTestCase({
+            name, description,
+            test(resolve, reject) {
+                InspectorTest.evaluateInPage(expression);
+                WebInspector.debuggerManager.singleFireEventListener(WebInspector.DebuggerManager.Event.Paused, (event) =&gt; {
+                    InspectorTest.log(`PAUSED (${WebInspector.debuggerManager.pauseReason})`);
+                });
+                WebInspector.debuggerManager.singleFireEventListener(WebInspector.DebuggerManager.Event.Resumed, (event) =&gt; {
+                    InspectorTest.log(&quot;RESUMED&quot;);
+                    resolve();
+                });
+            }
+        });
+    }
+
+    addTestCase({
+        name: &quot;Debugger.stepOver.statements&quot;,
+        description: &quot;step-over should step over statements.&quot;,
+        expression: &quot;setTimeout(entry1)&quot;,
+    });
+
+    addTestCase({
+        name: &quot;Debugger.stepOver.function&quot;,
+        description: &quot;step-over should step over function calls.&quot;,
+        expression: &quot;setTimeout(entry2)&quot;,
+    });
+
+    addTestCase({
+        name: &quot;Debugger.stepOver.eval&quot;,
+        description: &quot;step-over should step over an eval program.&quot;,
+        expression: &quot;setTimeout(entry3)&quot;,
+    });
+
+    addTestCase({
+        name: &quot;Debugger.stepOver.innerFunction&quot;,
+        description: &quot;step-over should step out of a function to its caller.&quot;,
+        expression: &quot;setTimeout(entry4)&quot;,
+    });
+
+    loadMainPageContent().then(() =&gt; {
+        suite.runTestCasesAndFinish();
+    });
+}
+&lt;/script&gt;
+&lt;/head&gt;
+&lt;body onload=&quot;runTest()&quot;&gt;
+&lt;p&gt;Checking pause locations when stepping with &quot;stepOver&quot;.&lt;/p&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectordebuggersteppingsteppingarrowfunctionsexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/inspector/debugger/stepping/stepping-arrow-functions-expected.txt (0 => 206652)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/debugger/stepping/stepping-arrow-functions-expected.txt                                (rev 0)
+++ trunk/LayoutTests/inspector/debugger/stepping/stepping-arrow-functions-expected.txt        2016-09-30 19:22:37 UTC (rev 206652)
</span><span class="lines">@@ -0,0 +1,208 @@
</span><ins>+Checking pause locations when stepping in, out, and over arrow functions.
+
+
+== Running test suite: Debugger.stepping.arrow-functions
+-- Running test case: Debugger.stepping.ArrowFunctionNoParenthesis
+EXPRESSION: setTimeout(entryArrowFunctionNoParenthesis)
+STEPS: over, in, out, in, out, in, in, in, resume
+PAUSED (debugger-statement)
+PAUSE AT entryArrowFunctionNoParenthesis:13:5
+      9        let square = x =&gt; {
+     10            return x * x;
+     11        };
+ -&gt;  12        |debugger;
+     13        identity(2);
+     14        addOne(1);
+     15        square(2);
+
+ACTION: step-over
+PAUSE AT entryArrowFunctionNoParenthesis:14:5
+     10            return x * x;
+     11        };
+     12        debugger;
+ -&gt;  13        |identity(2);
+     14        addOne(1);
+     15        square(2);
+     16    }
+
+ACTION: step-in
+PAUSE AT identity:8:25
+      4    &lt;script src=&quot;../resources/log-pause-location.js&quot;&gt;&lt;/script&gt;
+      5    &lt;script&gt;
+      6    function entryArrowFunctionNoParenthesis() {
+ -&gt;   7        let identity = x =&gt; |x;
+      8        let addOne = x =&gt; x + 1;
+      9        let square = x =&gt; {
+     10            return x * x;
+
+ACTION: step-out
+PAUSE AT entryArrowFunctionNoParenthesis:15:5
+     11        };
+     12        debugger;
+     13        identity(2);
+ -&gt;  14        |addOne(1);
+     15        square(2);
+     16    }
+     17    
+
+ACTION: step-in
+PAUSE AT addOne:9:23
+      5    &lt;script&gt;
+      6    function entryArrowFunctionNoParenthesis() {
+      7        let identity = x =&gt; x;
+ -&gt;   8        let addOne = x =&gt; |x + 1;
+      9        let square = x =&gt; {
+     10            return x * x;
+     11        };
+
+ACTION: step-out
+PAUSE AT entryArrowFunctionNoParenthesis:16:5
+     12        debugger;
+     13        identity(2);
+     14        addOne(1);
+ -&gt;  15        |square(2);
+     16    }
+     17    
+     18    function entryArrowFunctionParenthesis() {
+
+ACTION: step-in
+PAUSE AT square:11:9
+      7        let identity = x =&gt; x;
+      8        let addOne = x =&gt; x + 1;
+      9        let square = x =&gt; {
+ -&gt;  10            |return x * x;
+     11        };
+     12        debugger;
+     13        identity(2);
+
+ACTION: step-in
+PAUSE AT square:12:6
+      8        let addOne = x =&gt; x + 1;
+      9        let square = x =&gt; {
+     10            return x * x;
+ -&gt;  11        }|;
+     12        debugger;
+     13        identity(2);
+     14        addOne(1);
+
+ACTION: step-in
+PAUSE AT entryArrowFunctionNoParenthesis:17:2
+     13        identity(2);
+     14        addOne(1);
+     15        square(2);
+ -&gt;  16    }|
+     17    
+     18    function entryArrowFunctionParenthesis() {
+     19        let nothing = () =&gt; {};
+
+ACTION: resume
+RESUMED
+PASS: Should have used all steps.
+
+-- Running test case: Debugger.stepping.ArrowFunctionParenthesis
+EXPRESSION: setTimeout(entryArrowFunctionParenthesis)
+STEPS: over, in, out, in, out, in, out, in, out, resume
+PAUSED (debugger-statement)
+PAUSE AT entryArrowFunctionParenthesis:26:5
+     22        let square = x =&gt; {
+     23            return x * x;
+     24        };
+ -&gt;  25        |debugger;
+     26        nothing();
+     27        identity(2);
+     28        add(1);
+
+ACTION: step-over
+PAUSE AT entryArrowFunctionParenthesis:27:5
+     23            return x * x;
+     24        };
+     25        debugger;
+ -&gt;  26        |nothing();
+     27        identity(2);
+     28        add(1);
+     29        square(2);
+
+ACTION: step-in
+PAUSE AT nothing:20:27
+     16    }
+     17    
+     18    function entryArrowFunctionParenthesis() {
+ -&gt;  19        let nothing = () =&gt; {}|;
+     20        let identity = (x) =&gt; x;
+     21        let add = (a, b) =&gt; a + b;
+     22        let square = x =&gt; {
+
+ACTION: step-out
+PAUSE AT entryArrowFunctionParenthesis:28:5
+     24        };
+     25        debugger;
+     26        nothing();
+ -&gt;  27        |identity(2);
+     28        add(1);
+     29        square(2);
+     30    }
+
+ACTION: step-in
+PAUSE AT identity:21:27
+     17    
+     18    function entryArrowFunctionParenthesis() {
+     19        let nothing = () =&gt; {};
+ -&gt;  20        let identity = (x) =&gt; |x;
+     21        let add = (a, b) =&gt; a + b;
+     22        let square = x =&gt; {
+     23            return x * x;
+
+ACTION: step-out
+PAUSE AT entryArrowFunctionParenthesis:29:5
+     25        debugger;
+     26        nothing();
+     27        identity(2);
+ -&gt;  28        |add(1);
+     29        square(2);
+     30    }
+     31    
+
+ACTION: step-in
+PAUSE AT add:22:25
+     18    function entryArrowFunctionParenthesis() {
+     19        let nothing = () =&gt; {};
+     20        let identity = (x) =&gt; x;
+ -&gt;  21        let add = (a, b) =&gt; |a + b;
+     22        let square = x =&gt; {
+     23            return x * x;
+     24        };
+
+ACTION: step-out
+PAUSE AT entryArrowFunctionParenthesis:30:5
+     26        nothing();
+     27        identity(2);
+     28        add(1);
+ -&gt;  29        |square(2);
+     30    }
+     31    
+     32    // ---------
+
+ACTION: step-in
+PAUSE AT square:24:9
+     20        let identity = (x) =&gt; x;
+     21        let add = (a, b) =&gt; a + b;
+     22        let square = x =&gt; {
+ -&gt;  23            |return x * x;
+     24        };
+     25        debugger;
+     26        nothing();
+
+ACTION: step-out
+PAUSE AT entryArrowFunctionParenthesis:31:2
+     27        identity(2);
+     28        add(1);
+     29        square(2);
+ -&gt;  30    }|
+     31    
+     32    // ---------
+     33    
+
+ACTION: resume
+RESUMED
+PASS: Should have used all steps.
+
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectordebuggersteppingsteppingarrowfunctionshtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/inspector/debugger/stepping/stepping-arrow-functions.html (0 => 206652)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/debugger/stepping/stepping-arrow-functions.html                                (rev 0)
+++ trunk/LayoutTests/inspector/debugger/stepping/stepping-arrow-functions.html        2016-09-30 19:22:37 UTC (rev 206652)
</span><span class="lines">@@ -0,0 +1,85 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../../../http/tests/inspector/resources/inspector-test.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../resources/log-pause-location.js&quot;&gt;&lt;/script&gt;
+&lt;script&gt;
+function entryArrowFunctionNoParenthesis() {
+    let identity = x =&gt; x;
+    let addOne = x =&gt; x + 1;
+    let square = x =&gt; {
+        return x * x;
+    };
+    debugger;
+    identity(2);
+    addOne(1);
+    square(2);
+}
+
+function entryArrowFunctionParenthesis() {
+    let nothing = () =&gt; {};
+    let identity = (x) =&gt; x;
+    let add = (a, b) =&gt; a + b;
+    let square = x =&gt; {
+        return x * x;
+    };
+    debugger;
+    nothing();
+    identity(2);
+    add(1);
+    square(2);
+}
+
+// ---------
+
+function test()
+{
+    let suite = InspectorTest.createAsyncSuite(&quot;Debugger.stepping.arrow-functions&quot;);
+
+    window.initializeSteppingTestSuite(suite);
+
+    addSteppingTestCase({
+        name: &quot;Debugger.stepping.ArrowFunctionNoParenthesis&quot;,
+        description: &quot;Should be able to step through arrow functions.&quot;,
+        expression: &quot;setTimeout(entryArrowFunctionNoParenthesis)&quot;,
+        steps: [
+            &quot;over&quot;,
+                &quot;in&quot;,  // into identity
+                &quot;out&quot;, // out of identity
+                &quot;in&quot;,  // into addOne
+                &quot;out&quot;, // out of addOne
+                &quot;in&quot;,  // into square - before return
+                &quot;in&quot;,  // complete: return - leaving square
+                &quot;in&quot;, // out of square - leaving entry
+            &quot;resume&quot;,
+        ]
+    });
+
+    addSteppingTestCase({
+        name: &quot;Debugger.stepping.ArrowFunctionParenthesis&quot;,
+        description: &quot;Should be able to step through arrow functions.&quot;,
+        expression: &quot;setTimeout(entryArrowFunctionParenthesis)&quot;,
+        steps: [
+            &quot;over&quot;,
+                &quot;in&quot;,  // into nothing
+                &quot;out&quot;, // out of nothing
+                &quot;in&quot;,  // into identity
+                &quot;out&quot;, // out of identity
+                &quot;in&quot;,  // into add
+                &quot;out&quot;, // out of add
+                &quot;in&quot;,  // into square
+                &quot;out&quot;, // out of square - leaving entry
+            &quot;resume&quot;,
+        ]
+    });
+
+    loadMainPageContent().then(() =&gt; {
+        suite.runTestCasesAndFinish();
+    });
+}
+&lt;/script&gt;
+&lt;/head&gt;
+&lt;body onload=&quot;runTest()&quot;&gt;
+&lt;p&gt;Checking pause locations when stepping in, out, and over arrow functions.&lt;/p&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectordebuggersteppingsteppingclassesexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/inspector/debugger/stepping/stepping-classes-expected.txt (0 => 206652)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/debugger/stepping/stepping-classes-expected.txt                                (rev 0)
+++ trunk/LayoutTests/inspector/debugger/stepping/stepping-classes-expected.txt        2016-09-30 19:22:37 UTC (rev 206652)
</span><span class="lines">@@ -0,0 +1,350 @@
</span><ins>+Checking pause locations when stepping in, out, and over class constructors and methods.
+
+
+== Running test suite: Debugger.stepping.classes
+-- Running test case: Debugger.stepping.ClassBasicStepOver
+EXPRESSION: setTimeout(entryClassBasic)
+STEPS: over, over, over, over, over, resume
+PAUSED (debugger-statement)
+PAUSE AT entryClassBasic:58:5
+     54    class Child2 extends Base {};
+     55    
+     56    function entryClassBasic() {
+ -&gt;  57        |debugger;
+     58        let o = new Child;
+     59        o.baseMethod();
+     60        o.childMethod();
+
+ACTION: step-over
+PAUSE AT entryClassBasic:59:5
+     55    
+     56    function entryClassBasic() {
+     57        debugger;
+ -&gt;  58        |let o = new Child;
+     59        o.baseMethod();
+     60        o.childMethod();
+     61        o.method();
+
+ACTION: step-over
+PAUSE AT entryClassBasic:60:5
+     56    function entryClassBasic() {
+     57        debugger;
+     58        let o = new Child;
+ -&gt;  59        |o.baseMethod();
+     60        o.childMethod();
+     61        o.method();
+     62    }
+
+ACTION: step-over
+PAUSE AT entryClassBasic:61:5
+     57        debugger;
+     58        let o = new Child;
+     59        o.baseMethod();
+ -&gt;  60        |o.childMethod();
+     61        o.method();
+     62    }
+     63    
+
+ACTION: step-over
+PAUSE AT entryClassBasic:62:5
+     58        let o = new Child;
+     59        o.baseMethod();
+     60        o.childMethod();
+ -&gt;  61        |o.method();
+     62    }
+     63    
+     64    function entryClassDefaultConstructor() {
+
+ACTION: step-over
+PAUSE AT entryClassBasic:63:2
+     59        o.baseMethod();
+     60        o.childMethod();
+     61        o.method();
+ -&gt;  62    }|
+     63    
+     64    function entryClassDefaultConstructor() {
+     65        debugger;
+
+ACTION: resume
+RESUMED
+PASS: Should have used all steps.
+
+-- Running test case: Debugger.stepping.ClassBasicStepIn
+EXPRESSION: setTimeout(entryClassBasic)
+STEPS: over, in, in, out, over, over, in, out, in, out, in, in, out, out, resume
+PAUSED (debugger-statement)
+PAUSE AT entryClassBasic:58:5
+     54    class Child2 extends Base {};
+     55    
+     56    function entryClassBasic() {
+ -&gt;  57        |debugger;
+     58        let o = new Child;
+     59        o.baseMethod();
+     60        o.childMethod();
+
+ACTION: step-over
+PAUSE AT entryClassBasic:59:5
+     55    
+     56    function entryClassBasic() {
+     57        debugger;
+ -&gt;  58        |let o = new Child;
+     59        o.baseMethod();
+     60        o.childMethod();
+     61        o.method();
+
+ACTION: step-in
+PAUSE AT Child:35:9
+     31    class Child extends Base {
+     32        constructor()
+     33        {
+ -&gt;  34            |super();
+     35            this._child = true;
+     36        }
+     37    
+
+ACTION: step-in
+PAUSE AT Base:18:9
+     14    class Base {
+     15        constructor()
+     16        {
+ -&gt;  17            |this._base = true;
+     18        }
+     19    
+     20        baseMethod()
+
+ACTION: step-out
+PAUSE AT Child:36:9
+     32        constructor()
+     33        {
+     34            super();
+ -&gt;  35            |this._child = true;
+     36        }
+     37    
+     38        childMethod()
+
+ACTION: step-over
+PAUSE AT Child:37:6
+     33        {
+     34            super();
+     35            this._child = true;
+ -&gt;  36        }|
+     37    
+     38        childMethod()
+     39        {
+
+ACTION: step-over
+PAUSE AT entryClassBasic:60:5
+     56    function entryClassBasic() {
+     57        debugger;
+     58        let o = new Child;
+ -&gt;  59        |o.baseMethod();
+     60        o.childMethod();
+     61        o.method();
+     62    }
+
+ACTION: step-in
+PAUSE AT baseMethod:23:9
+     19    
+     20        baseMethod()
+     21        {
+ -&gt;  22            |a();
+     23        }
+     24    
+     25        method()
+
+ACTION: step-out
+PAUSE AT entryClassBasic:61:5
+     57        debugger;
+     58        let o = new Child;
+     59        o.baseMethod();
+ -&gt;  60        |o.childMethod();
+     61        o.method();
+     62    }
+     63    
+
+ACTION: step-in
+PAUSE AT childMethod:41:9
+     37    
+     38        childMethod()
+     39        {
+ -&gt;  40            |b();
+     41        }
+     42    
+     43        method()
+
+ACTION: step-out
+PAUSE AT entryClassBasic:62:5
+     58        let o = new Child;
+     59        o.baseMethod();
+     60        o.childMethod();
+ -&gt;  61        |o.method();
+     62    }
+     63    
+     64    function entryClassDefaultConstructor() {
+
+ACTION: step-in
+PAUSE AT method:46:9
+     42    
+     43        method()
+     44        {
+ -&gt;  45            |super.method();
+     46            b();
+     47        }
+     48    
+
+ACTION: step-in
+PAUSE AT method:28:9
+     24    
+     25        method()
+     26        {
+ -&gt;  27            |a();
+     28        }
+     29    }
+     30    
+
+ACTION: step-out
+PAUSE AT method:47:9
+     43        method()
+     44        {
+     45            super.method();
+ -&gt;  46            |b();
+     47        }
+     48    
+     49        get name() { return this._name; }
+
+ACTION: step-out
+PAUSE AT entryClassBasic:63:2
+     59        o.baseMethod();
+     60        o.childMethod();
+     61        o.method();
+ -&gt;  62    }|
+     63    
+     64    function entryClassDefaultConstructor() {
+     65        debugger;
+
+ACTION: resume
+RESUMED
+PASS: Should have used all steps.
+
+-- Running test case: Debugger.stepping.ClassDefaultConstructor
+EXPRESSION: setTimeout(entryClassDefaultConstructor)
+STEPS: over, in, in, out, out, resume
+PAUSED (debugger-statement)
+PAUSE AT entryClassDefaultConstructor:66:5
+     62    }
+     63    
+     64    function entryClassDefaultConstructor() {
+ -&gt;  65        |debugger;
+     66        let o = new Child2;
+     67    }
+     68    
+
+ACTION: step-over
+PAUSE AT entryClassDefaultConstructor:67:5
+     63    
+     64    function entryClassDefaultConstructor() {
+     65        debugger;
+ -&gt;  66        |let o = new Child2;
+     67    }
+     68    
+     69    function entryClassGetterSetter() {
+
+ACTION: step-in
+PAUSE AT Child2:1:16
+--- Source Unavailable ---
+
+ACTION: step-in
+PAUSE AT Base:18:9
+     14    class Base {
+     15        constructor()
+     16        {
+ -&gt;  17            |this._base = true;
+     18        }
+     19    
+     20        baseMethod()
+
+ACTION: step-out
+PAUSE AT Child2:1:38
+--- Source Unavailable ---
+
+ACTION: step-out
+PAUSE AT entryClassDefaultConstructor:68:2
+     64    function entryClassDefaultConstructor() {
+     65        debugger;
+     66        let o = new Child2;
+ -&gt;  67    }|
+     68    
+     69    function entryClassGetterSetter() {
+     70        let o = new Child;
+
+ACTION: resume
+RESUMED
+PASS: Should have used all steps.
+
+-- Running test case: Debugger.stepping.ClassGetterSetter
+EXPRESSION: setTimeout(entryClassGetterSetter)
+STEPS: over, in, out, in, out, resume
+PAUSED (debugger-statement)
+PAUSE AT entryClassGetterSetter:72:5
+     68    
+     69    function entryClassGetterSetter() {
+     70        let o = new Child;
+ -&gt;  71        |debugger;
+     72        var name = o.name;
+     73        o.name = &quot;Name&quot;;
+     74    }
+
+ACTION: step-over
+PAUSE AT entryClassGetterSetter:73:5
+     69    function entryClassGetterSetter() {
+     70        let o = new Child;
+     71        debugger;
+ -&gt;  72        |var name = o.name;
+     73        o.name = &quot;Name&quot;;
+     74    }
+     75    
+
+ACTION: step-in
+PAUSE AT name:50:18
+     46            b();
+     47        }
+     48    
+ -&gt;  49        get name() { |return this._name; }
+     50        set name(x) { this._name = x; }
+     51        
+     52    }
+
+ACTION: step-out
+PAUSE AT entryClassGetterSetter:74:5
+     70        let o = new Child;
+     71        debugger;
+     72        var name = o.name;
+ -&gt;  73        |o.name = &quot;Name&quot;;
+     74    }
+     75    
+     76    // ---------
+
+ACTION: step-in
+PAUSE AT name:51:19
+     47        }
+     48    
+     49        get name() { return this._name; }
+ -&gt;  50        set name(x) { |this._name = x; }
+     51        
+     52    }
+     53    
+
+ACTION: step-out
+PAUSE AT entryClassGetterSetter:75:2
+     71        debugger;
+     72        var name = o.name;
+     73        o.name = &quot;Name&quot;;
+ -&gt;  74    }|
+     75    
+     76    // ---------
+     77    
+
+ACTION: resume
+RESUMED
+PASS: Should have used all steps.
+
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectordebuggersteppingsteppingclasseshtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/inspector/debugger/stepping/stepping-classes.html (0 => 206652)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/debugger/stepping/stepping-classes.html                                (rev 0)
+++ trunk/LayoutTests/inspector/debugger/stepping/stepping-classes.html        2016-09-30 19:22:37 UTC (rev 206652)
</span><span class="lines">@@ -0,0 +1,162 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../../../http/tests/inspector/resources/inspector-test.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../resources/log-pause-location.js&quot;&gt;&lt;/script&gt;
+&lt;script&gt;
+function a() {
+    return 1;
+}
+
+function b() {
+    return 2;
+}
+
+class Base {
+    constructor()
+    {
+        this._base = true;
+    }
+
+    baseMethod()
+    {
+        a();
+    }
+
+    method()
+    {
+        a();
+    }
+}
+
+class Child extends Base {
+    constructor()
+    {
+        super();
+        this._child = true;
+    }
+
+    childMethod()
+    {
+        b();
+    }
+
+    method()
+    {
+        super.method();
+        b();
+    }
+
+    get name() { return this._name; }
+    set name(x) { this._name = x; }
+    
+}
+
+class Child2 extends Base {};
+
+function entryClassBasic() {
+    debugger;
+    let o = new Child;
+    o.baseMethod();
+    o.childMethod();
+    o.method();
+}
+
+function entryClassDefaultConstructor() {
+    debugger;
+    let o = new Child2;
+}
+
+function entryClassGetterSetter() {
+    let o = new Child;
+    debugger;
+    var name = o.name;
+    o.name = &quot;Name&quot;;
+}
+
+// ---------
+
+function test()
+{
+    let suite = InspectorTest.createAsyncSuite(&quot;Debugger.stepping.classes&quot;);
+
+    window.initializeSteppingTestSuite(suite);
+
+    addSteppingTestCase({
+        name: &quot;Debugger.stepping.ClassBasicStepOver&quot;,
+        description: &quot;Should be able to step through class constructors and methods.&quot;,
+        expression: &quot;setTimeout(entryClassBasic)&quot;,
+        steps: [
+            &quot;over&quot;,
+                &quot;over&quot;, // complete: let o = new Child
+                &quot;over&quot;, // complete: o.baseMethod()
+                &quot;over&quot;, // complete: o.childMethod()
+                &quot;over&quot;, // complete: o.method()
+            &quot;resume&quot;,
+        ]
+    });
+
+    addSteppingTestCase({
+        name: &quot;Debugger.stepping.ClassBasicStepIn&quot;,
+        description: &quot;Should be able to step through class constructors and methods.&quot;,
+        expression: &quot;setTimeout(entryClassBasic)&quot;,
+        steps: [
+            &quot;over&quot;,
+                &quot;in&quot;,   // into Child constructor - before super()
+                &quot;in&quot;,   // into Base constructor
+                &quot;out&quot;,  // out of Base constructor - before this._child
+                &quot;over&quot;, // complete: this._child
+                &quot;over&quot;, // leaving Child constructor
+
+                &quot;in&quot;,   // into Base.prototype.baseMethod
+                &quot;out&quot;,  // out of Base.prototype.baseMethod - before childMethod()
+                &quot;in&quot;,   // into Child.prototype.childMethod
+                &quot;out&quot;,  // out of Child.prototype.childMethod - before method()
+
+                &quot;in&quot;,   // into Child.prototype.method
+                &quot;in&quot;,   // into Base.prototype.method
+                &quot;out&quot;,  // out of Base.prototype.method - before b()
+                &quot;out&quot;,  // out of Child.prototype.method - leaving entry
+            &quot;resume&quot;,
+        ]
+    });
+
+    addSteppingTestCase({
+        name: &quot;Debugger.stepping.ClassDefaultConstructor&quot;,
+        description: &quot;Should be able to step through class default constructor to base constructor.&quot;,
+        expression: &quot;setTimeout(entryClassDefaultConstructor)&quot;,
+        steps: [
+            &quot;over&quot;,
+                        // FIXME: Autogenerated constructor file is unexpected, jump to class definition? Skip this?
+                &quot;in&quot;,   // into autogenerated Child constructor
+                &quot;in&quot;,   // into Base constructor
+                &quot;out&quot;,  // out of Base constructor
+                &quot;out&quot;,  // out of autogenerated Child constructor - leaving entry
+            &quot;resume&quot;,
+        ]
+    });
+
+    addSteppingTestCase({
+        name: &quot;Debugger.stepping.ClassGetterSetter&quot;,
+        description: &quot;Should be able to step through class getter and setter.&quot;,
+        expression: &quot;setTimeout(entryClassGetterSetter)&quot;,
+        steps: [
+            &quot;over&quot;,
+                &quot;in&quot;,   // into getter
+                &quot;out&quot;,  // out of getter
+                &quot;in&quot;,   // into setter
+                &quot;out&quot;,  // out of setter
+            &quot;resume&quot;,
+        ]
+    });
+
+    loadMainPageContent().then(() =&gt; {
+        suite.runTestCasesAndFinish();
+    });
+}
+&lt;/script&gt;
+&lt;/head&gt;
+&lt;body onload=&quot;runTest()&quot;&gt;
+&lt;p&gt;Checking pause locations when stepping in, out, and over class constructors and methods.&lt;/p&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectordebuggersteppingsteppingcontrolflowexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/inspector/debugger/stepping/stepping-control-flow-expected.txt (0 => 206652)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/debugger/stepping/stepping-control-flow-expected.txt                                (rev 0)
+++ trunk/LayoutTests/inspector/debugger/stepping/stepping-control-flow-expected.txt        2016-09-30 19:22:37 UTC (rev 206652)
</span><span class="lines">@@ -0,0 +1,560 @@
</span><ins>+Checking pause locations when stepping in, out, and over if/else control flow.
+
+
+== Running test suite: Debugger.stepping.control-flow
+-- Running test case: Debugger.stepping.IfSingleStatement
+EXPRESSION: setTimeout(entryIfSingleStatement)
+STEPS: over, over, over, over, resume
+PAUSED (debugger-statement)
+PAUSE AT entryIfSingleStatement:16:5
+     12    }
+     13    
+     14    function entryIfSingleStatement() {
+ -&gt;  15        |debugger;
+     16        if (true)
+     17            a();
+     18        if (false)
+
+ACTION: step-over
+PAUSE AT entryIfSingleStatement:17:9
+     13    
+     14    function entryIfSingleStatement() {
+     15        debugger;
+ -&gt;  16        if (|true)
+     17            a();
+     18        if (false)
+     19            a();
+
+ACTION: step-over
+PAUSE AT entryIfSingleStatement:18:9
+     14    function entryIfSingleStatement() {
+     15        debugger;
+     16        if (true)
+ -&gt;  17            |a();
+     18        if (false)
+     19            a();
+     20    }
+
+ACTION: step-over
+PAUSE AT entryIfSingleStatement:19:9
+     15        debugger;
+     16        if (true)
+     17            a();
+ -&gt;  18        if (|false)
+     19            a();
+     20    }
+     21    
+
+ACTION: step-over
+PAUSE AT entryIfSingleStatement:21:2
+     17            a();
+     18        if (false)
+     19            a();
+ -&gt;  20    }|
+     21    
+     22    function entryIfMultiStatement() {
+     23        debugger;
+
+ACTION: resume
+RESUMED
+PASS: Should have used all steps.
+
+-- Running test case: Debugger.stepping.IfMultiStatement
+EXPRESSION: setTimeout(entryIfMultiStatement)
+STEPS: over, over, over, over, over, resume
+PAUSED (debugger-statement)
+PAUSE AT entryIfMultiStatement:24:5
+     20    }
+     21    
+     22    function entryIfMultiStatement() {
+ -&gt;  23        |debugger;
+     24        if (true) {
+     25            a();
+     26            a();
+
+ACTION: step-over
+PAUSE AT entryIfMultiStatement:25:9
+     21    
+     22    function entryIfMultiStatement() {
+     23        debugger;
+ -&gt;  24        if (|true) {
+     25            a();
+     26            a();
+     27        }
+
+ACTION: step-over
+PAUSE AT entryIfMultiStatement:26:9
+     22    function entryIfMultiStatement() {
+     23        debugger;
+     24        if (true) {
+ -&gt;  25            |a();
+     26            a();
+     27        }
+     28        if (false) {
+
+ACTION: step-over
+PAUSE AT entryIfMultiStatement:27:9
+     23        debugger;
+     24        if (true) {
+     25            a();
+ -&gt;  26            |a();
+     27        }
+     28        if (false) {
+     29            a();
+
+ACTION: step-over
+PAUSE AT entryIfMultiStatement:29:9
+     25            a();
+     26            a();
+     27        }
+ -&gt;  28        if (|false) {
+     29            a();
+     30            a();
+     31        }
+
+ACTION: step-over
+PAUSE AT entryIfMultiStatement:33:2
+     29            a();
+     30            a();
+     31        }
+ -&gt;  32    }|
+     33    
+     34    function entryIfElse() {
+     35        debugger;
+
+ACTION: resume
+RESUMED
+PASS: Should have used all steps.
+
+-- Running test case: Debugger.stepping.IfElse1
+EXPRESSION: setTimeout(entryIfElse)
+STEPS: over, over, over, over, over, resume
+PAUSED (debugger-statement)
+PAUSE AT entryIfElse:36:5
+     32    }
+     33    
+     34    function entryIfElse() {
+ -&gt;  35        |debugger;
+     36        if (true)
+     37            a();
+     38        else
+
+ACTION: step-over
+PAUSE AT entryIfElse:37:9
+     33    
+     34    function entryIfElse() {
+     35        debugger;
+ -&gt;  36        if (|true)
+     37            a();
+     38        else
+     39            a();
+
+ACTION: step-over
+PAUSE AT entryIfElse:38:9
+     34    function entryIfElse() {
+     35        debugger;
+     36        if (true)
+ -&gt;  37            |a();
+     38        else
+     39            a();
+     40        if (false)
+
+ACTION: step-over
+PAUSE AT entryIfElse:41:9
+     37            a();
+     38        else
+     39            a();
+ -&gt;  40        if (|false)
+     41            a();
+     42        else
+     43            a();
+
+ACTION: step-over
+PAUSE AT entryIfElse:44:9
+     40        if (false)
+     41            a();
+     42        else
+ -&gt;  43            |a();
+     44    }
+     45    
+     46    function entryIfElseChain() {
+
+ACTION: step-over
+PAUSE AT entryIfElse:45:2
+     41            a();
+     42        else
+     43            a();
+ -&gt;  44    }|
+     45    
+     46    function entryIfElseChain() {
+     47        debugger;
+
+ACTION: resume
+RESUMED
+PASS: Should have used all steps.
+
+-- Running test case: Debugger.stepping.IfElse2
+EXPRESSION: setTimeout(entryIfElseChain)
+STEPS: over, over, over, over, over, over, over, resume
+PAUSED (debugger-statement)
+PAUSE AT entryIfElseChain:48:5
+     44    }
+     45    
+     46    function entryIfElseChain() {
+ -&gt;  47        |debugger;
+     48        if (false)
+     49            a();
+     50        else if (true)
+
+ACTION: step-over
+PAUSE AT entryIfElseChain:49:9
+     45    
+     46    function entryIfElseChain() {
+     47        debugger;
+ -&gt;  48        if (|false)
+     49            a();
+     50        else if (true)
+     51            a();
+
+ACTION: step-over
+PAUSE AT entryIfElseChain:51:14
+     47        debugger;
+     48        if (false)
+     49            a();
+ -&gt;  50        else if (|true)
+     51            a();
+     52        else
+     53            a();
+
+ACTION: step-over
+PAUSE AT entryIfElseChain:52:9
+     48        if (false)
+     49            a();
+     50        else if (true)
+ -&gt;  51            |a();
+     52        else
+     53            a();
+     54    
+
+ACTION: step-over
+PAUSE AT entryIfElseChain:56:9
+     52        else
+     53            a();
+     54    
+ -&gt;  55        if (|false)
+     56            a();
+     57        else if (false)
+     58            a();
+
+ACTION: step-over
+PAUSE AT entryIfElseChain:58:14
+     54    
+     55        if (false)
+     56            a();
+ -&gt;  57        else if (|false)
+     58            a();
+     59        else
+     60            a();
+
+ACTION: step-over
+PAUSE AT entryIfElseChain:61:9
+     57        else if (false)
+     58            a();
+     59        else
+ -&gt;  60            |a();
+     61    }
+     62    
+     63    function entryIfWithCall() {
+
+ACTION: step-over
+PAUSE AT entryIfElseChain:62:2
+     58            a();
+     59        else
+     60            a();
+ -&gt;  61    }|
+     62    
+     63    function entryIfWithCall() {
+     64        debugger;
+
+ACTION: resume
+RESUMED
+PASS: Should have used all steps.
+
+-- Running test case: Debugger.stepping.IfWithCall1
+EXPRESSION: setTimeout(entryIfWithCall)
+STEPS: over, over, over, resume
+PAUSED (debugger-statement)
+PAUSE AT entryIfWithCall:65:5
+     61    }
+     62    
+     63    function entryIfWithCall() {
+ -&gt;  64        |debugger;
+     65        if (a() &amp;&amp; a())
+     66            a();
+     67    }
+
+ACTION: step-over
+PAUSE AT entryIfWithCall:66:9
+     62    
+     63    function entryIfWithCall() {
+     64        debugger;
+ -&gt;  65        if (|a() &amp;&amp; a())
+     66            a();
+     67    }
+     68    
+
+ACTION: step-over
+PAUSE AT entryIfWithCall:67:9
+     63    function entryIfWithCall() {
+     64        debugger;
+     65        if (a() &amp;&amp; a())
+ -&gt;  66            |a();
+     67    }
+     68    
+     69    function entryTernary() {
+
+ACTION: step-over
+PAUSE AT entryIfWithCall:68:2
+     64        debugger;
+     65        if (a() &amp;&amp; a())
+     66            a();
+ -&gt;  67    }|
+     68    
+     69    function entryTernary() {
+     70        let t = () =&gt; true;
+
+ACTION: resume
+RESUMED
+PASS: Should have used all steps.
+
+-- Running test case: Debugger.stepping.IfWithCall2
+EXPRESSION: setTimeout(entryIfWithCall)
+STEPS: over, in, out, in, out, over, resume
+PAUSED (debugger-statement)
+PAUSE AT entryIfWithCall:65:5
+     61    }
+     62    
+     63    function entryIfWithCall() {
+ -&gt;  64        |debugger;
+     65        if (a() &amp;&amp; a())
+     66            a();
+     67    }
+
+ACTION: step-over
+PAUSE AT entryIfWithCall:66:9
+     62    
+     63    function entryIfWithCall() {
+     64        debugger;
+ -&gt;  65        if (|a() &amp;&amp; a())
+     66            a();
+     67    }
+     68    
+
+ACTION: step-in
+PAUSE AT a:8:5
+      4    &lt;script src=&quot;../resources/log-pause-location.js&quot;&gt;&lt;/script&gt;
+      5    &lt;script&gt;
+      6    function a() {
+ -&gt;   7        |return 1;
+      8    }
+      9    
+     10    function b() {
+
+ACTION: step-out
+PAUSE AT entryIfWithCall:66:16
+     62    
+     63    function entryIfWithCall() {
+     64        debugger;
+ -&gt;  65        if (a() &amp;&amp; |a())
+     66            a();
+     67    }
+     68    
+
+ACTION: step-in
+PAUSE AT a:8:5
+      4    &lt;script src=&quot;../resources/log-pause-location.js&quot;&gt;&lt;/script&gt;
+      5    &lt;script&gt;
+      6    function a() {
+ -&gt;   7        |return 1;
+      8    }
+      9    
+     10    function b() {
+
+ACTION: step-out
+PAUSE AT entryIfWithCall:67:9
+     63    function entryIfWithCall() {
+     64        debugger;
+     65        if (a() &amp;&amp; a())
+ -&gt;  66            |a();
+     67    }
+     68    
+     69    function entryTernary() {
+
+ACTION: step-over
+PAUSE AT entryIfWithCall:68:2
+     64        debugger;
+     65        if (a() &amp;&amp; a())
+     66            a();
+ -&gt;  67    }|
+     68    
+     69    function entryTernary() {
+     70        let t = () =&gt; true;
+
+ACTION: resume
+RESUMED
+PASS: Should have used all steps.
+
+-- Running test case: Debugger.stepping.TernaryStepOver
+EXPRESSION: setTimeout(entryTernary)
+STEPS: over, over, over, resume
+PAUSED (debugger-statement)
+PAUSE AT entryTernary:73:5
+     69    function entryTernary() {
+     70        let t = () =&gt; true;
+     71        let f = () =&gt; false;
+ -&gt;  72        |debugger;
+     73        let x = t() ? a() : b();
+     74        let y = f() ? a() : b();
+     75    }
+
+ACTION: step-over
+PAUSE AT entryTernary:74:5
+     70        let t = () =&gt; true;
+     71        let f = () =&gt; false;
+     72        debugger;
+ -&gt;  73        |let x = t() ? a() : b();
+     74        let y = f() ? a() : b();
+     75    }
+     76    
+
+ACTION: step-over
+PAUSE AT entryTernary:75:5
+     71        let f = () =&gt; false;
+     72        debugger;
+     73        let x = t() ? a() : b();
+ -&gt;  74        |let y = f() ? a() : b();
+     75    }
+     76    
+     77    // ---------
+
+ACTION: step-over
+PAUSE AT entryTernary:76:2
+     72        debugger;
+     73        let x = t() ? a() : b();
+     74        let y = f() ? a() : b();
+ -&gt;  75    }|
+     76    
+     77    // ---------
+     78    
+
+ACTION: resume
+RESUMED
+PASS: Should have used all steps.
+
+-- Running test case: Debugger.stepping.TernaryStepIn
+EXPRESSION: setTimeout(entryTernary)
+STEPS: over, in, out, in, out, in, out, in, out, resume
+PAUSED (debugger-statement)
+PAUSE AT entryTernary:73:5
+     69    function entryTernary() {
+     70        let t = () =&gt; true;
+     71        let f = () =&gt; false;
+ -&gt;  72        |debugger;
+     73        let x = t() ? a() : b();
+     74        let y = f() ? a() : b();
+     75    }
+
+ACTION: step-over
+PAUSE AT entryTernary:74:5
+     70        let t = () =&gt; true;
+     71        let f = () =&gt; false;
+     72        debugger;
+ -&gt;  73        |let x = t() ? a() : b();
+     74        let y = f() ? a() : b();
+     75    }
+     76    
+
+ACTION: step-in
+PAUSE AT t:71:19
+     67    }
+     68    
+     69    function entryTernary() {
+ -&gt;  70        let t = () =&gt; |true;
+     71        let f = () =&gt; false;
+     72        debugger;
+     73        let x = t() ? a() : b();
+
+ACTION: step-out
+PAUSE AT entryTernary:74:19
+     70        let t = () =&gt; true;
+     71        let f = () =&gt; false;
+     72        debugger;
+ -&gt;  73        let x = t() ? |a() : b();
+     74        let y = f() ? a() : b();
+     75    }
+     76    
+
+ACTION: step-in
+PAUSE AT a:8:5
+      4    &lt;script src=&quot;../resources/log-pause-location.js&quot;&gt;&lt;/script&gt;
+      5    &lt;script&gt;
+      6    function a() {
+ -&gt;   7        |return 1;
+      8    }
+      9    
+     10    function b() {
+
+ACTION: step-out
+PAUSE AT entryTernary:75:5
+     71        let f = () =&gt; false;
+     72        debugger;
+     73        let x = t() ? a() : b();
+ -&gt;  74        |let y = f() ? a() : b();
+     75    }
+     76    
+     77    // ---------
+
+ACTION: step-in
+PAUSE AT f:72:19
+     68    
+     69    function entryTernary() {
+     70        let t = () =&gt; true;
+ -&gt;  71        let f = () =&gt; |false;
+     72        debugger;
+     73        let x = t() ? a() : b();
+     74        let y = f() ? a() : b();
+
+ACTION: step-out
+PAUSE AT entryTernary:75:25
+     71        let f = () =&gt; false;
+     72        debugger;
+     73        let x = t() ? a() : b();
+ -&gt;  74        let y = f() ? a() : |b();
+     75    }
+     76    
+     77    // ---------
+
+ACTION: step-in
+PAUSE AT b:12:5
+      8    }
+      9    
+     10    function b() {
+ -&gt;  11        |return 2;
+     12    }
+     13    
+     14    function entryIfSingleStatement() {
+
+ACTION: step-out
+PAUSE AT entryTernary:76:2
+     72        debugger;
+     73        let x = t() ? a() : b();
+     74        let y = f() ? a() : b();
+ -&gt;  75    }|
+     76    
+     77    // ---------
+     78    
+
+ACTION: resume
+RESUMED
+PASS: Should have used all steps.
+
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectordebuggersteppingsteppingcontrolflowhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/inspector/debugger/stepping/stepping-control-flow.html (0 => 206652)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/debugger/stepping/stepping-control-flow.html                                (rev 0)
+++ trunk/LayoutTests/inspector/debugger/stepping/stepping-control-flow.html        2016-09-30 19:22:37 UTC (rev 206652)
</span><span class="lines">@@ -0,0 +1,209 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../../../http/tests/inspector/resources/inspector-test.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../resources/log-pause-location.js&quot;&gt;&lt;/script&gt;
+&lt;script&gt;
+function a() {
+    return 1;
+}
+
+function b() {
+    return 2;
+}
+
+function entryIfSingleStatement() {
+    debugger;
+    if (true)
+        a();
+    if (false)
+        a();
+}
+
+function entryIfMultiStatement() {
+    debugger;
+    if (true) {
+        a();
+        a();
+    }
+    if (false) {
+        a();
+        a();
+    }
+}
+
+function entryIfElse() {
+    debugger;
+    if (true)
+        a();
+    else
+        a();
+    if (false)
+        a();
+    else
+        a();
+}
+
+function entryIfElseChain() {
+    debugger;
+    if (false)
+        a();
+    else if (true)
+        a();
+    else
+        a();
+
+    if (false)
+        a();
+    else if (false)
+        a();
+    else
+        a();
+}
+
+function entryIfWithCall() {
+    debugger;
+    if (a() &amp;&amp; a())
+        a();
+}
+
+function entryTernary() {
+    let t = () =&gt; true;
+    let f = () =&gt; false;
+    debugger;
+    let x = t() ? a() : b();
+    let y = f() ? a() : b();
+}
+
+// ---------
+
+function test()
+{
+    let suite = InspectorTest.createAsyncSuite(&quot;Debugger.stepping.control-flow&quot;);
+
+    window.initializeSteppingTestSuite(suite);
+
+    addSteppingTestCase({
+        name: &quot;Debugger.stepping.IfSingleStatement&quot;,
+        description: &quot;Should be able to step through single statement body if statements.&quot;,
+        expression: &quot;setTimeout(entryIfSingleStatement)&quot;,
+        steps: [
+            &quot;over&quot;,
+                &quot;over&quot;, // complete: if (true)
+                &quot;over&quot;, // complete: a() inside if (true)
+                &quot;over&quot;, // complete: if (false) - leaving entry
+            &quot;resume&quot;,
+        ]
+    });
+
+    addSteppingTestCase({
+        name: &quot;Debugger.stepping.IfMultiStatement&quot;,
+        description: &quot;Should be able to step through multiple statement body if statements.&quot;,
+        expression: &quot;setTimeout(entryIfMultiStatement)&quot;,
+        steps: [
+            &quot;over&quot;,
+                &quot;over&quot;, // complete: if (true)
+                &quot;over&quot;, // complete: 1st a()
+                &quot;over&quot;, // complete: 2nd a()
+                &quot;over&quot;, // complete: if (false) - leaving entry
+            &quot;resume&quot;,
+        ]
+    });
+
+    addSteppingTestCase({
+        name: &quot;Debugger.stepping.IfElse1&quot;,
+        description: &quot;Should be able to step through if/else.&quot;,
+        expression: &quot;setTimeout(entryIfElse)&quot;,
+        steps: [
+            &quot;over&quot;,
+                &quot;over&quot;, // complete: if (true)
+                &quot;over&quot;, // complete: a() inside if
+                &quot;over&quot;, // complete: if (false)
+                &quot;over&quot;, // complete: a() inside else - leaving entry
+            &quot;resume&quot;,
+        ]
+    });
+
+    addSteppingTestCase({
+        name: &quot;Debugger.stepping.IfElse2&quot;,
+        description: &quot;Should be able to step through if/else if/else chains.&quot;,
+        expression: &quot;setTimeout(entryIfElseChain)&quot;,
+        steps: [
+            &quot;over&quot;,
+                &quot;over&quot;, // complete: if (false)
+                &quot;over&quot;, // complete: else if (true)
+                &quot;over&quot;, // complete: a() inside block
+                &quot;over&quot;, // complete: if (false)
+                &quot;over&quot;, // complete: else if (false)
+                &quot;over&quot;, // complete: a() inside else - leaving entry
+            &quot;resume&quot;,
+        ]
+    });
+
+    addSteppingTestCase({
+        name: &quot;Debugger.stepping.IfWithCall1&quot;,
+        description: &quot;Should be able to step over if conditions with function calls.&quot;,
+        expression: &quot;setTimeout(entryIfWithCall)&quot;,
+        steps: [
+            &quot;over&quot;,
+                &quot;over&quot;, // complete: if (a() &amp;&amp; a())
+                &quot;over&quot;, // complete: a() inside block - leaving entry
+            &quot;resume&quot;,
+        ]
+    });
+
+    addSteppingTestCase({
+        name: &quot;Debugger.stepping.IfWithCall2&quot;,
+        description: &quot;Should be able to step into calls in if conditions with function calls.&quot;,
+        expression: &quot;setTimeout(entryIfWithCall)&quot;,
+        steps: [
+            &quot;over&quot;,
+                &quot;in&quot;,   // into 1st a
+                &quot;out&quot;,  // out of a
+                &quot;in&quot;,   // into 2nd a
+                &quot;out&quot;,  // out of a
+                &quot;over&quot;, // complete: a() inside block - leaving entry
+            &quot;resume&quot;,
+        ]
+    });
+
+    addSteppingTestCase({
+        name: &quot;Debugger.stepping.TernaryStepOver&quot;,
+        description: &quot;Should be able to step over ternary expressions.&quot;,
+        expression: &quot;setTimeout(entryTernary)&quot;,
+        steps: [
+            &quot;over&quot;,
+                &quot;over&quot;, // complete: t() ? ...
+                &quot;over&quot;, // complete: f() ? ...
+            &quot;resume&quot;,
+        ]
+    });
+
+    addSteppingTestCase({
+        name: &quot;Debugger.stepping.TernaryStepIn&quot;,
+        description: &quot;Should be able to step into ternary expressions.&quot;,
+        expression: &quot;setTimeout(entryTernary)&quot;,
+        steps: [
+            &quot;over&quot;,
+                &quot;in&quot;,  // into t
+                &quot;out&quot;, // out of t - before a()
+                &quot;in&quot;,  // into a
+                &quot;out&quot;, // out of a - before next ternary
+                &quot;in&quot;,  // into f
+                &quot;out&quot;, // out of f - before b()
+                &quot;in&quot;,  // into b
+                &quot;out&quot;, // out of b - leaving entry
+            &quot;resume&quot;,
+        ]
+    });
+
+    loadMainPageContent().then(() =&gt; {
+        suite.runTestCasesAndFinish();
+    });
+}
+&lt;/script&gt;
+&lt;/head&gt;
+&lt;body onload=&quot;runTest()&quot;&gt;
+&lt;p&gt;Checking pause locations when stepping in, out, and over if/else control flow.&lt;/p&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectordebuggersteppingsteppingfunctioncallsexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/inspector/debugger/stepping/stepping-function-calls-expected.txt (0 => 206652)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/debugger/stepping/stepping-function-calls-expected.txt                                (rev 0)
+++ trunk/LayoutTests/inspector/debugger/stepping/stepping-function-calls-expected.txt        2016-09-30 19:22:37 UTC (rev 206652)
</span><span class="lines">@@ -0,0 +1,1485 @@
</span><ins>+Checking pause locations when stepping in, out, and over statements with function calls.
+
+
+== Running test suite: Debugger.stepping.functionCalls
+-- Running test case: Debugger.stepping.MultipleStatementsOnOneLine1
+EXPRESSION: setTimeout(entryMultipleStatementsOnOneLine)
+STEPS: over, in, out, in, out, resume
+PAUSED (debugger-statement)
+PAUSE AT entryMultipleStatementsOnOneLine:20:5
+     16    }
+     17    
+     18    function entryMultipleStatementsOnOneLine() {
+ -&gt;  19        |debugger;
+     20        a(); b();
+     21    }
+     22    
+
+ACTION: step-over
+PAUSE AT entryMultipleStatementsOnOneLine:21:5
+     17    
+     18    function entryMultipleStatementsOnOneLine() {
+     19        debugger;
+ -&gt;  20        |a(); b();
+     21    }
+     22    
+     23    function entryMultipleCallsInOneStatement() {
+
+ACTION: step-in
+PAUSE AT a:12:5
+      8    }
+      9    
+     10    function a() {
+ -&gt;  11        |return 1;
+     12    }
+     13    
+     14    function b() {
+
+ACTION: step-out
+PAUSE AT entryMultipleStatementsOnOneLine:21:10
+     17    
+     18    function entryMultipleStatementsOnOneLine() {
+     19        debugger;
+ -&gt;  20        a(); |b();
+     21    }
+     22    
+     23    function entryMultipleCallsInOneStatement() {
+
+ACTION: step-in
+PAUSE AT b:16:5
+     12    }
+     13    
+     14    function b() {
+ -&gt;  15        |return 2;
+     16    }
+     17    
+     18    function entryMultipleStatementsOnOneLine() {
+
+ACTION: step-out
+PAUSE AT entryMultipleStatementsOnOneLine:22:2
+     18    function entryMultipleStatementsOnOneLine() {
+     19        debugger;
+     20        a(); b();
+ -&gt;  21    }|
+     22    
+     23    function entryMultipleCallsInOneStatement() {
+     24        debugger;
+
+ACTION: resume
+RESUMED
+PASS: Should have used all steps.
+
+-- Running test case: Debugger.stepping.MultipleStatementsOnOneLine2
+EXPRESSION: setTimeout(entryMultipleStatementsOnOneLine)
+STEPS: over, over, over, resume
+PAUSED (debugger-statement)
+PAUSE AT entryMultipleStatementsOnOneLine:20:5
+     16    }
+     17    
+     18    function entryMultipleStatementsOnOneLine() {
+ -&gt;  19        |debugger;
+     20        a(); b();
+     21    }
+     22    
+
+ACTION: step-over
+PAUSE AT entryMultipleStatementsOnOneLine:21:5
+     17    
+     18    function entryMultipleStatementsOnOneLine() {
+     19        debugger;
+ -&gt;  20        |a(); b();
+     21    }
+     22    
+     23    function entryMultipleCallsInOneStatement() {
+
+ACTION: step-over
+PAUSE AT entryMultipleStatementsOnOneLine:21:10
+     17    
+     18    function entryMultipleStatementsOnOneLine() {
+     19        debugger;
+ -&gt;  20        a(); |b();
+     21    }
+     22    
+     23    function entryMultipleCallsInOneStatement() {
+
+ACTION: step-over
+PAUSE AT entryMultipleStatementsOnOneLine:22:2
+     18    function entryMultipleStatementsOnOneLine() {
+     19        debugger;
+     20        a(); b();
+ -&gt;  21    }|
+     22    
+     23    function entryMultipleCallsInOneStatement() {
+     24        debugger;
+
+ACTION: resume
+RESUMED
+PASS: Should have used all steps.
+
+-- Running test case: Debugger.stepping.MultipleCallsInOneStatement1
+EXPRESSION: setTimeout(entryMultipleCallsInOneStatement)
+STEPS: over, in, out, in, out, in, out, resume
+PAUSED (debugger-statement)
+PAUSE AT entryMultipleCallsInOneStatement:25:5
+     21    }
+     22    
+     23    function entryMultipleCallsInOneStatement() {
+ -&gt;  24        |debugger;
+     25        add(a(), b());
+     26    }
+     27    
+
+ACTION: step-over
+PAUSE AT entryMultipleCallsInOneStatement:26:5
+     22    
+     23    function entryMultipleCallsInOneStatement() {
+     24        debugger;
+ -&gt;  25        |add(a(), b());
+     26    }
+     27    
+     28    function entryMultilineStatement() {
+
+ACTION: step-in
+PAUSE AT a:12:5
+      8    }
+      9    
+     10    function a() {
+ -&gt;  11        |return 1;
+     12    }
+     13    
+     14    function b() {
+
+ACTION: step-out
+PAUSE AT entryMultipleCallsInOneStatement:26:14
+     22    
+     23    function entryMultipleCallsInOneStatement() {
+     24        debugger;
+ -&gt;  25        add(a(), |b());
+     26    }
+     27    
+     28    function entryMultilineStatement() {
+
+ACTION: step-in
+PAUSE AT b:16:5
+     12    }
+     13    
+     14    function b() {
+ -&gt;  15        |return 2;
+     16    }
+     17    
+     18    function entryMultipleStatementsOnOneLine() {
+
+ACTION: step-out
+PAUSE AT entryMultipleCallsInOneStatement:26:5
+     22    
+     23    function entryMultipleCallsInOneStatement() {
+     24        debugger;
+ -&gt;  25        |add(a(), b());
+     26    }
+     27    
+     28    function entryMultilineStatement() {
+
+ACTION: step-in
+PAUSE AT add:8:5
+      4    &lt;script src=&quot;../resources/log-pause-location.js&quot;&gt;&lt;/script&gt;
+      5    &lt;script&gt;
+      6    function add(a, b) {
+ -&gt;   7        |return a + b;
+      8    }
+      9    
+     10    function a() {
+
+ACTION: step-out
+PAUSE AT entryMultipleCallsInOneStatement:27:2
+     23    function entryMultipleCallsInOneStatement() {
+     24        debugger;
+     25        add(a(), b());
+ -&gt;  26    }|
+     27    
+     28    function entryMultilineStatement() {
+     29        debugger;
+
+ACTION: resume
+RESUMED
+PASS: Should have used all steps.
+
+-- Running test case: Debugger.stepping.MultipleCallsInOneStatement2
+EXPRESSION: setTimeout(entryMultipleCallsInOneStatement)
+STEPS: over, in, out, over, resume
+PAUSED (debugger-statement)
+PAUSE AT entryMultipleCallsInOneStatement:25:5
+     21    }
+     22    
+     23    function entryMultipleCallsInOneStatement() {
+ -&gt;  24        |debugger;
+     25        add(a(), b());
+     26    }
+     27    
+
+ACTION: step-over
+PAUSE AT entryMultipleCallsInOneStatement:26:5
+     22    
+     23    function entryMultipleCallsInOneStatement() {
+     24        debugger;
+ -&gt;  25        |add(a(), b());
+     26    }
+     27    
+     28    function entryMultilineStatement() {
+
+ACTION: step-in
+PAUSE AT a:12:5
+      8    }
+      9    
+     10    function a() {
+ -&gt;  11        |return 1;
+     12    }
+     13    
+     14    function b() {
+
+ACTION: step-out
+PAUSE AT entryMultipleCallsInOneStatement:26:14
+     22    
+     23    function entryMultipleCallsInOneStatement() {
+     24        debugger;
+ -&gt;  25        add(a(), |b());
+     26    }
+     27    
+     28    function entryMultilineStatement() {
+
+ACTION: step-over
+PAUSE AT entryMultipleCallsInOneStatement:27:2
+     23    function entryMultipleCallsInOneStatement() {
+     24        debugger;
+     25        add(a(), b());
+ -&gt;  26    }|
+     27    
+     28    function entryMultilineStatement() {
+     29        debugger;
+
+ACTION: resume
+RESUMED
+PASS: Should have used all steps.
+
+-- Running test case: Debugger.stepping.MultipleCallsInOneStatement3
+EXPRESSION: setTimeout(entryMultipleCallsInOneStatement)
+STEPS: over, in, in, in, in, in, in, in, in, in, resume
+PAUSED (debugger-statement)
+PAUSE AT entryMultipleCallsInOneStatement:25:5
+     21    }
+     22    
+     23    function entryMultipleCallsInOneStatement() {
+ -&gt;  24        |debugger;
+     25        add(a(), b());
+     26    }
+     27    
+
+ACTION: step-over
+PAUSE AT entryMultipleCallsInOneStatement:26:5
+     22    
+     23    function entryMultipleCallsInOneStatement() {
+     24        debugger;
+ -&gt;  25        |add(a(), b());
+     26    }
+     27    
+     28    function entryMultilineStatement() {
+
+ACTION: step-in
+PAUSE AT a:12:5
+      8    }
+      9    
+     10    function a() {
+ -&gt;  11        |return 1;
+     12    }
+     13    
+     14    function b() {
+
+ACTION: step-in
+PAUSE AT a:13:2
+      9    
+     10    function a() {
+     11        return 1;
+ -&gt;  12    }|
+     13    
+     14    function b() {
+     15        return 2;
+
+ACTION: step-in
+PAUSE AT entryMultipleCallsInOneStatement:26:14
+     22    
+     23    function entryMultipleCallsInOneStatement() {
+     24        debugger;
+ -&gt;  25        add(a(), |b());
+     26    }
+     27    
+     28    function entryMultilineStatement() {
+
+ACTION: step-in
+PAUSE AT b:16:5
+     12    }
+     13    
+     14    function b() {
+ -&gt;  15        |return 2;
+     16    }
+     17    
+     18    function entryMultipleStatementsOnOneLine() {
+
+ACTION: step-in
+PAUSE AT b:17:2
+     13    
+     14    function b() {
+     15        return 2;
+ -&gt;  16    }|
+     17    
+     18    function entryMultipleStatementsOnOneLine() {
+     19        debugger;
+
+ACTION: step-in
+PAUSE AT entryMultipleCallsInOneStatement:26:5
+     22    
+     23    function entryMultipleCallsInOneStatement() {
+     24        debugger;
+ -&gt;  25        |add(a(), b());
+     26    }
+     27    
+     28    function entryMultilineStatement() {
+
+ACTION: step-in
+PAUSE AT add:8:5
+      4    &lt;script src=&quot;../resources/log-pause-location.js&quot;&gt;&lt;/script&gt;
+      5    &lt;script&gt;
+      6    function add(a, b) {
+ -&gt;   7        |return a + b;
+      8    }
+      9    
+     10    function a() {
+
+ACTION: step-in
+PAUSE AT add:9:2
+      5    &lt;script&gt;
+      6    function add(a, b) {
+      7        return a + b;
+ -&gt;   8    }|
+      9    
+     10    function a() {
+     11        return 1;
+
+ACTION: step-in
+PAUSE AT entryMultipleCallsInOneStatement:27:2
+     23    function entryMultipleCallsInOneStatement() {
+     24        debugger;
+     25        add(a(), b());
+ -&gt;  26    }|
+     27    
+     28    function entryMultilineStatement() {
+     29        debugger;
+
+ACTION: resume
+RESUMED
+PASS: Should have used all steps.
+
+-- Running test case: Debugger.stepping.MultipleCallsInOneStatement4
+EXPRESSION: setTimeout(entryMultipleCallsInOneStatement)
+STEPS: over, in, over, over, in, over, over, in, over, over, resume
+PAUSED (debugger-statement)
+PAUSE AT entryMultipleCallsInOneStatement:25:5
+     21    }
+     22    
+     23    function entryMultipleCallsInOneStatement() {
+ -&gt;  24        |debugger;
+     25        add(a(), b());
+     26    }
+     27    
+
+ACTION: step-over
+PAUSE AT entryMultipleCallsInOneStatement:26:5
+     22    
+     23    function entryMultipleCallsInOneStatement() {
+     24        debugger;
+ -&gt;  25        |add(a(), b());
+     26    }
+     27    
+     28    function entryMultilineStatement() {
+
+ACTION: step-in
+PAUSE AT a:12:5
+      8    }
+      9    
+     10    function a() {
+ -&gt;  11        |return 1;
+     12    }
+     13    
+     14    function b() {
+
+ACTION: step-over
+PAUSE AT a:13:2
+      9    
+     10    function a() {
+     11        return 1;
+ -&gt;  12    }|
+     13    
+     14    function b() {
+     15        return 2;
+
+ACTION: step-over
+PAUSE AT entryMultipleCallsInOneStatement:26:14
+     22    
+     23    function entryMultipleCallsInOneStatement() {
+     24        debugger;
+ -&gt;  25        add(a(), |b());
+     26    }
+     27    
+     28    function entryMultilineStatement() {
+
+ACTION: step-in
+PAUSE AT b:16:5
+     12    }
+     13    
+     14    function b() {
+ -&gt;  15        |return 2;
+     16    }
+     17    
+     18    function entryMultipleStatementsOnOneLine() {
+
+ACTION: step-over
+PAUSE AT b:17:2
+     13    
+     14    function b() {
+     15        return 2;
+ -&gt;  16    }|
+     17    
+     18    function entryMultipleStatementsOnOneLine() {
+     19        debugger;
+
+ACTION: step-over
+PAUSE AT entryMultipleCallsInOneStatement:26:5
+     22    
+     23    function entryMultipleCallsInOneStatement() {
+     24        debugger;
+ -&gt;  25        |add(a(), b());
+     26    }
+     27    
+     28    function entryMultilineStatement() {
+
+ACTION: step-in
+PAUSE AT add:8:5
+      4    &lt;script src=&quot;../resources/log-pause-location.js&quot;&gt;&lt;/script&gt;
+      5    &lt;script&gt;
+      6    function add(a, b) {
+ -&gt;   7        |return a + b;
+      8    }
+      9    
+     10    function a() {
+
+ACTION: step-over
+PAUSE AT add:9:2
+      5    &lt;script&gt;
+      6    function add(a, b) {
+      7        return a + b;
+ -&gt;   8    }|
+      9    
+     10    function a() {
+     11        return 1;
+
+ACTION: step-over
+PAUSE AT entryMultipleCallsInOneStatement:27:2
+     23    function entryMultipleCallsInOneStatement() {
+     24        debugger;
+     25        add(a(), b());
+ -&gt;  26    }|
+     27    
+     28    function entryMultilineStatement() {
+     29        debugger;
+
+ACTION: resume
+RESUMED
+PASS: Should have used all steps.
+
+-- Running test case: Debugger.stepping.MultipleCallsInOneStatement5
+EXPRESSION: setTimeout(entryMultilineStatement)
+STEPS: over, over, resume
+PAUSED (debugger-statement)
+PAUSE AT entryMultilineStatement:30:5
+     26    }
+     27    
+     28    function entryMultilineStatement() {
+ -&gt;  29        |debugger;
+     30        add(
+     31            a()
+     32            ,
+
+ACTION: step-over
+PAUSE AT entryMultilineStatement:31:5
+     27    
+     28    function entryMultilineStatement() {
+     29        debugger;
+ -&gt;  30        |add(
+     31            a()
+     32            ,
+     33            b()
+
+ACTION: step-over
+PAUSE AT entryMultilineStatement:36:2
+     32            ,
+     33            b()
+     34        );
+ -&gt;  35    }|
+     36    
+     37    function entryComplexLine() {
+     38        var x;
+
+ACTION: resume
+RESUMED
+PASS: Should have used all steps.
+
+-- Running test case: Debugger.stepping.MultipleCallsInOneStatement6
+EXPRESSION: setTimeout(entryMultilineStatement)
+STEPS: over, in, out, over, resume
+PAUSED (debugger-statement)
+PAUSE AT entryMultilineStatement:30:5
+     26    }
+     27    
+     28    function entryMultilineStatement() {
+ -&gt;  29        |debugger;
+     30        add(
+     31            a()
+     32            ,
+
+ACTION: step-over
+PAUSE AT entryMultilineStatement:31:5
+     27    
+     28    function entryMultilineStatement() {
+     29        debugger;
+ -&gt;  30        |add(
+     31            a()
+     32            ,
+     33            b()
+
+ACTION: step-in
+PAUSE AT a:12:5
+      8    }
+      9    
+     10    function a() {
+ -&gt;  11        |return 1;
+     12    }
+     13    
+     14    function b() {
+
+ACTION: step-out
+PAUSE AT entryMultilineStatement:34:9
+     30        add(
+     31            a()
+     32            ,
+ -&gt;  33            |b()
+     34        );
+     35    }
+     36    
+
+ACTION: step-over
+PAUSE AT entryMultilineStatement:36:2
+     32            ,
+     33            b()
+     34        );
+ -&gt;  35    }|
+     36    
+     37    function entryComplexLine() {
+     38        var x;
+
+ACTION: resume
+RESUMED
+PASS: Should have used all steps.
+
+-- Running test case: Debugger.stepping.ComplexLine1
+EXPRESSION: setTimeout(entryComplexLine)
+STEPS: over, in, out, in, in, out, resume
+PAUSED (debugger-statement)
+PAUSE AT entryComplexLine:40:5
+     36    
+     37    function entryComplexLine() {
+     38        var x;
+ -&gt;  39        |debugger;
+     40        a(); x = 1; b();
+     41    }
+     42    
+
+ACTION: step-over
+PAUSE AT entryComplexLine:41:5
+     37    function entryComplexLine() {
+     38        var x;
+     39        debugger;
+ -&gt;  40        |a(); x = 1; b();
+     41    }
+     42    
+     43    function entryComplexStatement() {
+
+ACTION: step-in
+PAUSE AT a:12:5
+      8    }
+      9    
+     10    function a() {
+ -&gt;  11        |return 1;
+     12    }
+     13    
+     14    function b() {
+
+ACTION: step-out
+PAUSE AT entryComplexLine:41:10
+     37    function entryComplexLine() {
+     38        var x;
+     39        debugger;
+ -&gt;  40        a(); |x = 1; b();
+     41    }
+     42    
+     43    function entryComplexStatement() {
+
+ACTION: step-in
+PAUSE AT entryComplexLine:41:17
+     37    function entryComplexLine() {
+     38        var x;
+     39        debugger;
+ -&gt;  40        a(); x = 1; |b();
+     41    }
+     42    
+     43    function entryComplexStatement() {
+
+ACTION: step-in
+PAUSE AT b:16:5
+     12    }
+     13    
+     14    function b() {
+ -&gt;  15        |return 2;
+     16    }
+     17    
+     18    function entryMultipleStatementsOnOneLine() {
+
+ACTION: step-out
+PAUSE AT entryComplexLine:42:2
+     38        var x;
+     39        debugger;
+     40        a(); x = 1; b();
+ -&gt;  41    }|
+     42    
+     43    function entryComplexStatement() {
+     44        var x;
+
+ACTION: resume
+RESUMED
+PASS: Should have used all steps.
+
+-- Running test case: Debugger.stepping.ComplexLine2
+EXPRESSION: setTimeout(entryComplexLine)
+STEPS: over, over, over, over, resume
+PAUSED (debugger-statement)
+PAUSE AT entryComplexLine:40:5
+     36    
+     37    function entryComplexLine() {
+     38        var x;
+ -&gt;  39        |debugger;
+     40        a(); x = 1; b();
+     41    }
+     42    
+
+ACTION: step-over
+PAUSE AT entryComplexLine:41:5
+     37    function entryComplexLine() {
+     38        var x;
+     39        debugger;
+ -&gt;  40        |a(); x = 1; b();
+     41    }
+     42    
+     43    function entryComplexStatement() {
+
+ACTION: step-over
+PAUSE AT entryComplexLine:41:10
+     37    function entryComplexLine() {
+     38        var x;
+     39        debugger;
+ -&gt;  40        a(); |x = 1; b();
+     41    }
+     42    
+     43    function entryComplexStatement() {
+
+ACTION: step-over
+PAUSE AT entryComplexLine:41:17
+     37    function entryComplexLine() {
+     38        var x;
+     39        debugger;
+ -&gt;  40        a(); x = 1; |b();
+     41    }
+     42    
+     43    function entryComplexStatement() {
+
+ACTION: step-over
+PAUSE AT entryComplexLine:42:2
+     38        var x;
+     39        debugger;
+     40        a(); x = 1; b();
+ -&gt;  41    }|
+     42    
+     43    function entryComplexStatement() {
+     44        var x;
+
+ACTION: resume
+RESUMED
+PASS: Should have used all steps.
+
+-- Running test case: Debugger.stepping.ComplexStatement1
+EXPRESSION: setTimeout(entryComplexStatement)
+STEPS: over, in, out, in, out, resume
+PAUSED (debugger-statement)
+PAUSE AT entryComplexStatement:46:5
+     42    
+     43    function entryComplexStatement() {
+     44        var x;
+ -&gt;  45        |debugger;
+     46        add(a(), x = 1, b());
+     47    }
+     48    
+
+ACTION: step-over
+PAUSE AT entryComplexStatement:47:5
+     43    function entryComplexStatement() {
+     44        var x;
+     45        debugger;
+ -&gt;  46        |add(a(), x = 1, b());
+     47    }
+     48    
+     49    function entryCommaExpression() {
+
+ACTION: step-in
+PAUSE AT a:12:5
+      8    }
+      9    
+     10    function a() {
+ -&gt;  11        |return 1;
+     12    }
+     13    
+     14    function b() {
+
+ACTION: step-out
+PAUSE AT entryComplexStatement:47:21
+     43    function entryComplexStatement() {
+     44        var x;
+     45        debugger;
+ -&gt;  46        add(a(), x = 1, |b());
+     47    }
+     48    
+     49    function entryCommaExpression() {
+
+ACTION: step-in
+PAUSE AT b:16:5
+     12    }
+     13    
+     14    function b() {
+ -&gt;  15        |return 2;
+     16    }
+     17    
+     18    function entryMultipleStatementsOnOneLine() {
+
+ACTION: step-out
+PAUSE AT entryComplexStatement:47:5
+     43    function entryComplexStatement() {
+     44        var x;
+     45        debugger;
+ -&gt;  46        |add(a(), x = 1, b());
+     47    }
+     48    
+     49    function entryCommaExpression() {
+
+ACTION: resume
+RESUMED
+PASS: Should have used all steps.
+
+-- Running test case: Debugger.stepping.ComplexStatement2
+EXPRESSION: setTimeout(entryCommaExpression)
+STEPS: over, in, out, in, out, in, out, resume
+PAUSED (debugger-statement)
+PAUSE AT entryCommaExpression:51:5
+     47    }
+     48    
+     49    function entryCommaExpression() {
+ -&gt;  50        |debugger;
+     51        a(), b(), a();
+     52    }
+     53    
+
+ACTION: step-over
+PAUSE AT entryCommaExpression:52:5
+     48    
+     49    function entryCommaExpression() {
+     50        debugger;
+ -&gt;  51        |a(), b(), a();
+     52    }
+     53    
+     54    function entryDotPropertyAccessCall() {
+
+ACTION: step-in
+PAUSE AT a:12:5
+      8    }
+      9    
+     10    function a() {
+ -&gt;  11        |return 1;
+     12    }
+     13    
+     14    function b() {
+
+ACTION: step-out
+PAUSE AT entryCommaExpression:52:10
+     48    
+     49    function entryCommaExpression() {
+     50        debugger;
+ -&gt;  51        a(), |b(), a();
+     52    }
+     53    
+     54    function entryDotPropertyAccessCall() {
+
+ACTION: step-in
+PAUSE AT b:16:5
+     12    }
+     13    
+     14    function b() {
+ -&gt;  15        |return 2;
+     16    }
+     17    
+     18    function entryMultipleStatementsOnOneLine() {
+
+ACTION: step-out
+PAUSE AT entryCommaExpression:52:15
+     48    
+     49    function entryCommaExpression() {
+     50        debugger;
+ -&gt;  51        a(), b(), |a();
+     52    }
+     53    
+     54    function entryDotPropertyAccessCall() {
+
+ACTION: step-in
+PAUSE AT a:12:5
+      8    }
+      9    
+     10    function a() {
+ -&gt;  11        |return 1;
+     12    }
+     13    
+     14    function b() {
+
+ACTION: step-out
+PAUSE AT entryCommaExpression:53:2
+     49    function entryCommaExpression() {
+     50        debugger;
+     51        a(), b(), a();
+ -&gt;  52    }|
+     53    
+     54    function entryDotPropertyAccessCall() {
+     55        var o = {x:{x:{a}}};
+
+ACTION: resume
+RESUMED
+PASS: Should have used all steps.
+
+-- Running test case: Debugger.stepping.ComplexStatement3
+EXPRESSION: setTimeout(entryCommaExpression)
+STEPS: over, in, in, in, in, over, over, over, resume
+PAUSED (debugger-statement)
+PAUSE AT entryCommaExpression:51:5
+     47    }
+     48    
+     49    function entryCommaExpression() {
+ -&gt;  50        |debugger;
+     51        a(), b(), a();
+     52    }
+     53    
+
+ACTION: step-over
+PAUSE AT entryCommaExpression:52:5
+     48    
+     49    function entryCommaExpression() {
+     50        debugger;
+ -&gt;  51        |a(), b(), a();
+     52    }
+     53    
+     54    function entryDotPropertyAccessCall() {
+
+ACTION: step-in
+PAUSE AT a:12:5
+      8    }
+      9    
+     10    function a() {
+ -&gt;  11        |return 1;
+     12    }
+     13    
+     14    function b() {
+
+ACTION: step-in
+PAUSE AT a:13:2
+      9    
+     10    function a() {
+     11        return 1;
+ -&gt;  12    }|
+     13    
+     14    function b() {
+     15        return 2;
+
+ACTION: step-in
+PAUSE AT entryCommaExpression:52:10
+     48    
+     49    function entryCommaExpression() {
+     50        debugger;
+ -&gt;  51        a(), |b(), a();
+     52    }
+     53    
+     54    function entryDotPropertyAccessCall() {
+
+ACTION: step-in
+PAUSE AT b:16:5
+     12    }
+     13    
+     14    function b() {
+ -&gt;  15        |return 2;
+     16    }
+     17    
+     18    function entryMultipleStatementsOnOneLine() {
+
+ACTION: step-over
+PAUSE AT b:17:2
+     13    
+     14    function b() {
+     15        return 2;
+ -&gt;  16    }|
+     17    
+     18    function entryMultipleStatementsOnOneLine() {
+     19        debugger;
+
+ACTION: step-over
+PAUSE AT entryCommaExpression:52:15
+     48    
+     49    function entryCommaExpression() {
+     50        debugger;
+ -&gt;  51        a(), b(), |a();
+     52    }
+     53    
+     54    function entryDotPropertyAccessCall() {
+
+ACTION: step-over
+PAUSE AT entryCommaExpression:53:2
+     49    function entryCommaExpression() {
+     50        debugger;
+     51        a(), b(), a();
+ -&gt;  52    }|
+     53    
+     54    function entryDotPropertyAccessCall() {
+     55        var o = {x:{x:{a}}};
+
+ACTION: resume
+RESUMED
+PASS: Should have used all steps.
+
+-- Running test case: Debugger.stepping.ComplexStatement4
+EXPRESSION: setTimeout(entryCommaExpression)
+STEPS: over, over, resume
+PAUSED (debugger-statement)
+PAUSE AT entryCommaExpression:51:5
+     47    }
+     48    
+     49    function entryCommaExpression() {
+ -&gt;  50        |debugger;
+     51        a(), b(), a();
+     52    }
+     53    
+
+ACTION: step-over
+PAUSE AT entryCommaExpression:52:5
+     48    
+     49    function entryCommaExpression() {
+     50        debugger;
+ -&gt;  51        |a(), b(), a();
+     52    }
+     53    
+     54    function entryDotPropertyAccessCall() {
+
+ACTION: step-over
+PAUSE AT entryCommaExpression:53:2
+     49    function entryCommaExpression() {
+     50        debugger;
+     51        a(), b(), a();
+ -&gt;  52    }|
+     53    
+     54    function entryDotPropertyAccessCall() {
+     55        var o = {x:{x:{a}}};
+
+ACTION: resume
+RESUMED
+PASS: Should have used all steps.
+
+-- Running test case: Debugger.stepping.DotPropertyAccessCallStepIn
+EXPRESSION: setTimeout(entryDotPropertyAccessCall)
+STEPS: over, in, out, resume
+PAUSED (debugger-statement)
+PAUSE AT entryDotPropertyAccessCall:57:5
+     53    
+     54    function entryDotPropertyAccessCall() {
+     55        var o = {x:{x:{a}}};
+ -&gt;  56        |debugger;
+     57        o.x.x.a();
+     58    }
+     59    
+
+ACTION: step-over
+PAUSE AT entryDotPropertyAccessCall:58:5
+     54    function entryDotPropertyAccessCall() {
+     55        var o = {x:{x:{a}}};
+     56        debugger;
+ -&gt;  57        |o.x.x.a();
+     58    }
+     59    
+     60    function entryBracketPropertyAccessCall() {
+
+ACTION: step-in
+PAUSE AT a:12:5
+      8    }
+      9    
+     10    function a() {
+ -&gt;  11        |return 1;
+     12    }
+     13    
+     14    function b() {
+
+ACTION: step-out
+PAUSE AT entryDotPropertyAccessCall:59:2
+     55        var o = {x:{x:{a}}};
+     56        debugger;
+     57        o.x.x.a();
+ -&gt;  58    }|
+     59    
+     60    function entryBracketPropertyAccessCall() {
+     61        var o = {x:{x:{a}}};
+
+ACTION: resume
+RESUMED
+PASS: Should have used all steps.
+
+-- Running test case: Debugger.stepping.DotPropertyAccessCallStepOver
+EXPRESSION: setTimeout(entryDotPropertyAccessCall)
+STEPS: over, over, resume
+PAUSED (debugger-statement)
+PAUSE AT entryDotPropertyAccessCall:57:5
+     53    
+     54    function entryDotPropertyAccessCall() {
+     55        var o = {x:{x:{a}}};
+ -&gt;  56        |debugger;
+     57        o.x.x.a();
+     58    }
+     59    
+
+ACTION: step-over
+PAUSE AT entryDotPropertyAccessCall:58:5
+     54    function entryDotPropertyAccessCall() {
+     55        var o = {x:{x:{a}}};
+     56        debugger;
+ -&gt;  57        |o.x.x.a();
+     58    }
+     59    
+     60    function entryBracketPropertyAccessCall() {
+
+ACTION: step-over
+PAUSE AT entryDotPropertyAccessCall:59:2
+     55        var o = {x:{x:{a}}};
+     56        debugger;
+     57        o.x.x.a();
+ -&gt;  58    }|
+     59    
+     60    function entryBracketPropertyAccessCall() {
+     61        var o = {x:{x:{a}}};
+
+ACTION: resume
+RESUMED
+PASS: Should have used all steps.
+
+-- Running test case: Debugger.stepping.BracketPropertyAccessCallStepIn
+EXPRESSION: setTimeout(entryBracketPropertyAccessCall)
+STEPS: over, in, out, resume
+PAUSED (debugger-statement)
+PAUSE AT entryBracketPropertyAccessCall:63:5
+     59    
+     60    function entryBracketPropertyAccessCall() {
+     61        var o = {x:{x:{a}}};
+ -&gt;  62        |debugger;
+     63        o['x']['x']['a']();
+     64    }
+     65    
+
+ACTION: step-over
+PAUSE AT entryBracketPropertyAccessCall:64:5
+     60    function entryBracketPropertyAccessCall() {
+     61        var o = {x:{x:{a}}};
+     62        debugger;
+ -&gt;  63        |o['x']['x']['a']();
+     64    }
+     65    
+     66    function entryUseCall() {
+
+ACTION: step-in
+PAUSE AT a:12:5
+      8    }
+      9    
+     10    function a() {
+ -&gt;  11        |return 1;
+     12    }
+     13    
+     14    function b() {
+
+ACTION: step-out
+PAUSE AT entryBracketPropertyAccessCall:65:2
+     61        var o = {x:{x:{a}}};
+     62        debugger;
+     63        o['x']['x']['a']();
+ -&gt;  64    }|
+     65    
+     66    function entryUseCall() {
+     67        debugger;
+
+ACTION: resume
+RESUMED
+PASS: Should have used all steps.
+
+-- Running test case: Debugger.stepping.FunctionPrototypeCallStepIn
+EXPRESSION: setTimeout(entryUseCall)
+STEPS: over, in, out, resume
+PAUSED (debugger-statement)
+PAUSE AT entryUseCall:68:5
+     64    }
+     65    
+     66    function entryUseCall() {
+ -&gt;  67        |debugger;
+     68        add.call(null, 1, 2);
+     69    }
+     70    
+
+ACTION: step-over
+PAUSE AT entryUseCall:69:5
+     65    
+     66    function entryUseCall() {
+     67        debugger;
+ -&gt;  68        |add.call(null, 1, 2);
+     69    }
+     70    
+     71    function entryUseApply() {
+
+ACTION: step-in
+PAUSE AT add:8:5
+      4    &lt;script src=&quot;../resources/log-pause-location.js&quot;&gt;&lt;/script&gt;
+      5    &lt;script&gt;
+      6    function add(a, b) {
+ -&gt;   7        |return a + b;
+      8    }
+      9    
+     10    function a() {
+
+ACTION: step-out
+PAUSE AT entryUseCall:70:2
+     66    function entryUseCall() {
+     67        debugger;
+     68        add.call(null, 1, 2);
+ -&gt;  69    }|
+     70    
+     71    function entryUseApply() {
+     72        debugger;
+
+ACTION: resume
+RESUMED
+PASS: Should have used all steps.
+
+-- Running test case: Debugger.stepping.FunctionPrototypeApplyStepIn
+EXPRESSION: setTimeout(entryUseApply)
+STEPS: over, in, out, resume
+PAUSED (debugger-statement)
+PAUSE AT entryUseApply:73:5
+     69    }
+     70    
+     71    function entryUseApply() {
+ -&gt;  72        |debugger;
+     73        a.apply(null, [1, 2]);
+     74    }
+     75    
+
+ACTION: step-over
+PAUSE AT entryUseApply:74:5
+     70    
+     71    function entryUseApply() {
+     72        debugger;
+ -&gt;  73        |a.apply(null, [1, 2]);
+     74    }
+     75    
+     76    function entryAnonymousFunctionInvocation() {
+
+ACTION: step-in
+PAUSE AT a:12:5
+      8    }
+      9    
+     10    function a() {
+ -&gt;  11        |return 1;
+     12    }
+     13    
+     14    function b() {
+
+ACTION: step-out
+PAUSE AT entryUseApply:75:2
+     71    function entryUseApply() {
+     72        debugger;
+     73        a.apply(null, [1, 2]);
+ -&gt;  74    }|
+     75    
+     76    function entryAnonymousFunctionInvocation() {
+     77        debugger;
+
+ACTION: resume
+RESUMED
+PASS: Should have used all steps.
+
+-- Running test case: Debugger.stepping.AnonymousFunctionInvocationStepOver
+EXPRESSION: setTimeout(entryAnonymousFunctionInvocation)
+STEPS: over, over, resume
+PAUSED (debugger-statement)
+PAUSE AT entryAnonymousFunctionInvocation:78:5
+     74    }
+     75    
+     76    function entryAnonymousFunctionInvocation() {
+ -&gt;  77        |debugger;
+     78        (function() {
+     79            a();
+     80        })();
+
+ACTION: step-over
+PAUSE AT entryAnonymousFunctionInvocation:79:5
+     75    
+     76    function entryAnonymousFunctionInvocation() {
+     77        debugger;
+ -&gt;  78        |(function() {
+     79            a();
+     80        })();
+     81    }
+
+ACTION: step-over
+PAUSE AT entryAnonymousFunctionInvocation:82:2
+     78        (function() {
+     79            a();
+     80        })();
+ -&gt;  81    }|
+     82    
+     83    function entryFunctionWithConditionalReturn() {
+     84        function testCondition(condition) {
+
+ACTION: resume
+RESUMED
+PASS: Should have used all steps.
+
+-- Running test case: Debugger.stepping.AnonymousFunctionInvocationStepOver
+EXPRESSION: setTimeout(entryAnonymousFunctionInvocation)
+STEPS: over, in, over, in, resume
+PAUSED (debugger-statement)
+PAUSE AT entryAnonymousFunctionInvocation:78:5
+     74    }
+     75    
+     76    function entryAnonymousFunctionInvocation() {
+ -&gt;  77        |debugger;
+     78        (function() {
+     79            a();
+     80        })();
+
+ACTION: step-over
+PAUSE AT entryAnonymousFunctionInvocation:79:5
+     75    
+     76    function entryAnonymousFunctionInvocation() {
+     77        debugger;
+ -&gt;  78        |(function() {
+     79            a();
+     80        })();
+     81    }
+
+ACTION: step-in
+PAUSE AT &lt;anonymous&gt;:80:9
+     76    function entryAnonymousFunctionInvocation() {
+     77        debugger;
+     78        (function() {
+ -&gt;  79            |a();
+     80        })();
+     81    }
+     82    
+
+ACTION: step-over
+PAUSE AT &lt;anonymous&gt;:81:6
+     77        debugger;
+     78        (function() {
+     79            a();
+ -&gt;  80        }|)();
+     81    }
+     82    
+     83    function entryFunctionWithConditionalReturn() {
+
+ACTION: step-in
+PAUSE AT entryAnonymousFunctionInvocation:82:2
+     78        (function() {
+     79            a();
+     80        })();
+ -&gt;  81    }|
+     82    
+     83    function entryFunctionWithConditionalReturn() {
+     84        function testCondition(condition) {
+
+ACTION: resume
+RESUMED
+PASS: Should have used all steps.
+
+-- Running test case: Debugger.stepping.FunctionWithConditionalReturn
+EXPRESSION: setTimeout(entryFunctionWithConditionalReturn)
+STEPS: over, in, in, in, in, in, in, in, in, resume
+PAUSED (debugger-statement)
+PAUSE AT entryFunctionWithConditionalReturn:90:5
+     86                return true;
+     87            return false;
+     88        }
+ -&gt;  89        |debugger;
+     90        testCondition(true);
+     91        testCondition(false);
+     92    }
+
+ACTION: step-over
+PAUSE AT entryFunctionWithConditionalReturn:91:5
+     87            return false;
+     88        }
+     89        debugger;
+ -&gt;  90        |testCondition(true);
+     91        testCondition(false);
+     92    }
+     93    
+
+ACTION: step-in
+PAUSE AT testCondition:86:13
+     82    
+     83    function entryFunctionWithConditionalReturn() {
+     84        function testCondition(condition) {
+ -&gt;  85            if (|condition)
+     86                return true;
+     87            return false;
+     88        }
+
+ACTION: step-in
+PAUSE AT testCondition:87:13
+     83    function entryFunctionWithConditionalReturn() {
+     84        function testCondition(condition) {
+     85            if (condition)
+ -&gt;  86                |return true;
+     87            return false;
+     88        }
+     89        debugger;
+
+ACTION: step-in
+PAUSE AT testCondition:89:6
+     85            if (condition)
+     86                return true;
+     87            return false;
+ -&gt;  88        }|
+     89        debugger;
+     90        testCondition(true);
+     91        testCondition(false);
+
+ACTION: step-in
+PAUSE AT entryFunctionWithConditionalReturn:92:5
+     88        }
+     89        debugger;
+     90        testCondition(true);
+ -&gt;  91        |testCondition(false);
+     92    }
+     93    
+     94    function entryEmptyFunction() {
+
+ACTION: step-in
+PAUSE AT testCondition:86:13
+     82    
+     83    function entryFunctionWithConditionalReturn() {
+     84        function testCondition(condition) {
+ -&gt;  85            if (|condition)
+     86                return true;
+     87            return false;
+     88        }
+
+ACTION: step-in
+PAUSE AT testCondition:88:9
+     84        function testCondition(condition) {
+     85            if (condition)
+     86                return true;
+ -&gt;  87            |return false;
+     88        }
+     89        debugger;
+     90        testCondition(true);
+
+ACTION: step-in
+PAUSE AT testCondition:89:6
+     85            if (condition)
+     86                return true;
+     87            return false;
+ -&gt;  88        }|
+     89        debugger;
+     90        testCondition(true);
+     91        testCondition(false);
+
+ACTION: step-in
+PAUSE AT entryFunctionWithConditionalReturn:93:2
+     89        debugger;
+     90        testCondition(true);
+     91        testCondition(false);
+ -&gt;  92    }|
+     93    
+     94    function entryEmptyFunction() {
+     95        function emptyFunction() { }
+
+ACTION: resume
+RESUMED
+PASS: Should have used all steps.
+
+-- Running test case: Debugger.stepping.EmptyFunction
+EXPRESSION: setTimeout(entryEmptyFunction)
+STEPS: over, in, in, resume
+PAUSED (debugger-statement)
+PAUSE AT entryEmptyFunction:97:5
+     93    
+     94    function entryEmptyFunction() {
+     95        function emptyFunction() { }
+ -&gt;  96        |debugger;
+     97        emptyFunction();
+     98    }
+     99    
+
+ACTION: step-over
+PAUSE AT entryEmptyFunction:98:5
+     94    function entryEmptyFunction() {
+     95        function emptyFunction() { }
+     96        debugger;
+ -&gt;  97        |emptyFunction();
+     98    }
+     99    
+    100    // ---------
+
+ACTION: step-in
+PAUSE AT emptyFunction:96:33
+     92    }
+     93    
+     94    function entryEmptyFunction() {
+ -&gt;  95        function emptyFunction() { }|
+     96        debugger;
+     97        emptyFunction();
+     98    }
+
+ACTION: step-in
+PAUSE AT entryEmptyFunction:99:2
+     95        function emptyFunction() { }
+     96        debugger;
+     97        emptyFunction();
+ -&gt;  98    }|
+     99    
+    100    // ---------
+    101    
+
+ACTION: resume
+RESUMED
+PASS: Should have used all steps.
+
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectordebuggersteppingsteppingfunctioncallshtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/inspector/debugger/stepping/stepping-function-calls.html (0 => 206652)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/debugger/stepping/stepping-function-calls.html                                (rev 0)
+++ trunk/LayoutTests/inspector/debugger/stepping/stepping-function-calls.html        2016-09-30 19:22:37 UTC (rev 206652)
</span><span class="lines">@@ -0,0 +1,466 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../../../http/tests/inspector/resources/inspector-test.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../resources/log-pause-location.js&quot;&gt;&lt;/script&gt;
+&lt;script&gt;
+function add(a, b) {
+    return a + b;
+}
+
+function a() {
+    return 1;
+}
+
+function b() {
+    return 2;
+}
+
+function entryMultipleStatementsOnOneLine() {
+    debugger;
+    a(); b();
+}
+
+function entryMultipleCallsInOneStatement() {
+    debugger;
+    add(a(), b());
+}
+
+function entryMultilineStatement() {
+    debugger;
+    add(
+        a()
+        ,
+        b()
+    );
+}
+
+function entryComplexLine() {
+    var x;
+    debugger;
+    a(); x = 1; b();
+}
+
+function entryComplexStatement() {
+    var x;
+    debugger;
+    add(a(), x = 1, b());
+}
+
+function entryCommaExpression() {
+    debugger;
+    a(), b(), a();
+}
+
+function entryDotPropertyAccessCall() {
+    var o = {x:{x:{a}}};
+    debugger;
+    o.x.x.a();
+}
+
+function entryBracketPropertyAccessCall() {
+    var o = {x:{x:{a}}};
+    debugger;
+    o['x']['x']['a']();
+}
+
+function entryUseCall() {
+    debugger;
+    add.call(null, 1, 2);
+}
+
+function entryUseApply() {
+    debugger;
+    a.apply(null, [1, 2]);
+}
+
+function entryAnonymousFunctionInvocation() {
+    debugger;
+    (function() {
+        a();
+    })();
+}
+
+function entryFunctionWithConditionalReturn() {
+    function testCondition(condition) {
+        if (condition)
+            return true;
+        return false;
+    }
+    debugger;
+    testCondition(true);
+    testCondition(false);
+}
+
+function entryEmptyFunction() {
+    function emptyFunction() { }
+    debugger;
+    emptyFunction();
+}
+
+// ---------
+
+function test()
+{
+    let suite = InspectorTest.createAsyncSuite(&quot;Debugger.stepping.functionCalls&quot;);
+
+    window.initializeSteppingTestSuite(suite);
+
+    addSteppingTestCase({
+        name: &quot;Debugger.stepping.MultipleStatementsOnOneLine1&quot;,
+        description: &quot;Should be able to step in and out through each statement.&quot;,
+        expression: &quot;setTimeout(entryMultipleStatementsOnOneLine)&quot;,
+        // a(); b();
+        steps: [
+            &quot;over&quot;,
+                &quot;in&quot;,  // into a
+                &quot;out&quot;, // out of a
+                &quot;in&quot;,  // into b
+                &quot;out&quot;, // out of b
+            &quot;resume&quot;,
+        ]
+    });
+
+    addSteppingTestCase({
+        name: &quot;Debugger.stepping.MultipleStatementsOnOneLine2&quot;,
+        description: &quot;Should be able to step over through each statement.&quot;,
+        expression: &quot;setTimeout(entryMultipleStatementsOnOneLine)&quot;,
+        // a(); b();
+        steps: [
+            &quot;over&quot;,
+                &quot;over&quot;, // a();
+                &quot;over&quot;, // b();
+            &quot;resume&quot;,
+        ]
+    });
+
+    addSteppingTestCase({
+        name: &quot;Debugger.stepping.MultipleCallsInOneStatement1&quot;,
+        description: &quot;Should be able to step in and out of each function call in the single statement.&quot;,
+        expression: &quot;setTimeout(entryMultipleCallsInOneStatement)&quot;,
+        // add(a(), b())
+        steps: [
+            &quot;over&quot;,
+                &quot;in&quot;,   // into a
+                &quot;out&quot;,  // out of a
+                &quot;in&quot;,   // into b
+                &quot;out&quot;,  // out of b
+                &quot;in&quot;,   // into add
+                &quot;out&quot;,  // out of add
+            &quot;resume&quot;
+        ]
+    });
+
+    addSteppingTestCase({
+        name: &quot;Debugger.stepping.MultipleCallsInOneStatement2&quot;,
+        description: &quot;When stepping over in the middle of a statement complete the statement.&quot;,
+        expression: &quot;setTimeout(entryMultipleCallsInOneStatement)&quot;,
+        // add(a(), b())
+        steps: [
+            &quot;over&quot;,
+                &quot;in&quot;,   // into a
+                &quot;out&quot;,  // out of a
+                &quot;over&quot;, // complete: add(a(), b())
+            &quot;resume&quot;
+        ]
+    });
+
+    addSteppingTestCase({
+        name: &quot;Debugger.stepping.MultipleCallsInOneStatement3&quot;,
+        description: &quot;Should be able to step through each function call in a single statement with stepInto.&quot;,
+        expression: &quot;setTimeout(entryMultipleCallsInOneStatement)&quot;,
+        // add(a(), b())
+        steps: [
+            &quot;over&quot;,
+                &quot;in&quot;, // into a - before return statement
+                &quot;in&quot;, // leaving a
+                &quot;in&quot;, // before b()
+                &quot;in&quot;, // into b - before return statement
+                &quot;in&quot;, // leaving b
+                &quot;in&quot;, // before add()
+                &quot;in&quot;, // into add - before return statement
+                &quot;in&quot;, // leaving add
+                &quot;in&quot;, // back at entryMultipleCallsInOneStatement
+            &quot;resume&quot;
+        ]
+    });
+
+    addSteppingTestCase({
+        name: &quot;Debugger.stepping.MultipleCallsInOneStatement4&quot;,
+        description: &quot;Step out of .&quot;,
+        expression: &quot;setTimeout(entryMultipleCallsInOneStatement)&quot;,
+        // add(a(), b())
+        steps: [
+            &quot;over&quot;,
+                &quot;in&quot;,   // into a - before return statement
+                &quot;over&quot;, // leaving a
+                &quot;over&quot;, // before b()
+                &quot;in&quot;,   // into b - before return statement
+                &quot;over&quot;, // leaving b
+                &quot;over&quot;, // before add()
+                &quot;in&quot;,   // into add - before return statement
+                &quot;over&quot;, // leaving add
+                &quot;over&quot;, // back at entryMultipleCallsInOneStatement
+            &quot;resume&quot;
+        ]
+    });
+
+    addSteppingTestCase({
+        name: &quot;Debugger.stepping.MultipleCallsInOneStatement5&quot;,
+        description: &quot;Should be able to step over a multi-line statement.&quot;,
+        expression: &quot;setTimeout(entryMultilineStatement)&quot;,
+        // add(
+        //     a()
+        //     ,
+        //     b()
+        // );
+        steps: [
+            &quot;over&quot;,
+                &quot;over&quot;, // complete: add(a(), b())
+            &quot;resume&quot;
+        ]
+    });
+
+    addSteppingTestCase({
+        name: &quot;Debugger.stepping.MultipleCallsInOneStatement6&quot;,
+        description: &quot;When stepping over in the middle of a statement complete the statement even if multi-line.&quot;,
+        expression: &quot;setTimeout(entryMultilineStatement)&quot;,
+        // add(
+        //     a()
+        //     ,
+        //     b()
+        // );
+        steps: [
+            &quot;over&quot;,
+                &quot;in&quot;,   // into a
+                &quot;out&quot;,  // out of a
+                &quot;over&quot;, // complete: add(a(), b())
+            &quot;resume&quot;
+        ]
+    });
+
+    addSteppingTestCase({
+        name: &quot;Debugger.stepping.ComplexLine1&quot;,
+        description: &quot;Should be able to step in and out through each statement.&quot;,
+        expression: &quot;setTimeout(entryComplexLine)&quot;,
+        // a(); x = 1; b();
+        steps: [
+            &quot;over&quot;,
+                &quot;in&quot;,  // into a
+                &quot;out&quot;, // out of a - before x = 1
+                &quot;in&quot;,  // x = 1 - before b()
+                &quot;in&quot;,  // into b
+                &quot;out&quot;, // out of b
+            &quot;resume&quot;
+        ]
+    });
+
+    addSteppingTestCase({
+        name: &quot;Debugger.stepping.ComplexLine2&quot;,
+        description: &quot;Should be able to step over through each statement.&quot;,
+        expression: &quot;setTimeout(entryComplexLine)&quot;,
+        // a(); x = 1; b();
+        steps: [
+            &quot;over&quot;,
+                &quot;over&quot;, // a();
+                &quot;over&quot;, // x = 1
+                &quot;over&quot;, // b();
+            &quot;resume&quot;
+        ]
+    });
+
+    addSteppingTestCase({
+        name: &quot;Debugger.stepping.ComplexStatement1&quot;,
+        description: &quot;Should be able to step in and out through each statement.&quot;,
+        expression: &quot;setTimeout(entryComplexStatement)&quot;,
+        // add(a(), x = 1, b());
+        steps: [
+            &quot;over&quot;,
+                &quot;in&quot;,  // into a
+                &quot;out&quot;, // out of a
+                       // FIXME: Opportunity to pause at assignment expressions.
+                &quot;in&quot;,  // into b
+                &quot;out&quot;, // out of b
+            &quot;resume&quot;
+        ]
+    });
+
+    addSteppingTestCase({
+        name: &quot;Debugger.stepping.ComplexStatement2&quot;,
+        description: &quot;Should be able to step in and out through each statement.&quot;,
+        expression: &quot;setTimeout(entryCommaExpression)&quot;,
+        // a(), b(), a();
+        steps: [
+            &quot;over&quot;,
+                &quot;in&quot;,  // into a
+                &quot;out&quot;, // out of a
+                &quot;in&quot;,  // into b
+                &quot;out&quot;, // out of b
+                &quot;in&quot;,  // into a
+                &quot;out&quot;, // out of a
+            &quot;resume&quot;
+        ]
+    });
+
+    addSteppingTestCase({
+        name: &quot;Debugger.stepping.ComplexStatement3&quot;,
+        description: &quot;Should be able to step in and out through each statement.&quot;,
+        expression: &quot;setTimeout(entryCommaExpression)&quot;,
+        // a(), b(), a();
+        steps: [
+            &quot;over&quot;,
+                &quot;in&quot;,   // into a - before return
+                &quot;in&quot;,   // leaving a
+                &quot;in&quot;,   // before b()
+                &quot;in&quot;,   // into b - before return
+                &quot;over&quot;, // leaving b
+                &quot;over&quot;, // before a()
+                &quot;over&quot;, // complete: a()
+            &quot;resume&quot;
+        ]
+    });
+
+    addSteppingTestCase({
+        name: &quot;Debugger.stepping.ComplexStatement4&quot;,
+        description: &quot;Should be able to step over the statement.&quot;,
+        expression: &quot;setTimeout(entryCommaExpression)&quot;,
+        // a(), b(), a();
+        steps: [
+            &quot;over&quot;,
+                &quot;over&quot;, // complete: a(), b(), a()
+            &quot;resume&quot;
+        ]
+    });
+
+    addSteppingTestCase({
+        name: &quot;Debugger.stepping.DotPropertyAccessCallStepIn&quot;,
+        description: &quot;Should be able to step into the call.&quot;,
+        expression: &quot;setTimeout(entryDotPropertyAccessCall)&quot;,
+        // o.x.x.a();
+        steps: [
+            &quot;over&quot;,
+                &quot;in&quot;,   // into a
+                &quot;out&quot;,  // out of a
+            &quot;resume&quot;
+        ]
+    });
+
+    addSteppingTestCase({
+        name: &quot;Debugger.stepping.DotPropertyAccessCallStepOver&quot;,
+        description: &quot;Should be able to step over the call.&quot;,
+        expression: &quot;setTimeout(entryDotPropertyAccessCall)&quot;,
+        // o.x.x.a();
+        steps: [
+            &quot;over&quot;,
+                &quot;over&quot;, // complete: o.x.x.a()
+            &quot;resume&quot;
+        ]
+    });
+
+    addSteppingTestCase({
+        name: &quot;Debugger.stepping.BracketPropertyAccessCallStepIn&quot;,
+        description: &quot;Should be able to step into the call.&quot;,
+        expression: &quot;setTimeout(entryBracketPropertyAccessCall)&quot;,
+        // o['x']['x']['a']();
+        steps: [
+            &quot;over&quot;,
+                &quot;in&quot;,   // into a
+                &quot;out&quot;,  // out of a
+            &quot;resume&quot;
+        ]
+    });
+
+    addSteppingTestCase({
+        name: &quot;Debugger.stepping.FunctionPrototypeCallStepIn&quot;,
+        description: &quot;Should be able to step into a call using Function.prototype.call.&quot;,
+        expression: &quot;setTimeout(entryUseCall)&quot;,
+        // add.call(null, 1, 2)
+        steps: [
+            &quot;over&quot;,
+                &quot;in&quot;,   // into a
+                &quot;out&quot;,  // out of a
+            &quot;resume&quot;
+        ]
+    });
+
+    addSteppingTestCase({
+        name: &quot;Debugger.stepping.FunctionPrototypeApplyStepIn&quot;,
+        description: &quot;Should be able to step into a call using Function.prototype.apply.&quot;,
+        expression: &quot;setTimeout(entryUseApply)&quot;,
+        // add.apply(null, [1, 2])
+        steps: [
+            &quot;over&quot;,
+                &quot;in&quot;,   // into a
+                &quot;out&quot;,  // out of a
+            &quot;resume&quot;
+        ]
+    });
+
+    addSteppingTestCase({
+        name: &quot;Debugger.stepping.AnonymousFunctionInvocationStepOver&quot;,
+        description: &quot;Should be able to step into a anonymous function invocation.&quot;,
+        expression: &quot;setTimeout(entryAnonymousFunctionInvocation)&quot;,
+        // (function() { a() })();
+        steps: [
+            &quot;over&quot;,
+                &quot;over&quot;, // complete: (function() { a() })(); - leaving entry
+            &quot;resume&quot;
+        ]
+    });
+
+    addSteppingTestCase({
+        name: &quot;Debugger.stepping.AnonymousFunctionInvocationStepOver&quot;,
+        description: &quot;Should be able to step into a anonymous function invocation.&quot;,
+        expression: &quot;setTimeout(entryAnonymousFunctionInvocation)&quot;,
+        // (function() { a() })();
+        steps: [
+            &quot;over&quot;,
+                &quot;in&quot;,   // into anonymous
+                &quot;over&quot;, // complete: a() - leaving anonymous
+                &quot;in&quot;,   // leaving entry
+            &quot;resume&quot;
+        ]
+    });
+
+    addSteppingTestCase({
+        name: &quot;Debugger.stepping.FunctionWithConditionalReturn&quot;,
+        description: &quot;Step through function with return in the middle of the function.&quot;,
+        expression: &quot;setTimeout(entryFunctionWithConditionalReturn)&quot;,
+        // testCondition(condition) { if (condition) return true; return false; }
+        steps: [
+            &quot;over&quot;,
+                &quot;in&quot;, // into testCondition(true)
+                &quot;in&quot;, // if (condition) [true]
+                &quot;in&quot;, // return true
+                &quot;in&quot;, // leaving testCondition
+                &quot;in&quot;, // into testCondition(false)
+                &quot;in&quot;, // if (condition) [false]
+                &quot;in&quot;, // return false
+                &quot;in&quot;, // leaving testCondition
+            &quot;resume&quot;
+        ]
+    });
+
+    addSteppingTestCase({
+        name: &quot;Debugger.stepping.EmptyFunction&quot;,
+        description: &quot;Step through an empty function should pause at least once.&quot;,
+        expression: &quot;setTimeout(entryEmptyFunction)&quot;,
+        // emptyFunction() { }
+        steps: [
+            &quot;over&quot;,
+                &quot;in&quot;, // into emptyFunction - before leaving emptyFunction
+                &quot;in&quot;, // leaving emptyFunction
+            &quot;resume&quot;
+        ]
+    });
+
+    loadMainPageContent().then(() =&gt; {
+        suite.runTestCasesAndFinish();
+    });
+}
+&lt;/script&gt;
+&lt;/head&gt;
+&lt;body onload=&quot;runTest()&quot;&gt;
+&lt;p&gt;Checking pause locations when stepping in, out, and over statements with function calls.&lt;/p&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectordebuggersteppingsteppingfunctiondefaultparametersexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/inspector/debugger/stepping/stepping-function-default-parameters-expected.txt (0 => 206652)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/debugger/stepping/stepping-function-default-parameters-expected.txt                                (rev 0)
+++ trunk/LayoutTests/inspector/debugger/stepping/stepping-function-default-parameters-expected.txt        2016-09-30 19:22:37 UTC (rev 206652)
</span><span class="lines">@@ -0,0 +1,238 @@
</span><ins>+Checking pause locations when stepping in, out, and over functions with default parameter expressions.
+
+
+== Running test suite: Debugger.stepping.function-default-parameters
+-- Running test case: Debugger.stepping.DefaultParameterExpression
+EXPRESSION: setTimeout(entryDefaultParameterExpression)
+STEPS: over, in, out, in, out, in, out, resume
+PAUSED (debugger-statement)
+PAUSE AT entryDefaultParameterExpression:19:5
+     15        function add(a=1, b=2) {
+     16            return a + b;
+     17        }
+ -&gt;  18        |debugger;
+     19        add();
+     20        add(1);
+     21        add(1, 2);
+
+ACTION: step-over
+PAUSE AT entryDefaultParameterExpression:20:5
+     16            return a + b;
+     17        }
+     18        debugger;
+ -&gt;  19        |add();
+     20        add(1);
+     21        add(1, 2);
+     22    }
+
+ACTION: step-in
+PAUSE AT add:17:9
+     13    
+     14    function entryDefaultParameterExpression() {
+     15        function add(a=1, b=2) {
+ -&gt;  16            |return a + b;
+     17        }
+     18        debugger;
+     19        add();
+
+ACTION: step-out
+PAUSE AT entryDefaultParameterExpression:21:5
+     17        }
+     18        debugger;
+     19        add();
+ -&gt;  20        |add(1);
+     21        add(1, 2);
+     22    }
+     23    
+
+ACTION: step-in
+PAUSE AT add:17:9
+     13    
+     14    function entryDefaultParameterExpression() {
+     15        function add(a=1, b=2) {
+ -&gt;  16            |return a + b;
+     17        }
+     18        debugger;
+     19        add();
+
+ACTION: step-out
+PAUSE AT entryDefaultParameterExpression:22:5
+     18        debugger;
+     19        add();
+     20        add(1);
+ -&gt;  21        |add(1, 2);
+     22    }
+     23    
+     24    function entryDefaultParameterCallExpression() {
+
+ACTION: step-in
+PAUSE AT add:17:9
+     13    
+     14    function entryDefaultParameterExpression() {
+     15        function add(a=1, b=2) {
+ -&gt;  16            |return a + b;
+     17        }
+     18        debugger;
+     19        add();
+
+ACTION: step-out
+PAUSE AT entryDefaultParameterExpression:23:2
+     19        add();
+     20        add(1);
+     21        add(1, 2);
+ -&gt;  22    }|
+     23    
+     24    function entryDefaultParameterCallExpression() {
+     25        function add(x=a(), y=b()) {
+
+ACTION: resume
+RESUMED
+PASS: Should have used all steps.
+
+-- Running test case: Debugger.stepping.DefaultParameterCallExpression
+EXPRESSION: setTimeout(entryDefaultParameterCallExpression)
+STEPS: over, in, in, out, in, out, out, in, in, out, out, in, out, resume
+PAUSED (debugger-statement)
+PAUSE AT entryDefaultParameterCallExpression:29:5
+     25        function add(x=a(), y=b()) {
+     26            return x + y;
+     27        }
+ -&gt;  28        |debugger;
+     29        add();
+     30        add(1);
+     31        add(1, 2);
+
+ACTION: step-over
+PAUSE AT entryDefaultParameterCallExpression:30:5
+     26            return x + y;
+     27        }
+     28        debugger;
+ -&gt;  29        |add();
+     30        add(1);
+     31        add(1, 2);
+     32    }
+
+ACTION: step-in
+PAUSE AT add:26:20
+     22    }
+     23    
+     24    function entryDefaultParameterCallExpression() {
+ -&gt;  25        function add(x=|a(), y=b()) {
+     26            return x + y;
+     27        }
+     28        debugger;
+
+ACTION: step-in
+PAUSE AT a:8:5
+      4    &lt;script src=&quot;../resources/log-pause-location.js&quot;&gt;&lt;/script&gt;
+      5    &lt;script&gt;
+      6    function a() {
+ -&gt;   7        |return 1;
+      8    }
+      9    
+     10    function b() {
+
+ACTION: step-out
+PAUSE AT add:26:27
+     22    }
+     23    
+     24    function entryDefaultParameterCallExpression() {
+ -&gt;  25        function add(x=a(), y=|b()) {
+     26            return x + y;
+     27        }
+     28        debugger;
+
+ACTION: step-in
+PAUSE AT b:12:5
+      8    }
+      9    
+     10    function b() {
+ -&gt;  11        |return 2;
+     12    }
+     13    
+     14    function entryDefaultParameterExpression() {
+
+ACTION: step-out
+PAUSE AT add:27:9
+     23    
+     24    function entryDefaultParameterCallExpression() {
+     25        function add(x=a(), y=b()) {
+ -&gt;  26            |return x + y;
+     27        }
+     28        debugger;
+     29        add();
+
+ACTION: step-out
+PAUSE AT entryDefaultParameterCallExpression:31:5
+     27        }
+     28        debugger;
+     29        add();
+ -&gt;  30        |add(1);
+     31        add(1, 2);
+     32    }
+     33    
+
+ACTION: step-in
+PAUSE AT add:26:27
+     22    }
+     23    
+     24    function entryDefaultParameterCallExpression() {
+ -&gt;  25        function add(x=a(), y=|b()) {
+     26            return x + y;
+     27        }
+     28        debugger;
+
+ACTION: step-in
+PAUSE AT b:12:5
+      8    }
+      9    
+     10    function b() {
+ -&gt;  11        |return 2;
+     12    }
+     13    
+     14    function entryDefaultParameterExpression() {
+
+ACTION: step-out
+PAUSE AT add:27:9
+     23    
+     24    function entryDefaultParameterCallExpression() {
+     25        function add(x=a(), y=b()) {
+ -&gt;  26            |return x + y;
+     27        }
+     28        debugger;
+     29        add();
+
+ACTION: step-out
+PAUSE AT entryDefaultParameterCallExpression:32:5
+     28        debugger;
+     29        add();
+     30        add(1);
+ -&gt;  31        |add(1, 2);
+     32    }
+     33    
+     34    // ---------
+
+ACTION: step-in
+PAUSE AT add:27:9
+     23    
+     24    function entryDefaultParameterCallExpression() {
+     25        function add(x=a(), y=b()) {
+ -&gt;  26            |return x + y;
+     27        }
+     28        debugger;
+     29        add();
+
+ACTION: step-out
+PAUSE AT entryDefaultParameterCallExpression:33:2
+     29        add();
+     30        add(1);
+     31        add(1, 2);
+ -&gt;  32    }|
+     33    
+     34    // ---------
+     35    
+
+ACTION: resume
+RESUMED
+PASS: Should have used all steps.
+
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectordebuggersteppingsteppingfunctiondefaultparametershtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/inspector/debugger/stepping/stepping-function-default-parameters.html (0 => 206652)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/debugger/stepping/stepping-function-default-parameters.html                                (rev 0)
+++ trunk/LayoutTests/inspector/debugger/stepping/stepping-function-default-parameters.html        2016-09-30 19:22:37 UTC (rev 206652)
</span><span class="lines">@@ -0,0 +1,93 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../../../http/tests/inspector/resources/inspector-test.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../resources/log-pause-location.js&quot;&gt;&lt;/script&gt;
+&lt;script&gt;
+function a() {
+    return 1;
+}
+
+function b() {
+    return 2;
+}
+
+function entryDefaultParameterExpression() {
+    function add(a=1, b=2) {
+        return a + b;
+    }
+    debugger;
+    add();
+    add(1);
+    add(1, 2);
+}
+
+function entryDefaultParameterCallExpression() {
+    function add(x=a(), y=b()) {
+        return x + y;
+    }
+    debugger;
+    add();
+    add(1);
+    add(1, 2);
+}
+
+// ---------
+
+function test()
+{
+    let suite = InspectorTest.createAsyncSuite(&quot;Debugger.stepping.function-default-parameters&quot;);
+
+    window.initializeSteppingTestSuite(suite);
+
+    addSteppingTestCase({
+        name: &quot;Debugger.stepping.DefaultParameterExpression&quot;,
+        description: &quot;Should be able to step through arrow functions.&quot;,
+        expression: &quot;setTimeout(entryDefaultParameterExpression)&quot;,
+        steps: [
+            &quot;over&quot;,
+                       // FIXME: Opportunity to pause at assignment expressions.
+                &quot;in&quot;,  // into 1st add
+                &quot;out&quot;, // out of 1st add
+                &quot;in&quot;,  // into 2nd add
+                &quot;out&quot;, // out of 2nd add
+                &quot;in&quot;,  // into 3rd add
+                &quot;out&quot;, // out of 3rd add
+            &quot;resume&quot;,
+        ]
+    });
+
+    addSteppingTestCase({
+        name: &quot;Debugger.stepping.DefaultParameterCallExpression&quot;,
+        description: &quot;Should be able to step through arrow functions.&quot;,
+        expression: &quot;setTimeout(entryDefaultParameterCallExpression)&quot;,
+        steps: [
+            &quot;over&quot;,
+                &quot;in&quot;,  // into 1st add - before a()
+                &quot;in&quot;,  // into a
+                &quot;out&quot;, // out of a - before b()
+                &quot;in&quot;,  // into b
+                &quot;out&quot;, // out of b - before return
+                &quot;out&quot;, // out of 1st add
+
+                &quot;in&quot;,  // into 2nd add - before b()
+                &quot;in&quot;,  // into b
+                &quot;out&quot;, // out of b - before return
+                &quot;out&quot;, // out of 2nd add
+
+                &quot;in&quot;,  // into 3rd add - before return
+                &quot;out&quot;, // out of 3rd add
+            &quot;resume&quot;,
+        ]
+    });
+
+    loadMainPageContent().then(() =&gt; {
+        suite.runTestCasesAndFinish();
+    });
+}
+&lt;/script&gt;
+&lt;/head&gt;
+&lt;body onload=&quot;runTest()&quot;&gt;
+&lt;p&gt;Checking pause locations when stepping in, out, and over functions with default parameter expressions.&lt;/p&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectordebuggersteppingsteppingliteralconstructionexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/inspector/debugger/stepping/stepping-literal-construction-expected.txt (0 => 206652)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/debugger/stepping/stepping-literal-construction-expected.txt                                (rev 0)
+++ trunk/LayoutTests/inspector/debugger/stepping/stepping-literal-construction-expected.txt        2016-09-30 19:22:37 UTC (rev 206652)
</span><span class="lines">@@ -0,0 +1,212 @@
</span><ins>+Checking pause locations when stepping in, out, and over object and array literal construction.
+
+
+== Running test suite: Debugger.stepping.literal-construction
+-- Running test case: Debugger.stepping.ObjectConstructionStepOver
+EXPRESSION: setTimeout(entryObjectConstruction)
+STEPS: over, over, resume
+PAUSED (debugger-statement)
+PAUSE AT entryObjectConstruction:16:5
+     12    }
+     13    
+     14    function entryObjectConstruction() {
+ -&gt;  15        |debugger;
+     16        var o = {
+     17            p1: true,
+     18            p2: a(),
+
+ACTION: step-over
+PAUSE AT entryObjectConstruction:17:5
+     13    
+     14    function entryObjectConstruction() {
+     15        debugger;
+ -&gt;  16        |var o = {
+     17            p1: true,
+     18            p2: a(),
+     19            p3: true,
+
+ACTION: step-over
+PAUSE AT entryObjectConstruction:24:2
+     20            [&quot;p4&quot;]: true,
+     21            [b()]: true,
+     22        };
+ -&gt;  23    }|
+     24    
+     25    function entryArrayConstruction() {
+     26        debugger;
+
+ACTION: resume
+RESUMED
+PASS: Should have used all steps.
+
+-- Running test case: Debugger.stepping.ObjectConstructionStepIn
+EXPRESSION: setTimeout(entryObjectConstruction)
+STEPS: over, in, out, in, out, resume
+PAUSED (debugger-statement)
+PAUSE AT entryObjectConstruction:16:5
+     12    }
+     13    
+     14    function entryObjectConstruction() {
+ -&gt;  15        |debugger;
+     16        var o = {
+     17            p1: true,
+     18            p2: a(),
+
+ACTION: step-over
+PAUSE AT entryObjectConstruction:17:5
+     13    
+     14    function entryObjectConstruction() {
+     15        debugger;
+ -&gt;  16        |var o = {
+     17            p1: true,
+     18            p2: a(),
+     19            p3: true,
+
+ACTION: step-in
+PAUSE AT a:8:5
+      4    &lt;script src=&quot;../resources/log-pause-location.js&quot;&gt;&lt;/script&gt;
+      5    &lt;script&gt;
+      6    function a() {
+ -&gt;   7        |return 1;
+      8    }
+      9    
+     10    function b() {
+
+ACTION: step-out
+PAUSE AT entryObjectConstruction:22:10
+     18            p2: a(),
+     19            p3: true,
+     20            [&quot;p4&quot;]: true,
+ -&gt;  21            [|b()]: true,
+     22        };
+     23    }
+     24    
+
+ACTION: step-in
+PAUSE AT b:12:5
+      8    }
+      9    
+     10    function b() {
+ -&gt;  11        |return 2;
+     12    }
+     13    
+     14    function entryObjectConstruction() {
+
+ACTION: step-out
+PAUSE AT entryObjectConstruction:24:2
+     20            [&quot;p4&quot;]: true,
+     21            [b()]: true,
+     22        };
+ -&gt;  23    }|
+     24    
+     25    function entryArrayConstruction() {
+     26        debugger;
+
+ACTION: resume
+RESUMED
+PASS: Should have used all steps.
+
+-- Running test case: Debugger.stepping.ArrayConstructionStepOver
+EXPRESSION: setTimeout(entryArrayConstruction)
+STEPS: over, over, resume
+PAUSED (debugger-statement)
+PAUSE AT entryArrayConstruction:27:5
+     23    }
+     24    
+     25    function entryArrayConstruction() {
+ -&gt;  26        |debugger;
+     27        var arr = [
+     28            true,
+     29            a(),
+
+ACTION: step-over
+PAUSE AT entryArrayConstruction:28:5
+     24    
+     25    function entryArrayConstruction() {
+     26        debugger;
+ -&gt;  27        |var arr = [
+     28            true,
+     29            a(),
+     30            true,
+
+ACTION: step-over
+PAUSE AT entryArrayConstruction:34:2
+     30            true,
+     31            b(),
+     32        ];
+ -&gt;  33    }|
+     34    
+     35    // ---------
+     36    
+
+ACTION: resume
+RESUMED
+PASS: Should have used all steps.
+
+-- Running test case: Debugger.stepping.ArrayConstructionStepIn
+EXPRESSION: setTimeout(entryArrayConstruction)
+STEPS: over, in, out, in, out, resume
+PAUSED (debugger-statement)
+PAUSE AT entryArrayConstruction:27:5
+     23    }
+     24    
+     25    function entryArrayConstruction() {
+ -&gt;  26        |debugger;
+     27        var arr = [
+     28            true,
+     29            a(),
+
+ACTION: step-over
+PAUSE AT entryArrayConstruction:28:5
+     24    
+     25    function entryArrayConstruction() {
+     26        debugger;
+ -&gt;  27        |var arr = [
+     28            true,
+     29            a(),
+     30            true,
+
+ACTION: step-in
+PAUSE AT a:8:5
+      4    &lt;script src=&quot;../resources/log-pause-location.js&quot;&gt;&lt;/script&gt;
+      5    &lt;script&gt;
+      6    function a() {
+ -&gt;   7        |return 1;
+      8    }
+      9    
+     10    function b() {
+
+ACTION: step-out
+PAUSE AT entryArrayConstruction:32:9
+     28            true,
+     29            a(),
+     30            true,
+ -&gt;  31            |b(),
+     32        ];
+     33    }
+     34    
+
+ACTION: step-in
+PAUSE AT b:12:5
+      8    }
+      9    
+     10    function b() {
+ -&gt;  11        |return 2;
+     12    }
+     13    
+     14    function entryObjectConstruction() {
+
+ACTION: step-out
+PAUSE AT entryArrayConstruction:34:2
+     30            true,
+     31            b(),
+     32        ];
+ -&gt;  33    }|
+     34    
+     35    // ---------
+     36    
+
+ACTION: resume
+RESUMED
+PASS: Should have used all steps.
+
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectordebuggersteppingsteppingliteralconstructionhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/inspector/debugger/stepping/stepping-literal-construction.html (0 => 206652)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/debugger/stepping/stepping-literal-construction.html                                (rev 0)
+++ trunk/LayoutTests/inspector/debugger/stepping/stepping-literal-construction.html        2016-09-30 19:22:37 UTC (rev 206652)
</span><span class="lines">@@ -0,0 +1,103 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../../../http/tests/inspector/resources/inspector-test.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../resources/log-pause-location.js&quot;&gt;&lt;/script&gt;
+&lt;script&gt;
+function a() {
+    return 1;
+}
+
+function b() {
+    return 2;
+}
+
+function entryObjectConstruction() {
+    debugger;
+    var o = {
+        p1: true,
+        p2: a(),
+        p3: true,
+        [&quot;p4&quot;]: true,
+        [b()]: true,
+    };
+}
+
+function entryArrayConstruction() {
+    debugger;
+    var arr = [
+        true,
+        a(),
+        true,
+        b(),
+    ];
+}
+
+// ---------
+
+function test()
+{
+    let suite = InspectorTest.createAsyncSuite(&quot;Debugger.stepping.literal-construction&quot;);
+
+    window.initializeSteppingTestSuite(suite);
+
+    addSteppingTestCase({
+        name: &quot;Debugger.stepping.ObjectConstructionStepOver&quot;,
+        description: &quot;Should be able to step over object construction.&quot;,
+        expression: &quot;setTimeout(entryObjectConstruction)&quot;,
+        steps: [
+            &quot;over&quot;,
+                &quot;over&quot;, // complete statement - leaving entry
+            &quot;resume&quot;,
+        ]
+    });
+
+    addSteppingTestCase({
+        name: &quot;Debugger.stepping.ObjectConstructionStepIn&quot;,
+        description: &quot;Should be able to step through object literal construction.&quot;,
+        expression: &quot;setTimeout(entryObjectConstruction)&quot;,
+        steps: [
+            &quot;over&quot;,
+                &quot;in&quot;,  // into a for p2
+                &quot;out&quot;, // out of a - before b()
+                &quot;in&quot;,  // into b for computed property
+                &quot;out&quot;, // out of b - leaving entry
+            &quot;resume&quot;,
+        ]
+    });
+
+    addSteppingTestCase({
+        name: &quot;Debugger.stepping.ArrayConstructionStepOver&quot;,
+        description: &quot;Should be able to step over array literal construction.&quot;,
+        expression: &quot;setTimeout(entryArrayConstruction)&quot;,
+        steps: [
+            &quot;over&quot;,
+                &quot;over&quot;, // complete statement - leaving entry
+            &quot;resume&quot;,
+        ]
+    });
+
+    addSteppingTestCase({
+        name: &quot;Debugger.stepping.ArrayConstructionStepIn&quot;,
+        description: &quot;Should be able to step through array literal construction.&quot;,
+        expression: &quot;setTimeout(entryArrayConstruction)&quot;,
+        steps: [
+            &quot;over&quot;,
+                &quot;in&quot;,  // into a
+                &quot;out&quot;, // out of a - before b()
+                &quot;in&quot;,  // into b
+                &quot;out&quot;, // out of b - leaving entry
+            &quot;resume&quot;,
+        ]
+    });
+
+    loadMainPageContent().then(() =&gt; {
+        suite.runTestCasesAndFinish();
+    });
+}
+&lt;/script&gt;
+&lt;/head&gt;
+&lt;body onload=&quot;runTest()&quot;&gt;
+&lt;p&gt;Checking pause locations when stepping in, out, and over object and array literal construction.&lt;/p&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectordebuggersteppingsteppingloopsexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/inspector/debugger/stepping/stepping-loops-expected.txt (0 => 206652)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/debugger/stepping/stepping-loops-expected.txt                                (rev 0)
+++ trunk/LayoutTests/inspector/debugger/stepping/stepping-loops-expected.txt        2016-09-30 19:22:37 UTC (rev 206652)
</span><span class="lines">@@ -0,0 +1,817 @@
</span><ins>+Checking pause locations when stepping in, out, and over in loops.
+
+
+== Running test suite: Debugger.stepping.loops
+-- Running test case: Debugger.stepping.While
+EXPRESSION: setTimeout(entryWhile)
+STEPS: over, over, over, over, over, over, resume
+PAUSED (debugger-statement)
+PAUSE AT entryWhile:13:5
+      9    
+     10    function entryWhile() {
+     11        let i = 2;
+ -&gt;  12        |debugger;
+     13        while (i &gt; 0)
+     14            --i;
+     15    }
+
+ACTION: step-over
+PAUSE AT entryWhile:14:12
+     10    function entryWhile() {
+     11        let i = 2;
+     12        debugger;
+ -&gt;  13        while (|i &gt; 0)
+     14            --i;
+     15    }
+     16    
+
+ACTION: step-over
+PAUSE AT entryWhile:15:9
+     11        let i = 2;
+     12        debugger;
+     13        while (i &gt; 0)
+ -&gt;  14            |--i;
+     15    }
+     16    
+     17    function entryDoWhile() {
+
+ACTION: step-over
+PAUSE AT entryWhile:14:12
+     10    function entryWhile() {
+     11        let i = 2;
+     12        debugger;
+ -&gt;  13        while (|i &gt; 0)
+     14            --i;
+     15    }
+     16    
+
+ACTION: step-over
+PAUSE AT entryWhile:15:9
+     11        let i = 2;
+     12        debugger;
+     13        while (i &gt; 0)
+ -&gt;  14            |--i;
+     15    }
+     16    
+     17    function entryDoWhile() {
+
+ACTION: step-over
+PAUSE AT entryWhile:14:12
+     10    function entryWhile() {
+     11        let i = 2;
+     12        debugger;
+ -&gt;  13        while (|i &gt; 0)
+     14            --i;
+     15    }
+     16    
+
+ACTION: step-over
+PAUSE AT entryWhile:16:2
+     12        debugger;
+     13        while (i &gt; 0)
+     14            --i;
+ -&gt;  15    }|
+     16    
+     17    function entryDoWhile() {
+     18        let i = 2;
+
+ACTION: resume
+RESUMED
+PASS: Should have used all steps.
+
+-- Running test case: Debugger.stepping.DoWhile
+EXPRESSION: setTimeout(entryDoWhile)
+STEPS: over, over, over, over, over, resume
+PAUSED (debugger-statement)
+PAUSE AT entryDoWhile:20:5
+     16    
+     17    function entryDoWhile() {
+     18        let i = 2;
+ -&gt;  19        |debugger;
+     20        do {
+     21            --i;
+     22        } while (i &gt; 0);
+
+ACTION: step-over
+PAUSE AT entryDoWhile:22:9
+     18        let i = 2;
+     19        debugger;
+     20        do {
+ -&gt;  21            |--i;
+     22        } while (i &gt; 0);
+     23    }
+     24    
+
+ACTION: step-over
+PAUSE AT entryDoWhile:23:14
+     19        debugger;
+     20        do {
+     21            --i;
+ -&gt;  22        } while (|i &gt; 0);
+     23    }
+     24    
+     25    function entryTraditionalFor() {
+
+ACTION: step-over
+PAUSE AT entryDoWhile:22:9
+     18        let i = 2;
+     19        debugger;
+     20        do {
+ -&gt;  21            |--i;
+     22        } while (i &gt; 0);
+     23    }
+     24    
+
+ACTION: step-over
+PAUSE AT entryDoWhile:23:14
+     19        debugger;
+     20        do {
+     21            --i;
+ -&gt;  22        } while (|i &gt; 0);
+     23    }
+     24    
+     25    function entryTraditionalFor() {
+
+ACTION: step-over
+PAUSE AT entryDoWhile:24:2
+     20        do {
+     21            --i;
+     22        } while (i &gt; 0);
+ -&gt;  23    }|
+     24    
+     25    function entryTraditionalFor() {
+     26        debugger;
+
+ACTION: resume
+RESUMED
+PASS: Should have used all steps.
+
+-- Running test case: Debugger.stepping.TraditionalForStepOver
+EXPRESSION: setTimeout(entryTraditionalFor)
+STEPS: over, over, over, over, over, over, over, over, resume
+PAUSED (debugger-statement)
+PAUSE AT entryTraditionalFor:27:5
+     23    }
+     24    
+     25    function entryTraditionalFor() {
+ -&gt;  26        |debugger;
+     27        for (let i = 0; i &lt; 2; ++i)
+     28            a();
+     29    }
+
+ACTION: step-over
+PAUSE AT entryTraditionalFor:28:10
+     24    
+     25    function entryTraditionalFor() {
+     26        debugger;
+ -&gt;  27        for (|let i = 0; i &lt; 2; ++i)
+     28            a();
+     29    }
+     30    
+
+ACTION: step-over
+PAUSE AT entryTraditionalFor:29:9
+     25    function entryTraditionalFor() {
+     26        debugger;
+     27        for (let i = 0; i &lt; 2; ++i)
+ -&gt;  28            |a();
+     29    }
+     30    
+     31    function entryTraditionalForNoInit() {
+
+ACTION: step-over
+PAUSE AT entryTraditionalFor:28:31
+     24    
+     25    function entryTraditionalFor() {
+     26        debugger;
+ -&gt;  27        for (let i = 0; i &lt; 2; ++i|)
+     28            a();
+     29    }
+     30    
+
+ACTION: step-over
+PAUSE AT entryTraditionalFor:28:21
+     24    
+     25    function entryTraditionalFor() {
+     26        debugger;
+ -&gt;  27        for (let i = 0; |i &lt; 2; ++i)
+     28            a();
+     29    }
+     30    
+
+ACTION: step-over
+PAUSE AT entryTraditionalFor:29:9
+     25    function entryTraditionalFor() {
+     26        debugger;
+     27        for (let i = 0; i &lt; 2; ++i)
+ -&gt;  28            |a();
+     29    }
+     30    
+     31    function entryTraditionalForNoInit() {
+
+ACTION: step-over
+PAUSE AT entryTraditionalFor:28:31
+     24    
+     25    function entryTraditionalFor() {
+     26        debugger;
+ -&gt;  27        for (let i = 0; i &lt; 2; ++i|)
+     28            a();
+     29    }
+     30    
+
+ACTION: step-over
+PAUSE AT entryTraditionalFor:28:21
+     24    
+     25    function entryTraditionalFor() {
+     26        debugger;
+ -&gt;  27        for (let i = 0; |i &lt; 2; ++i)
+     28            a();
+     29    }
+     30    
+
+ACTION: step-over
+PAUSE AT entryTraditionalFor:30:2
+     26        debugger;
+     27        for (let i = 0; i &lt; 2; ++i)
+     28            a();
+ -&gt;  29    }|
+     30    
+     31    function entryTraditionalForNoInit() {
+     32        let i = 0;
+
+ACTION: resume
+RESUMED
+PASS: Should have used all steps.
+
+-- Running test case: Debugger.stepping.TraditionalForStepIn
+EXPRESSION: setTimeout(entryTraditionalFor)
+STEPS: over, in, in, over, in, in, over, in, in, resume
+PAUSED (debugger-statement)
+PAUSE AT entryTraditionalFor:27:5
+     23    }
+     24    
+     25    function entryTraditionalFor() {
+ -&gt;  26        |debugger;
+     27        for (let i = 0; i &lt; 2; ++i)
+     28            a();
+     29    }
+
+ACTION: step-over
+PAUSE AT entryTraditionalFor:28:10
+     24    
+     25    function entryTraditionalFor() {
+     26        debugger;
+ -&gt;  27        for (|let i = 0; i &lt; 2; ++i)
+     28            a();
+     29    }
+     30    
+
+ACTION: step-in
+PAUSE AT entryTraditionalFor:28:21
+     24    
+     25    function entryTraditionalFor() {
+     26        debugger;
+ -&gt;  27        for (let i = 0; |i &lt; 2; ++i)
+     28            a();
+     29    }
+     30    
+
+ACTION: step-in
+PAUSE AT entryTraditionalFor:29:9
+     25    function entryTraditionalFor() {
+     26        debugger;
+     27        for (let i = 0; i &lt; 2; ++i)
+ -&gt;  28            |a();
+     29    }
+     30    
+     31    function entryTraditionalForNoInit() {
+
+ACTION: step-over
+PAUSE AT entryTraditionalFor:28:31
+     24    
+     25    function entryTraditionalFor() {
+     26        debugger;
+ -&gt;  27        for (let i = 0; i &lt; 2; ++i|)
+     28            a();
+     29    }
+     30    
+
+ACTION: step-in
+PAUSE AT entryTraditionalFor:28:21
+     24    
+     25    function entryTraditionalFor() {
+     26        debugger;
+ -&gt;  27        for (let i = 0; |i &lt; 2; ++i)
+     28            a();
+     29    }
+     30    
+
+ACTION: step-in
+PAUSE AT entryTraditionalFor:29:9
+     25    function entryTraditionalFor() {
+     26        debugger;
+     27        for (let i = 0; i &lt; 2; ++i)
+ -&gt;  28            |a();
+     29    }
+     30    
+     31    function entryTraditionalForNoInit() {
+
+ACTION: step-over
+PAUSE AT entryTraditionalFor:28:31
+     24    
+     25    function entryTraditionalFor() {
+     26        debugger;
+ -&gt;  27        for (let i = 0; i &lt; 2; ++i|)
+     28            a();
+     29    }
+     30    
+
+ACTION: step-in
+PAUSE AT entryTraditionalFor:28:21
+     24    
+     25    function entryTraditionalFor() {
+     26        debugger;
+ -&gt;  27        for (let i = 0; |i &lt; 2; ++i)
+     28            a();
+     29    }
+     30    
+
+ACTION: step-in
+PAUSE AT entryTraditionalFor:30:2
+     26        debugger;
+     27        for (let i = 0; i &lt; 2; ++i)
+     28            a();
+ -&gt;  29    }|
+     30    
+     31    function entryTraditionalForNoInit() {
+     32        let i = 0;
+
+ACTION: resume
+RESUMED
+PASS: Should have used all steps.
+
+-- Running test case: Debugger.stepping.TraditionalForNoInit
+EXPRESSION: setTimeout(entryTraditionalForNoInit)
+STEPS: over, in, over, in, in, over, in, in, resume
+PAUSED (debugger-statement)
+PAUSE AT entryTraditionalForNoInit:34:5
+     30    
+     31    function entryTraditionalForNoInit() {
+     32        let i = 0;
+ -&gt;  33        |debugger;
+     34        for (; i &lt; 2; ++i)
+     35            a();
+     36    }
+
+ACTION: step-over
+PAUSE AT entryTraditionalForNoInit:35:12
+     31    function entryTraditionalForNoInit() {
+     32        let i = 0;
+     33        debugger;
+ -&gt;  34        for (; |i &lt; 2; ++i)
+     35            a();
+     36    }
+     37    
+
+ACTION: step-in
+PAUSE AT entryTraditionalForNoInit:36:9
+     32        let i = 0;
+     33        debugger;
+     34        for (; i &lt; 2; ++i)
+ -&gt;  35            |a();
+     36    }
+     37    
+     38    function entryForIn() {
+
+ACTION: step-over
+PAUSE AT entryTraditionalForNoInit:35:22
+     31    function entryTraditionalForNoInit() {
+     32        let i = 0;
+     33        debugger;
+ -&gt;  34        for (; i &lt; 2; ++i|)
+     35            a();
+     36    }
+     37    
+
+ACTION: step-in
+PAUSE AT entryTraditionalForNoInit:35:12
+     31    function entryTraditionalForNoInit() {
+     32        let i = 0;
+     33        debugger;
+ -&gt;  34        for (; |i &lt; 2; ++i)
+     35            a();
+     36    }
+     37    
+
+ACTION: step-in
+PAUSE AT entryTraditionalForNoInit:36:9
+     32        let i = 0;
+     33        debugger;
+     34        for (; i &lt; 2; ++i)
+ -&gt;  35            |a();
+     36    }
+     37    
+     38    function entryForIn() {
+
+ACTION: step-over
+PAUSE AT entryTraditionalForNoInit:35:22
+     31    function entryTraditionalForNoInit() {
+     32        let i = 0;
+     33        debugger;
+ -&gt;  34        for (; i &lt; 2; ++i|)
+     35            a();
+     36    }
+     37    
+
+ACTION: step-in
+PAUSE AT entryTraditionalForNoInit:35:12
+     31    function entryTraditionalForNoInit() {
+     32        let i = 0;
+     33        debugger;
+ -&gt;  34        for (; |i &lt; 2; ++i)
+     35            a();
+     36    }
+     37    
+
+ACTION: step-in
+PAUSE AT entryTraditionalForNoInit:37:2
+     33        debugger;
+     34        for (; i &lt; 2; ++i)
+     35            a();
+ -&gt;  36    }|
+     37    
+     38    function entryForIn() {
+     39        let o = {key1: 1, key2: 2};
+
+ACTION: resume
+RESUMED
+PASS: Should have used all steps.
+
+-- Running test case: Debugger.stepping.ForIn
+EXPRESSION: setTimeout(entryForIn)
+STEPS: over, over, over, over, over, over, resume
+PAUSED (debugger-statement)
+PAUSE AT entryForIn:41:5
+     37    
+     38    function entryForIn() {
+     39        let o = {key1: 1, key2: 2};
+ -&gt;  40        |debugger;
+     41        for (let property in o)
+     42            a();
+     43    }
+
+ACTION: step-over
+PAUSE AT entryForIn:42:26
+     38    function entryForIn() {
+     39        let o = {key1: 1, key2: 2};
+     40        debugger;
+ -&gt;  41        for (let property in |o)
+     42            a();
+     43    }
+     44    
+
+ACTION: step-over
+PAUSE AT entryForIn:43:9
+     39        let o = {key1: 1, key2: 2};
+     40        debugger;
+     41        for (let property in o)
+ -&gt;  42            |a();
+     43    }
+     44    
+     45    function entryForOf() {
+
+ACTION: step-over
+PAUSE AT entryForIn:42:26
+     38    function entryForIn() {
+     39        let o = {key1: 1, key2: 2};
+     40        debugger;
+ -&gt;  41        for (let property in |o)
+     42            a();
+     43    }
+     44    
+
+ACTION: step-over
+PAUSE AT entryForIn:43:9
+     39        let o = {key1: 1, key2: 2};
+     40        debugger;
+     41        for (let property in o)
+ -&gt;  42            |a();
+     43    }
+     44    
+     45    function entryForOf() {
+
+ACTION: step-over
+PAUSE AT entryForIn:42:26
+     38    function entryForIn() {
+     39        let o = {key1: 1, key2: 2};
+     40        debugger;
+ -&gt;  41        for (let property in |o)
+     42            a();
+     43    }
+     44    
+
+ACTION: step-over
+PAUSE AT entryForIn:44:2
+     40        debugger;
+     41        for (let property in o)
+     42            a();
+ -&gt;  43    }|
+     44    
+     45    function entryForOf() {
+     46        let arr = [1, 2];
+
+ACTION: resume
+RESUMED
+PASS: Should have used all steps.
+
+-- Running test case: Debugger.stepping.ForIn
+EXPRESSION: setTimeout(entryForOf)
+STEPS: over, over, over, over, over, over, resume
+PAUSED (debugger-statement)
+PAUSE AT entryForOf:48:5
+     44    
+     45    function entryForOf() {
+     46        let arr = [1, 2];
+ -&gt;  47        |debugger;
+     48        for (let value of arr)
+     49            a();
+     50    }
+
+ACTION: step-over
+PAUSE AT entryForOf:49:23
+     45    function entryForOf() {
+     46        let arr = [1, 2];
+     47        debugger;
+ -&gt;  48        for (let value of |arr)
+     49            a();
+     50    }
+     51    
+
+ACTION: step-over
+PAUSE AT entryForOf:50:9
+     46        let arr = [1, 2];
+     47        debugger;
+     48        for (let value of arr)
+ -&gt;  49            |a();
+     50    }
+     51    
+     52    function entryWhileBreakContinue() {
+
+ACTION: step-over
+PAUSE AT entryForOf:49:23
+     45    function entryForOf() {
+     46        let arr = [1, 2];
+     47        debugger;
+ -&gt;  48        for (let value of |arr)
+     49            a();
+     50    }
+     51    
+
+ACTION: step-over
+PAUSE AT entryForOf:50:9
+     46        let arr = [1, 2];
+     47        debugger;
+     48        for (let value of arr)
+ -&gt;  49            |a();
+     50    }
+     51    
+     52    function entryWhileBreakContinue() {
+
+ACTION: step-over
+PAUSE AT entryForOf:49:23
+     45    function entryForOf() {
+     46        let arr = [1, 2];
+     47        debugger;
+ -&gt;  48        for (let value of |arr)
+     49            a();
+     50    }
+     51    
+
+ACTION: step-over
+PAUSE AT entryForOf:51:2
+     47        debugger;
+     48        for (let value of arr)
+     49            a();
+ -&gt;  50    }|
+     51    
+     52    function entryWhileBreakContinue() {
+     53        let i = 0;
+
+ACTION: resume
+RESUMED
+PASS: Should have used all steps.
+
+-- Running test case: Debugger.stepping.WhileBreakContinue
+EXPRESSION: setTimeout(entryWhileBreakContinue)
+STEPS: over, over, over, over, over, over, over, over, over, over, resume
+PAUSED (debugger-statement)
+PAUSE AT entryWhileBreakContinue:55:5
+     51    
+     52    function entryWhileBreakContinue() {
+     53        let i = 0;
+ -&gt;  54        |debugger;
+     55        while (true) {
+     56            ++i;
+     57            if (i === 1)
+
+ACTION: step-over
+PAUSE AT entryWhileBreakContinue:56:12
+     52    function entryWhileBreakContinue() {
+     53        let i = 0;
+     54        debugger;
+ -&gt;  55        while (|true) {
+     56            ++i;
+     57            if (i === 1)
+     58                continue;
+
+ACTION: step-over
+PAUSE AT entryWhileBreakContinue:57:9
+     53        let i = 0;
+     54        debugger;
+     55        while (true) {
+ -&gt;  56            |++i;
+     57            if (i === 1)
+     58                continue;
+     59            if (i === 2)
+
+ACTION: step-over
+PAUSE AT entryWhileBreakContinue:58:13
+     54        debugger;
+     55        while (true) {
+     56            ++i;
+ -&gt;  57            if (|i === 1)
+     58                continue;
+     59            if (i === 2)
+     60                break;
+
+ACTION: step-over
+PAUSE AT entryWhileBreakContinue:59:13
+     55        while (true) {
+     56            ++i;
+     57            if (i === 1)
+ -&gt;  58                |continue;
+     59            if (i === 2)
+     60                break;
+     61        }
+
+ACTION: step-over
+PAUSE AT entryWhileBreakContinue:56:12
+     52    function entryWhileBreakContinue() {
+     53        let i = 0;
+     54        debugger;
+ -&gt;  55        while (|true) {
+     56            ++i;
+     57            if (i === 1)
+     58                continue;
+
+ACTION: step-over
+PAUSE AT entryWhileBreakContinue:57:9
+     53        let i = 0;
+     54        debugger;
+     55        while (true) {
+ -&gt;  56            |++i;
+     57            if (i === 1)
+     58                continue;
+     59            if (i === 2)
+
+ACTION: step-over
+PAUSE AT entryWhileBreakContinue:58:13
+     54        debugger;
+     55        while (true) {
+     56            ++i;
+ -&gt;  57            if (|i === 1)
+     58                continue;
+     59            if (i === 2)
+     60                break;
+
+ACTION: step-over
+PAUSE AT entryWhileBreakContinue:60:13
+     56            ++i;
+     57            if (i === 1)
+     58                continue;
+ -&gt;  59            if (|i === 2)
+     60                break;
+     61        }
+     62    }
+
+ACTION: step-over
+PAUSE AT entryWhileBreakContinue:61:13
+     57            if (i === 1)
+     58                continue;
+     59            if (i === 2)
+ -&gt;  60                |break;
+     61        }
+     62    }
+     63    
+
+ACTION: step-over
+PAUSE AT entryWhileBreakContinue:63:2
+     59            if (i === 2)
+     60                break;
+     61        }
+ -&gt;  62    }|
+     63    
+     64    function entryForBreakContinue() {
+     65        let i = 0;
+
+ACTION: resume
+RESUMED
+PASS: Should have used all steps.
+
+-- Running test case: Debugger.stepping.ForBreakContinue
+EXPRESSION: setTimeout(entryForBreakContinue)
+STEPS: over, over, over, over, over, over, over, over, resume
+PAUSED (debugger-statement)
+PAUSE AT entryForBreakContinue:67:5
+     63    
+     64    function entryForBreakContinue() {
+     65        let i = 0;
+ -&gt;  66        |debugger;
+     67        for (;;) {
+     68            ++i;
+     69            if (i === 1)
+
+ACTION: step-over
+PAUSE AT entryForBreakContinue:69:9
+     65        let i = 0;
+     66        debugger;
+     67        for (;;) {
+ -&gt;  68            |++i;
+     69            if (i === 1)
+     70                continue;
+     71            if (i === 2)
+
+ACTION: step-over
+PAUSE AT entryForBreakContinue:70:13
+     66        debugger;
+     67        for (;;) {
+     68            ++i;
+ -&gt;  69            if (|i === 1)
+     70                continue;
+     71            if (i === 2)
+     72                break;
+
+ACTION: step-over
+PAUSE AT entryForBreakContinue:71:13
+     67        for (;;) {
+     68            ++i;
+     69            if (i === 1)
+ -&gt;  70                |continue;
+     71            if (i === 2)
+     72                break;
+     73        }
+
+ACTION: step-over
+PAUSE AT entryForBreakContinue:69:9
+     65        let i = 0;
+     66        debugger;
+     67        for (;;) {
+ -&gt;  68            |++i;
+     69            if (i === 1)
+     70                continue;
+     71            if (i === 2)
+
+ACTION: step-over
+PAUSE AT entryForBreakContinue:70:13
+     66        debugger;
+     67        for (;;) {
+     68            ++i;
+ -&gt;  69            if (|i === 1)
+     70                continue;
+     71            if (i === 2)
+     72                break;
+
+ACTION: step-over
+PAUSE AT entryForBreakContinue:72:13
+     68            ++i;
+     69            if (i === 1)
+     70                continue;
+ -&gt;  71            if (|i === 2)
+     72                break;
+     73        }
+     74    }
+
+ACTION: step-over
+PAUSE AT entryForBreakContinue:73:13
+     69            if (i === 1)
+     70                continue;
+     71            if (i === 2)
+ -&gt;  72                |break;
+     73        }
+     74    }
+     75    
+
+ACTION: step-over
+PAUSE AT entryForBreakContinue:75:2
+     71            if (i === 2)
+     72                break;
+     73        }
+ -&gt;  74    }|
+     75    
+     76    // ---------
+     77    
+
+ACTION: resume
+RESUMED
+PASS: Should have used all steps.
+
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectordebuggersteppingsteppingloopshtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/inspector/debugger/stepping/stepping-loops.html (0 => 206652)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/debugger/stepping/stepping-loops.html                                (rev 0)
+++ trunk/LayoutTests/inspector/debugger/stepping/stepping-loops.html        2016-09-30 19:22:37 UTC (rev 206652)
</span><span class="lines">@@ -0,0 +1,243 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../../../http/tests/inspector/resources/inspector-test.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../resources/log-pause-location.js&quot;&gt;&lt;/script&gt;
+&lt;script&gt;
+function a() {
+    return 1;
+}
+
+function entryWhile() {
+    let i = 2;
+    debugger;
+    while (i &gt; 0)
+        --i;
+}
+
+function entryDoWhile() {
+    let i = 2;
+    debugger;
+    do {
+        --i;
+    } while (i &gt; 0);
+}
+
+function entryTraditionalFor() {
+    debugger;
+    for (let i = 0; i &lt; 2; ++i)
+        a();
+}
+
+function entryTraditionalForNoInit() {
+    let i = 0;
+    debugger;
+    for (; i &lt; 2; ++i)
+        a();
+}
+
+function entryForIn() {
+    let o = {key1: 1, key2: 2};
+    debugger;
+    for (let property in o)
+        a();
+}
+
+function entryForOf() {
+    let arr = [1, 2];
+    debugger;
+    for (let value of arr)
+        a();
+}
+
+function entryWhileBreakContinue() {
+    let i = 0;
+    debugger;
+    while (true) {
+        ++i;
+        if (i === 1)
+            continue;
+        if (i === 2)
+            break;
+    }
+}
+
+function entryForBreakContinue() {
+    let i = 0;
+    debugger;
+    for (;;) {
+        ++i;
+        if (i === 1)
+            continue;
+        if (i === 2)
+            break;
+    }
+}
+
+// ---------
+
+function test()
+{
+    let suite = InspectorTest.createAsyncSuite(&quot;Debugger.stepping.loops&quot;);
+
+    window.initializeSteppingTestSuite(suite);
+
+    addSteppingTestCase({
+        name: &quot;Debugger.stepping.While&quot;,
+        description: &quot;Should be able to step through while loops.&quot;,
+        expression: &quot;setTimeout(entryWhile)&quot;,
+        steps: [
+            &quot;over&quot;,
+                &quot;over&quot;, // complete: while (i &gt; 0) [i=2]
+                &quot;over&quot;, // complete: --i
+                &quot;over&quot;, // complete: while (i &gt; 0) [i=1]
+                &quot;over&quot;, // complete: --i
+                &quot;over&quot;, // complete: while (i &gt; 0) [i=0] - leaving entry
+            &quot;resume&quot;,
+        ]
+    });
+
+    addSteppingTestCase({
+        name: &quot;Debugger.stepping.DoWhile&quot;,
+        description: &quot;Should be able to step through do/while loops.&quot;,
+        expression: &quot;setTimeout(entryDoWhile)&quot;,
+        steps: [
+            &quot;over&quot;,
+                &quot;over&quot;, // complete: --i
+                &quot;over&quot;, // complete: while (i &gt; 0) [i=1]
+                &quot;over&quot;, // complete: --i
+                &quot;over&quot;, // complete: while (i &gt; 0) [i=0] - leaving entry
+            &quot;resume&quot;,
+        ]
+    });
+
+    addSteppingTestCase({
+        name: &quot;Debugger.stepping.TraditionalForStepOver&quot;,
+        description: &quot;Should be able to step over init and condition in traditional for loops.&quot;,
+        expression: &quot;setTimeout(entryTraditionalFor)&quot;,
+        steps: [
+            &quot;over&quot;,
+                &quot;over&quot;, // complete: let i = 0; i &lt; 2
+                &quot;over&quot;, // complete: a()
+                &quot;over&quot;, // complete: ++i
+                &quot;over&quot;, // complete: i &lt; 2 [i=1]
+                &quot;over&quot;, // complete: a()
+                &quot;over&quot;, // complete: ++i
+                &quot;over&quot;, // complete: i &lt; 2 [i=2] - leaving entry
+            &quot;resume&quot;,
+        ]
+    });
+
+    addSteppingTestCase({
+        name: &quot;Debugger.stepping.TraditionalForStepIn&quot;,
+        description: &quot;Should be able to step into init and condition of traditional for loops.&quot;,
+        expression: &quot;setTimeout(entryTraditionalFor)&quot;,
+        steps: [
+            &quot;over&quot;,
+                &quot;in&quot;,   // complete: let i = 0
+                &quot;in&quot;,   // complete: i &lt; 2 [i=0]
+                &quot;over&quot;, // complete: a()
+                &quot;in&quot;,   // complete: ++i
+                &quot;in&quot;,   // complete: i &lt; 2 [i=1]
+                &quot;over&quot;, // complete: a()
+                &quot;in&quot;,   // complete: ++i
+                &quot;in&quot;,   // complete: i &lt; 2 [i=2] - leaving entry
+            &quot;resume&quot;,
+        ]
+    });
+
+    addSteppingTestCase({
+        name: &quot;Debugger.stepping.TraditionalForNoInit&quot;,
+        description: &quot;Should stop at condition if traditional for does not have initialization expression.&quot;,
+        expression: &quot;setTimeout(entryTraditionalForNoInit)&quot;,
+        steps: [
+            &quot;over&quot;,
+                &quot;in&quot;,   // complete: i &lt; 2 [i=0]
+                &quot;over&quot;, // complete: a()
+                &quot;in&quot;,   // complete: ++i
+                &quot;in&quot;,   // complete: i &lt; 2 [i=1]
+                &quot;over&quot;, // complete: a()
+                &quot;in&quot;,   // complete: ++i
+                &quot;in&quot;,   // complete: i &lt; 2 [i=2] - leaving entry
+            &quot;resume&quot;,
+        ]
+    });
+
+    addSteppingTestCase({
+        name: &quot;Debugger.stepping.ForIn&quot;,
+        description: &quot;Should be able to step through for..in loops.&quot;,
+        expression: &quot;setTimeout(entryForIn)&quot;,
+        steps: [
+            &quot;over&quot;,
+                &quot;over&quot;, // complete: let property in o [key1]
+                &quot;over&quot;, // complete: a()
+                &quot;over&quot;, // complete: let property in o [key2]
+                &quot;over&quot;, // complete: a()
+                &quot;over&quot;, // complete: let property in o [done] - leaving entry
+            &quot;resume&quot;,
+        ]
+    });
+
+    addSteppingTestCase({
+        name: &quot;Debugger.stepping.ForIn&quot;,
+        description: &quot;Should be able to step through for..of loops.&quot;,
+        expression: &quot;setTimeout(entryForOf)&quot;,
+        steps: [
+            &quot;over&quot;,
+                &quot;over&quot;, // complete: let value of arr [1]
+                &quot;over&quot;, // complete: a()
+                &quot;over&quot;, // complete: let value of arr [2]
+                &quot;over&quot;, // complete: a()
+                &quot;over&quot;, // complete: let value of arr [done] - leaving entry
+            &quot;resume&quot;,
+        ]
+    });
+
+    addSteppingTestCase({
+        name: &quot;Debugger.stepping.WhileBreakContinue&quot;,
+        description: &quot;Should be able to step through while with break/continue statements.&quot;,
+        expression: &quot;setTimeout(entryWhileBreakContinue)&quot;,
+        steps: [
+            &quot;over&quot;,
+                &quot;over&quot;, // complete: (true)
+                &quot;over&quot;, // complete: ++i
+                &quot;over&quot;, // complete: (i === 1) [i=1]
+                &quot;over&quot;, // complete: continue
+                &quot;over&quot;, // complete: (true)
+                &quot;over&quot;, // complete: ++i
+                &quot;over&quot;, // complete: (i === 1) [i=2]
+                &quot;over&quot;, // complete: (i === 2) [i=2]
+                &quot;over&quot;, // complete: break - leaving entry
+            &quot;resume&quot;,
+        ]
+    });
+
+    addSteppingTestCase({
+        name: &quot;Debugger.stepping.ForBreakContinue&quot;,
+        description: &quot;Should be able to step through while with break/continue statements.&quot;,
+        expression: &quot;setTimeout(entryForBreakContinue)&quot;,
+        steps: [
+            &quot;over&quot;,
+                        // Step directly into the loop body for `for(;;)`
+                &quot;over&quot;, // complete: ++i
+                &quot;over&quot;, // complete: (i === 1) [i=1]
+                &quot;over&quot;, // complete: continue
+                        // Step loops directly back into the loop body for `for(;;)`
+                &quot;over&quot;, // complete: ++i
+                &quot;over&quot;, // complete: (i === 1) [i=2]
+                &quot;over&quot;, // complete: (i === 2) [i=2]
+                &quot;over&quot;, // complete: break - leaving entry
+            &quot;resume&quot;,
+        ]
+    });
+
+    loadMainPageContent().then(() =&gt; {
+        suite.runTestCasesAndFinish();
+    });
+}
+&lt;/script&gt;
+&lt;/head&gt;
+&lt;body onload=&quot;runTest()&quot;&gt;
+&lt;p&gt;Checking pause locations when stepping in, out, and over in loops.&lt;/p&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectordebuggersteppingsteppingmiscexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/inspector/debugger/stepping/stepping-misc-expected.txt (0 => 206652)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/debugger/stepping/stepping-misc-expected.txt                                (rev 0)
+++ trunk/LayoutTests/inspector/debugger/stepping/stepping-misc-expected.txt        2016-09-30 19:22:37 UTC (rev 206652)
</span><span class="lines">@@ -0,0 +1,493 @@
</span><ins>+Checking pause locations when stepping in, out, and over misc statements.
+
+
+== Running test suite: Debugger.stepping.misc
+-- Running test case: Debugger.stepping.DebuggerStatement
+EXPRESSION: setTimeout(entryDebuggerStatement)
+STEPS: over, in, over, resume
+PAUSED (debugger-statement)
+PAUSE AT entryDebuggerStatement:12:5
+      8    }
+      9    
+     10    function entryDebuggerStatement() {
+ -&gt;  11        |debugger;
+     12        debugger;
+     13        debugger;
+     14    }
+
+ACTION: step-over
+PAUSE AT entryDebuggerStatement:13:5
+      9    
+     10    function entryDebuggerStatement() {
+     11        debugger;
+ -&gt;  12        |debugger;
+     13        debugger;
+     14    }
+     15    
+
+ACTION: step-in
+PAUSE AT entryDebuggerStatement:14:5
+     10    function entryDebuggerStatement() {
+     11        debugger;
+     12        debugger;
+ -&gt;  13        |debugger;
+     14    }
+     15    
+     16    function entryBlockStatement() {
+
+ACTION: step-over
+PAUSE AT entryDebuggerStatement:15:2
+     11        debugger;
+     12        debugger;
+     13        debugger;
+ -&gt;  14    }|
+     15    
+     16    function entryBlockStatement() {
+     17        debugger;
+
+ACTION: resume
+RESUMED
+PASS: Should have used all steps.
+
+-- Running test case: Debugger.stepping.BlockStatement
+EXPRESSION: setTimeout(entryBlockStatement)
+STEPS: over, over, resume
+PAUSED (debugger-statement)
+PAUSE AT entryBlockStatement:18:5
+     14    }
+     15    
+     16    function entryBlockStatement() {
+ -&gt;  17        |debugger;
+     18        {
+     19            let x = 1;
+     20        }
+
+ACTION: step-over
+PAUSE AT entryBlockStatement:20:9
+     16    function entryBlockStatement() {
+     17        debugger;
+     18        {
+ -&gt;  19            |let x = 1;
+     20        }
+     21    }
+     22    
+
+ACTION: step-over
+PAUSE AT entryBlockStatement:22:2
+     18        {
+     19            let x = 1;
+     20        }
+ -&gt;  21    }|
+     22    
+     23    function entryWithStatement() {
+     24        let o = {x:1, y:2};
+
+ACTION: resume
+RESUMED
+PASS: Should have used all steps.
+
+-- Running test case: Debugger.stepping.WithStatement
+EXPRESSION: setTimeout(entryWithStatement)
+STEPS: over, over, over, over, over, resume
+PAUSED (debugger-statement)
+PAUSE AT entryWithStatement:26:5
+     22    
+     23    function entryWithStatement() {
+     24        let o = {x:1, y:2};
+ -&gt;  25        |debugger;
+     26        with (o)
+     27            a();
+     28        with (o) {
+
+ACTION: step-over
+PAUSE AT entryWithStatement:27:11
+     23    function entryWithStatement() {
+     24        let o = {x:1, y:2};
+     25        debugger;
+ -&gt;  26        with (|o)
+     27            a();
+     28        with (o) {
+     29            a();
+
+ACTION: step-over
+PAUSE AT entryWithStatement:28:9
+     24        let o = {x:1, y:2};
+     25        debugger;
+     26        with (o)
+ -&gt;  27            |a();
+     28        with (o) {
+     29            a();
+     30        }
+
+ACTION: step-over
+PAUSE AT entryWithStatement:29:11
+     25        debugger;
+     26        with (o)
+     27            a();
+ -&gt;  28        with (|o) {
+     29            a();
+     30        }
+     31    }
+
+ACTION: step-over
+PAUSE AT entryWithStatement:30:9
+     26        with (o)
+     27            a();
+     28        with (o) {
+ -&gt;  29            |a();
+     30        }
+     31    }
+     32    
+
+ACTION: step-over
+PAUSE AT entryWithStatement:32:2
+     28        with (o) {
+     29            a();
+     30        }
+ -&gt;  31    }|
+     32    
+     33    function entryLabeledStatement() {
+     34        let arr = [];
+
+ACTION: resume
+RESUMED
+PASS: Should have used all steps.
+
+-- Running test case: Debugger.stepping.LabeledStatement
+EXPRESSION: setTimeout(entryLabeledStatement)
+STEPS: over, over, over, resume
+PAUSED (debugger-statement)
+PAUSE AT entryLabeledStatement:36:5
+     32    
+     33    function entryLabeledStatement() {
+     34        let arr = [];
+ -&gt;  35        |debugger;
+     36    label:
+     37        {
+     38            arr.push(1);
+
+ACTION: step-over
+PAUSE AT entryLabeledStatement:39:9
+     35        debugger;
+     36    label:
+     37        {
+ -&gt;  38            |arr.push(1);
+     39            break label;
+     40            arr.push(2);
+     41        }
+
+ACTION: step-over
+PAUSE AT entryLabeledStatement:40:9
+     36    label:
+     37        {
+     38            arr.push(1);
+ -&gt;  39            |break label;
+     40            arr.push(2);
+     41        }
+     42    }
+
+ACTION: step-over
+PAUSE AT entryLabeledStatement:43:2
+     39            break label;
+     40            arr.push(2);
+     41        }
+ -&gt;  42    }|
+     43    
+     44    function entryLabelBreakLoop() {
+     45        debugger;
+
+ACTION: resume
+RESUMED
+PASS: Should have used all steps.
+
+-- Running test case: Debugger.stepping.LabelBreakLoop
+EXPRESSION: setTimeout(entryLabelBreakLoop)
+STEPS: over, in, in, in, over, over, over, over, over, over, over, over, in, in, in, in, in, resume
+PAUSED (debugger-statement)
+PAUSE AT entryLabelBreakLoop:46:5
+     42    }
+     43    
+     44    function entryLabelBreakLoop() {
+ -&gt;  45        |debugger;
+     46    outer:
+     47        for (let i = 0; ; ++i) {
+     48            for (let j = 0; j &lt; 2; ++j) {
+
+ACTION: step-over
+PAUSE AT entryLabelBreakLoop:48:10
+     44    function entryLabelBreakLoop() {
+     45        debugger;
+     46    outer:
+ -&gt;  47        for (|let i = 0; ; ++i) {
+     48            for (let j = 0; j &lt; 2; ++j) {
+     49                if (i === 1 &amp;&amp; j === 0)
+     50                    break outer;
+
+ACTION: step-in
+PAUSE AT entryLabelBreakLoop:49:14
+     45        debugger;
+     46    outer:
+     47        for (let i = 0; ; ++i) {
+ -&gt;  48            for (|let j = 0; j &lt; 2; ++j) {
+     49                if (i === 1 &amp;&amp; j === 0)
+     50                    break outer;
+     51                a();
+
+ACTION: step-in
+PAUSE AT entryLabelBreakLoop:49:25
+     45        debugger;
+     46    outer:
+     47        for (let i = 0; ; ++i) {
+ -&gt;  48            for (let j = 0; |j &lt; 2; ++j) {
+     49                if (i === 1 &amp;&amp; j === 0)
+     50                    break outer;
+     51                a();
+
+ACTION: step-in
+PAUSE AT entryLabelBreakLoop:50:17
+     46    outer:
+     47        for (let i = 0; ; ++i) {
+     48            for (let j = 0; j &lt; 2; ++j) {
+ -&gt;  49                if (|i === 1 &amp;&amp; j === 0)
+     50                    break outer;
+     51                a();
+     52            }
+
+ACTION: step-over
+PAUSE AT entryLabelBreakLoop:52:13
+     48            for (let j = 0; j &lt; 2; ++j) {
+     49                if (i === 1 &amp;&amp; j === 0)
+     50                    break outer;
+ -&gt;  51                |a();
+     52            }
+     53        }
+     54    }
+
+ACTION: step-over
+PAUSE AT entryLabelBreakLoop:49:35
+     45        debugger;
+     46    outer:
+     47        for (let i = 0; ; ++i) {
+ -&gt;  48            for (let j = 0; j &lt; 2; ++j|) {
+     49                if (i === 1 &amp;&amp; j === 0)
+     50                    break outer;
+     51                a();
+
+ACTION: step-over
+PAUSE AT entryLabelBreakLoop:49:25
+     45        debugger;
+     46    outer:
+     47        for (let i = 0; ; ++i) {
+ -&gt;  48            for (let j = 0; |j &lt; 2; ++j) {
+     49                if (i === 1 &amp;&amp; j === 0)
+     50                    break outer;
+     51                a();
+
+ACTION: step-over
+PAUSE AT entryLabelBreakLoop:50:17
+     46    outer:
+     47        for (let i = 0; ; ++i) {
+     48            for (let j = 0; j &lt; 2; ++j) {
+ -&gt;  49                if (|i === 1 &amp;&amp; j === 0)
+     50                    break outer;
+     51                a();
+     52            }
+
+ACTION: step-over
+PAUSE AT entryLabelBreakLoop:52:13
+     48            for (let j = 0; j &lt; 2; ++j) {
+     49                if (i === 1 &amp;&amp; j === 0)
+     50                    break outer;
+ -&gt;  51                |a();
+     52            }
+     53        }
+     54    }
+
+ACTION: step-over
+PAUSE AT entryLabelBreakLoop:49:35
+     45        debugger;
+     46    outer:
+     47        for (let i = 0; ; ++i) {
+ -&gt;  48            for (let j = 0; j &lt; 2; ++j|) {
+     49                if (i === 1 &amp;&amp; j === 0)
+     50                    break outer;
+     51                a();
+
+ACTION: step-over
+PAUSE AT entryLabelBreakLoop:49:25
+     45        debugger;
+     46    outer:
+     47        for (let i = 0; ; ++i) {
+ -&gt;  48            for (let j = 0; |j &lt; 2; ++j) {
+     49                if (i === 1 &amp;&amp; j === 0)
+     50                    break outer;
+     51                a();
+
+ACTION: step-over
+PAUSE AT entryLabelBreakLoop:48:26
+     44    function entryLabelBreakLoop() {
+     45        debugger;
+     46    outer:
+ -&gt;  47        for (let i = 0; ; ++i|) {
+     48            for (let j = 0; j &lt; 2; ++j) {
+     49                if (i === 1 &amp;&amp; j === 0)
+     50                    break outer;
+
+ACTION: step-in
+PAUSE AT entryLabelBreakLoop:49:14
+     45        debugger;
+     46    outer:
+     47        for (let i = 0; ; ++i) {
+ -&gt;  48            for (|let j = 0; j &lt; 2; ++j) {
+     49                if (i === 1 &amp;&amp; j === 0)
+     50                    break outer;
+     51                a();
+
+ACTION: step-in
+PAUSE AT entryLabelBreakLoop:49:25
+     45        debugger;
+     46    outer:
+     47        for (let i = 0; ; ++i) {
+ -&gt;  48            for (let j = 0; |j &lt; 2; ++j) {
+     49                if (i === 1 &amp;&amp; j === 0)
+     50                    break outer;
+     51                a();
+
+ACTION: step-in
+PAUSE AT entryLabelBreakLoop:50:17
+     46    outer:
+     47        for (let i = 0; ; ++i) {
+     48            for (let j = 0; j &lt; 2; ++j) {
+ -&gt;  49                if (|i === 1 &amp;&amp; j === 0)
+     50                    break outer;
+     51                a();
+     52            }
+
+ACTION: step-in
+PAUSE AT entryLabelBreakLoop:51:17
+     47        for (let i = 0; ; ++i) {
+     48            for (let j = 0; j &lt; 2; ++j) {
+     49                if (i === 1 &amp;&amp; j === 0)
+ -&gt;  50                    |break outer;
+     51                a();
+     52            }
+     53        }
+
+ACTION: step-in
+PAUSE AT entryLabelBreakLoop:55:2
+     51                a();
+     52            }
+     53        }
+ -&gt;  54    }|
+     55    
+     56    function entryVariableDeclaration() {
+     57        debugger;
+
+ACTION: resume
+RESUMED
+PASS: Should have used all steps.
+
+-- Running test case: Debugger.stepping.VariableDeclaration
+EXPRESSION: setTimeout(entryVariableDeclaration)
+STEPS: over, in, in, in, resume
+PAUSED (debugger-statement)
+PAUSE AT entryVariableDeclaration:58:5
+     54    }
+     55    
+     56    function entryVariableDeclaration() {
+ -&gt;  57        |debugger;
+     58        var a = 1,
+     59            x = 1;
+     60        let b = 2,
+
+ACTION: step-over
+PAUSE AT entryVariableDeclaration:59:5
+     55    
+     56    function entryVariableDeclaration() {
+     57        debugger;
+ -&gt;  58        |var a = 1,
+     59            x = 1;
+     60        let b = 2,
+     61            y = 2;
+
+ACTION: step-in
+PAUSE AT entryVariableDeclaration:61:5
+     57        debugger;
+     58        var a = 1,
+     59            x = 1;
+ -&gt;  60        |let b = 2,
+     61            y = 2;
+     62        const c = 3,
+     63            z = 3;
+
+ACTION: step-in
+PAUSE AT entryVariableDeclaration:63:5
+     59            x = 1;
+     60        let b = 2,
+     61            y = 2;
+ -&gt;  62        |const c = 3,
+     63            z = 3;
+     64    }
+     65    
+
+ACTION: step-in
+PAUSE AT entryVariableDeclaration:65:2
+     61            y = 2;
+     62        const c = 3,
+     63            z = 3;
+ -&gt;  64    }|
+     65    
+     66    function entryDestructuring() {
+     67        var o = {x:1, y:2};
+
+ACTION: resume
+RESUMED
+PASS: Should have used all steps.
+
+-- Running test case: Debugger.stepping.Destructuring
+EXPRESSION: setTimeout(entryDestructuring)
+STEPS: over, in, in, resume
+PAUSED (debugger-statement)
+PAUSE AT entryDestructuring:70:5
+     66    function entryDestructuring() {
+     67        var o = {x:1, y:2};
+     68        var arr = [1, 2];
+ -&gt;  69        |debugger;
+     70        var {x, y} = o;
+     71        var [w, z] = arr;
+     72    }
+
+ACTION: step-over
+PAUSE AT entryDestructuring:71:5
+     67        var o = {x:1, y:2};
+     68        var arr = [1, 2];
+     69        debugger;
+ -&gt;  70        |var {x, y} = o;
+     71        var [w, z] = arr;
+     72    }
+     73    
+
+ACTION: step-in
+PAUSE AT entryDestructuring:72:5
+     68        var arr = [1, 2];
+     69        debugger;
+     70        var {x, y} = o;
+ -&gt;  71        |var [w, z] = arr;
+     72    }
+     73    
+     74    
+
+ACTION: step-in
+PAUSE AT entryDestructuring:73:2
+     69        debugger;
+     70        var {x, y} = o;
+     71        var [w, z] = arr;
+ -&gt;  72    }|
+     73    
+     74    
+     75    // FIXME: Not Yet Tested
+
+ACTION: resume
+RESUMED
+PASS: Should have used all steps.
+
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectordebuggersteppingsteppingmischtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/inspector/debugger/stepping/stepping-misc.html (0 => 206652)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/debugger/stepping/stepping-misc.html                                (rev 0)
+++ trunk/LayoutTests/inspector/debugger/stepping/stepping-misc.html        2016-09-30 19:22:37 UTC (rev 206652)
</span><span class="lines">@@ -0,0 +1,200 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../../../http/tests/inspector/resources/inspector-test.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../resources/log-pause-location.js&quot;&gt;&lt;/script&gt;
+&lt;script&gt;
+function a() {
+    return 1;
+}
+
+function entryDebuggerStatement() {
+    debugger;
+    debugger;
+    debugger;
+}
+
+function entryBlockStatement() {
+    debugger;
+    {
+        let x = 1;
+    }
+}
+
+function entryWithStatement() {
+    let o = {x:1, y:2};
+    debugger;
+    with (o)
+        a();
+    with (o) {
+        a();
+    }
+}
+
+function entryLabeledStatement() {
+    let arr = [];
+    debugger;
+label:
+    {
+        arr.push(1);
+        break label;
+        arr.push(2);
+    }
+}
+
+function entryLabelBreakLoop() {
+    debugger;
+outer:
+    for (let i = 0; ; ++i) {
+        for (let j = 0; j &lt; 2; ++j) {
+            if (i === 1 &amp;&amp; j === 0)
+                break outer;
+            a();
+        }
+    }
+}
+
+function entryVariableDeclaration() {
+    debugger;
+    var a = 1,
+        x = 1;
+    let b = 2,
+        y = 2;
+    const c = 3,
+        z = 3;
+}
+
+function entryDestructuring() {
+    var o = {x:1, y:2};
+    var arr = [1, 2];
+    debugger;
+    var {x, y} = o;
+    var [w, z] = arr;
+}
+
+
+// FIXME: Not Yet Tested
+// - Iterators
+// - Spread (...)
+// - Generators (function*, yield)
+// - Import / Export statements
+
+// ---------
+
+function test()
+{
+    let suite = InspectorTest.createAsyncSuite(&quot;Debugger.stepping.misc&quot;);
+
+    window.initializeSteppingTestSuite(suite);
+
+    addSteppingTestCase({
+        name: &quot;Debugger.stepping.DebuggerStatement&quot;,
+        description: &quot;Should be able to step through debugger statements.&quot;,
+        expression: &quot;setTimeout(entryDebuggerStatement)&quot;,
+        steps: [
+            &quot;over&quot;,
+                &quot;in&quot;,   // debugger
+                &quot;over&quot;, // debugger
+            &quot;resume&quot;,
+        ]
+    });
+
+    addSteppingTestCase({
+        name: &quot;Debugger.stepping.BlockStatement&quot;,
+        description: &quot;Should be able to step through debugger statements.&quot;,
+        expression: &quot;setTimeout(entryBlockStatement)&quot;,
+        steps: [
+            &quot;over&quot;,
+                &quot;over&quot;, // let x = 1
+            &quot;resume&quot;,
+        ]
+    });
+
+    addSteppingTestCase({
+        name: &quot;Debugger.stepping.WithStatement&quot;,
+        description: &quot;Should be able to step through with statements.&quot;,
+        expression: &quot;setTimeout(entryWithStatement)&quot;,
+        steps: [
+            &quot;over&quot;,
+                &quot;over&quot;, // with (o)
+                &quot;over&quot;, // a()
+                &quot;over&quot;, // with (o)
+                &quot;over&quot;, // a()
+            &quot;resume&quot;,
+        ]
+    });
+
+    addSteppingTestCase({
+        name: &quot;Debugger.stepping.LabeledStatement&quot;,
+        description: &quot;Should be able to step through label statements.&quot;,
+        expression: &quot;setTimeout(entryLabeledStatement)&quot;,
+        steps: [
+            &quot;over&quot;,
+                &quot;over&quot;, // arr.push(1)
+                &quot;over&quot;, // break outer
+            &quot;resume&quot;,
+        ]
+    });
+
+    addSteppingTestCase({
+        name: &quot;Debugger.stepping.LabelBreakLoop&quot;,
+        description: &quot;Should be able to step through loops with break label.&quot;,
+        expression: &quot;setTimeout(entryLabelBreakLoop)&quot;,
+        steps: [
+            &quot;over&quot;,
+                &quot;in&quot;,   // let i = 0 - before inner for
+                &quot;in&quot;,   // let j = 0 - before condition
+                &quot;in&quot;,   // (j &lt; 2) [j=0] - before if
+                &quot;over&quot;, // if [false] - before a()
+                &quot;over&quot;, // a();
+                &quot;over&quot;, // ++j
+                &quot;over&quot;, // (j &lt; 2) [j=1] - before if
+                &quot;over&quot;, // if [false] - before a()
+                &quot;over&quot;, // a();
+                &quot;over&quot;, // ++j
+                &quot;over&quot;, // (j &lt; 2) [j=2] - before ++i
+                &quot;in&quot;,   // ++i - before let j = 0
+                &quot;in&quot;,   // j = 0 - before condition
+                &quot;in&quot;,   // (j &lt; 2) - before if
+                &quot;in&quot;,   // if [true] - before break
+                &quot;in&quot;,   // break - leaving entry
+            &quot;resume&quot;,
+        ]
+    });
+
+    addSteppingTestCase({
+        name: &quot;Debugger.stepping.VariableDeclaration&quot;,
+        description: &quot;Should be able to step through variable declarations.&quot;,
+        expression: &quot;setTimeout(entryVariableDeclaration)&quot;,
+        steps: [
+            &quot;over&quot;,
+                       // FIXME: Opportunity to pause at assignment expressions.
+                &quot;in&quot;,  // a = 1, x = 1
+                &quot;in&quot;,  // b = 2, y = 2
+                &quot;in&quot;,  // c = 3, z = 3
+            &quot;resume&quot;,
+        ]
+    });
+
+    addSteppingTestCase({
+        name: &quot;Debugger.stepping.Destructuring&quot;,
+        description: &quot;Should be able to step through destructuring assignment.&quot;,
+        expression: &quot;setTimeout(entryDestructuring)&quot;,
+        steps: [
+            &quot;over&quot;,
+                &quot;in&quot;,  // var {x, y} = o;
+                &quot;in&quot;,  // var [w, z] = arr
+            &quot;resume&quot;,
+        ]
+    });
+
+    loadMainPageContent().then(() =&gt; {
+        suite.runTestCasesAndFinish();
+    });
+}
+&lt;/script&gt;
+&lt;/head&gt;
+&lt;body onload=&quot;runTest()&quot;&gt;
+&lt;p&gt;Checking pause locations when stepping in, out, and over misc statements.&lt;/p&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectordebuggersteppingsteppingswitchexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/inspector/debugger/stepping/stepping-switch-expected.txt (0 => 206652)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/debugger/stepping/stepping-switch-expected.txt                                (rev 0)
+++ trunk/LayoutTests/inspector/debugger/stepping/stepping-switch-expected.txt        2016-09-30 19:22:37 UTC (rev 206652)
</span><span class="lines">@@ -0,0 +1,396 @@
</span><ins>+Checking pause locations when stepping in, out, and over switch statements.
+
+
+== Running test suite: Debugger.stepping.switch
+-- Running test case: Debugger.stepping.SwitchHitCase
+EXPRESSION: setTimeout(entrySwitchHitCase)
+STEPS: over, in, in, over, over, over, resume
+PAUSED (debugger-statement)
+PAUSE AT entrySwitchHitCase:29:5
+     25    }
+     26    
+     27    function entrySwitchHitCase() {
+ -&gt;  28        |debugger;
+     29        switcher(1);
+     30    }
+     31    
+
+ACTION: step-over
+PAUSE AT entrySwitchHitCase:30:5
+     26    
+     27    function entrySwitchHitCase() {
+     28        debugger;
+ -&gt;  29        |switcher(1);
+     30    }
+     31    
+     32    function entrySwitchFallthrough() {
+
+ACTION: step-in
+PAUSE AT switcher:12:13
+      8    }
+      9    
+     10    function switcher(value) {
+ -&gt;  11        switch (|value) {
+     12        case 1:
+     13            a();
+     14            break;
+
+ACTION: step-in
+PAUSE AT switcher:14:9
+     10    function switcher(value) {
+     11        switch (value) {
+     12        case 1:
+ -&gt;  13            |a();
+     14            break;
+     15        case 2:
+     16            a();
+
+ACTION: step-over
+PAUSE AT switcher:15:9
+     11        switch (value) {
+     12        case 1:
+     13            a();
+ -&gt;  14            |break;
+     15        case 2:
+     16            a();
+     17            // fallthrough
+
+ACTION: step-over
+PAUSE AT switcher:26:2
+     22            a();
+     23            break;
+     24        }
+ -&gt;  25    }|
+     26    
+     27    function entrySwitchHitCase() {
+     28        debugger;
+
+ACTION: step-over
+PAUSE AT entrySwitchHitCase:31:2
+     27    function entrySwitchHitCase() {
+     28        debugger;
+     29        switcher(1);
+ -&gt;  30    }|
+     31    
+     32    function entrySwitchFallthrough() {
+     33        debugger;
+
+ACTION: resume
+RESUMED
+PASS: Should have used all steps.
+
+-- Running test case: Debugger.stepping.SwitchFallthrough
+EXPRESSION: setTimeout(entrySwitchFallthrough)
+STEPS: over, in, in, over, over, over, over, resume
+PAUSED (debugger-statement)
+PAUSE AT entrySwitchFallthrough:34:5
+     30    }
+     31    
+     32    function entrySwitchFallthrough() {
+ -&gt;  33        |debugger;
+     34        switcher(2);
+     35    }
+     36    
+
+ACTION: step-over
+PAUSE AT entrySwitchFallthrough:35:5
+     31    
+     32    function entrySwitchFallthrough() {
+     33        debugger;
+ -&gt;  34        |switcher(2);
+     35    }
+     36    
+     37    function entrySwitchDefault() {
+
+ACTION: step-in
+PAUSE AT switcher:12:13
+      8    }
+      9    
+     10    function switcher(value) {
+ -&gt;  11        switch (|value) {
+     12        case 1:
+     13            a();
+     14            break;
+
+ACTION: step-in
+PAUSE AT switcher:17:9
+     13            a();
+     14            break;
+     15        case 2:
+ -&gt;  16            |a();
+     17            // fallthrough
+     18        case 3:
+     19            a();
+
+ACTION: step-over
+PAUSE AT switcher:20:9
+     16            a();
+     17            // fallthrough
+     18        case 3:
+ -&gt;  19            |a();
+     20            break;
+     21        default:
+     22            a();
+
+ACTION: step-over
+PAUSE AT switcher:21:9
+     17            // fallthrough
+     18        case 3:
+     19            a();
+ -&gt;  20            |break;
+     21        default:
+     22            a();
+     23            break;
+
+ACTION: step-over
+PAUSE AT switcher:26:2
+     22            a();
+     23            break;
+     24        }
+ -&gt;  25    }|
+     26    
+     27    function entrySwitchHitCase() {
+     28        debugger;
+
+ACTION: step-over
+PAUSE AT entrySwitchFallthrough:36:2
+     32    function entrySwitchFallthrough() {
+     33        debugger;
+     34        switcher(2);
+ -&gt;  35    }|
+     36    
+     37    function entrySwitchDefault() {
+     38        debugger;
+
+ACTION: resume
+RESUMED
+PASS: Should have used all steps.
+
+-- Running test case: Debugger.stepping.SwitchDefault
+EXPRESSION: setTimeout(entrySwitchDefault)
+STEPS: over, in, over, over, over, over, resume
+PAUSED (debugger-statement)
+PAUSE AT entrySwitchDefault:39:5
+     35    }
+     36    
+     37    function entrySwitchDefault() {
+ -&gt;  38        |debugger;
+     39        switcher(4);
+     40    }
+     41    
+
+ACTION: step-over
+PAUSE AT entrySwitchDefault:40:5
+     36    
+     37    function entrySwitchDefault() {
+     38        debugger;
+ -&gt;  39        |switcher(4);
+     40    }
+     41    
+     42    function entrySwitchNoCase() {
+
+ACTION: step-in
+PAUSE AT switcher:12:13
+      8    }
+      9    
+     10    function switcher(value) {
+ -&gt;  11        switch (|value) {
+     12        case 1:
+     13            a();
+     14            break;
+
+ACTION: step-over
+PAUSE AT switcher:23:9
+     19            a();
+     20            break;
+     21        default:
+ -&gt;  22            |a();
+     23            break;
+     24        }
+     25    }
+
+ACTION: step-over
+PAUSE AT switcher:24:9
+     20            break;
+     21        default:
+     22            a();
+ -&gt;  23            |break;
+     24        }
+     25    }
+     26    
+
+ACTION: step-over
+PAUSE AT switcher:26:2
+     22            a();
+     23            break;
+     24        }
+ -&gt;  25    }|
+     26    
+     27    function entrySwitchHitCase() {
+     28        debugger;
+
+ACTION: step-over
+PAUSE AT entrySwitchDefault:41:2
+     37    function entrySwitchDefault() {
+     38        debugger;
+     39        switcher(4);
+ -&gt;  40    }|
+     41    
+     42    function entrySwitchNoCase() {
+     43        debugger;
+
+ACTION: resume
+RESUMED
+PASS: Should have used all steps.
+
+-- Running test case: Debugger.stepping.SwitchStepOut
+EXPRESSION: setTimeout(entrySwitchHitCase)
+STEPS: over, in, in, out, resume
+PAUSED (debugger-statement)
+PAUSE AT entrySwitchHitCase:29:5
+     25    }
+     26    
+     27    function entrySwitchHitCase() {
+ -&gt;  28        |debugger;
+     29        switcher(1);
+     30    }
+     31    
+
+ACTION: step-over
+PAUSE AT entrySwitchHitCase:30:5
+     26    
+     27    function entrySwitchHitCase() {
+     28        debugger;
+ -&gt;  29        |switcher(1);
+     30    }
+     31    
+     32    function entrySwitchFallthrough() {
+
+ACTION: step-in
+PAUSE AT switcher:12:13
+      8    }
+      9    
+     10    function switcher(value) {
+ -&gt;  11        switch (|value) {
+     12        case 1:
+     13            a();
+     14            break;
+
+ACTION: step-in
+PAUSE AT switcher:14:9
+     10    function switcher(value) {
+     11        switch (value) {
+     12        case 1:
+ -&gt;  13            |a();
+     14            break;
+     15        case 2:
+     16            a();
+
+ACTION: step-out
+PAUSE AT entrySwitchHitCase:31:2
+     27    function entrySwitchHitCase() {
+     28        debugger;
+     29        switcher(1);
+ -&gt;  30    }|
+     31    
+     32    function entrySwitchFallthrough() {
+     33        debugger;
+
+ACTION: resume
+RESUMED
+PASS: Should have used all steps.
+
+-- Running test case: Debugger.stepping.SwitchNoCaseStepIn
+EXPRESSION: setTimeout(entrySwitchNoCase)
+STEPS: over, in, in, in, resume
+PAUSED (debugger-statement)
+PAUSE AT entrySwitchNoCase:44:5
+     40    }
+     41    
+     42    function entrySwitchNoCase() {
+ -&gt;  43        |debugger;
+     44        switch (a()) {
+     45        case 2:
+     46            a();
+
+ACTION: step-over
+PAUSE AT entrySwitchNoCase:45:13
+     41    
+     42    function entrySwitchNoCase() {
+     43        debugger;
+ -&gt;  44        switch (|a()) {
+     45        case 2:
+     46            a();
+     47            break;
+
+ACTION: step-in
+PAUSE AT a:8:5
+      4    &lt;script src=&quot;../resources/log-pause-location.js&quot;&gt;&lt;/script&gt;
+      5    &lt;script&gt;
+      6    function a() {
+ -&gt;   7        |return 1;
+      8    }
+      9    
+     10    function switcher(value) {
+
+ACTION: step-in
+PAUSE AT a:9:2
+      5    &lt;script&gt;
+      6    function a() {
+      7        return 1;
+ -&gt;   8    }|
+      9    
+     10    function switcher(value) {
+     11        switch (value) {
+
+ACTION: step-in
+PAUSE AT entrySwitchNoCase:50:2
+     46            a();
+     47            break;
+     48        }   
+ -&gt;  49    }|
+     50    
+     51    // ---------
+     52    
+
+ACTION: resume
+RESUMED
+PASS: Should have used all steps.
+
+-- Running test case: Debugger.stepping.SwitchNoCaseStepOver
+EXPRESSION: setTimeout(entrySwitchNoCase)
+STEPS: over, over, resume
+PAUSED (debugger-statement)
+PAUSE AT entrySwitchNoCase:44:5
+     40    }
+     41    
+     42    function entrySwitchNoCase() {
+ -&gt;  43        |debugger;
+     44        switch (a()) {
+     45        case 2:
+     46            a();
+
+ACTION: step-over
+PAUSE AT entrySwitchNoCase:45:13
+     41    
+     42    function entrySwitchNoCase() {
+     43        debugger;
+ -&gt;  44        switch (|a()) {
+     45        case 2:
+     46            a();
+     47            break;
+
+ACTION: step-over
+PAUSE AT entrySwitchNoCase:50:2
+     46            a();
+     47            break;
+     48        }   
+ -&gt;  49    }|
+     50    
+     51    // ---------
+     52    
+
+ACTION: resume
+RESUMED
+PASS: Should have used all steps.
+
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectordebuggersteppingsteppingswitchhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/inspector/debugger/stepping/stepping-switch.html (0 => 206652)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/debugger/stepping/stepping-switch.html                                (rev 0)
+++ trunk/LayoutTests/inspector/debugger/stepping/stepping-switch.html        2016-09-30 19:22:37 UTC (rev 206652)
</span><span class="lines">@@ -0,0 +1,152 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../../../http/tests/inspector/resources/inspector-test.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../resources/log-pause-location.js&quot;&gt;&lt;/script&gt;
+&lt;script&gt;
+function a() {
+    return 1;
+}
+
+function switcher(value) {
+    switch (value) {
+    case 1:
+        a();
+        break;
+    case 2:
+        a();
+        // fallthrough
+    case 3:
+        a();
+        break;
+    default:
+        a();
+        break;
+    }
+}
+
+function entrySwitchHitCase() {
+    debugger;
+    switcher(1);
+}
+
+function entrySwitchFallthrough() {
+    debugger;
+    switcher(2);
+}
+
+function entrySwitchDefault() {
+    debugger;
+    switcher(4);
+}
+
+function entrySwitchNoCase() {
+    debugger;
+    switch (a()) {
+    case 2:
+        a();
+        break;
+    }   
+}
+
+// ---------
+
+function test()
+{
+    let suite = InspectorTest.createAsyncSuite(&quot;Debugger.stepping.switch&quot;);
+
+    window.initializeSteppingTestSuite(suite);
+
+    addSteppingTestCase({
+        name: &quot;Debugger.stepping.SwitchHitCase&quot;,
+        description: &quot;Should be able to step through a switch case.&quot;,
+        expression: &quot;setTimeout(entrySwitchHitCase)&quot;,
+        steps: [
+            &quot;over&quot;,
+                &quot;in&quot;,   // into switcher - before switch
+                &quot;in&quot;,   // into case 1 - before a()
+                &quot;over&quot;, // complete: a();
+                &quot;over&quot;, // complete: break;
+                &quot;over&quot;, // leaving switcher
+            &quot;resume&quot;,
+        ]
+    });
+
+    addSteppingTestCase({
+        name: &quot;Debugger.stepping.SwitchFallthrough&quot;,
+        description: &quot;Should be able to step through a switch case that falls through to another case.&quot;,
+        expression: &quot;setTimeout(entrySwitchFallthrough)&quot;,
+        steps: [
+            &quot;over&quot;,
+                &quot;in&quot;,   // into switcher - before switch
+                &quot;in&quot;,   // into case 2 - before a()
+                &quot;over&quot;, // complete: a(); - before a() in case 3
+                &quot;over&quot;, // complete: a();
+                &quot;over&quot;, // complete: break;
+                &quot;over&quot;, // leaving switcher
+            &quot;resume&quot;,
+        ]
+    });
+
+    addSteppingTestCase({
+        name: &quot;Debugger.stepping.SwitchDefault&quot;,
+        description: &quot;Should be able to step through a switch default case.&quot;,
+        expression: &quot;setTimeout(entrySwitchDefault)&quot;,
+        steps: [
+            &quot;over&quot;,
+                &quot;in&quot;,   // into switcher - before switch
+                &quot;over&quot;, // into default - before a()
+                &quot;over&quot;, // complete: a();
+                &quot;over&quot;, // complete: break;
+                &quot;over&quot;, // leaving switcher
+            &quot;resume&quot;,
+        ]
+    });
+
+    addSteppingTestCase({
+        name: &quot;Debugger.stepping.SwitchStepOut&quot;,
+        description: &quot;Should be able to step out while inside a switch case.&quot;,
+        expression: &quot;setTimeout(entrySwitchHitCase)&quot;,
+        steps: [
+            &quot;over&quot;,
+                &quot;in&quot;,   // into switcher - before switch
+                &quot;in&quot;,   // into case 1 - before a()
+                &quot;out&quot;,  // out of switcher
+            &quot;resume&quot;,
+        ]
+    });
+
+    addSteppingTestCase({
+        name: &quot;Debugger.stepping.SwitchNoCaseStepIn&quot;,
+        description: &quot;Should be able to step through a switch without a default case.&quot;,
+        expression: &quot;setTimeout(entrySwitchNoCase)&quot;,
+        steps: [
+            &quot;over&quot;,
+                &quot;in&quot;, // into a() - before return
+                &quot;in&quot;, // leaving a
+                &quot;in&quot;, // leaving entry
+            &quot;resume&quot;,
+        ]
+    });
+
+    addSteppingTestCase({
+        name: &quot;Debugger.stepping.SwitchNoCaseStepOver&quot;,
+        description: &quot;Should be able to step over a switch without a default case.&quot;,
+        expression: &quot;setTimeout(entrySwitchNoCase)&quot;,
+        steps: [
+            &quot;over&quot;,
+                &quot;over&quot;, // complete switch statement - leaving entry
+            &quot;resume&quot;,
+        ]
+    });
+
+    loadMainPageContent().then(() =&gt; {
+        suite.runTestCasesAndFinish();
+    });
+}
+&lt;/script&gt;
+&lt;/head&gt;
+&lt;body onload=&quot;runTest()&quot;&gt;
+&lt;p&gt;Checking pause locations when stepping in, out, and over switch statements.&lt;/p&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectordebuggersteppingsteppingtemplatestringexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/inspector/debugger/stepping/stepping-template-string-expected.txt (0 => 206652)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/debugger/stepping/stepping-template-string-expected.txt                                (rev 0)
+++ trunk/LayoutTests/inspector/debugger/stepping/stepping-template-string-expected.txt        2016-09-30 19:22:37 UTC (rev 206652)
</span><span class="lines">@@ -0,0 +1,232 @@
</span><ins>+Checking pause locations when stepping in, out, and over template strings.
+
+
+== Running test suite: Debugger.stepping.template-string
+-- Running test case: Debugger.stepping.TemplateStringStepOver
+EXPRESSION: setTimeout(entryTemplateString)
+STEPS: over, over, resume
+PAUSED (debugger-statement)
+PAUSE AT entryTemplateString:17:5
+     13    
+     14    function entryTemplateString() {
+     15        let x;
+ -&gt;  16        |debugger;
+     17        let str = `literal ${1} assignment ${x=1} call ${a()} call2 ${a()}`;
+     18    }
+     19    
+
+ACTION: step-over
+PAUSE AT entryTemplateString:18:5
+     14    function entryTemplateString() {
+     15        let x;
+     16        debugger;
+ -&gt;  17        |let str = `literal ${1} assignment ${x=1} call ${a()} call2 ${a()}`;
+     18    }
+     19    
+     20    function entryTaggedTemplateString() {
+
+ACTION: step-over
+PAUSE AT entryTemplateString:19:2
+     15        let x;
+     16        debugger;
+     17        let str = `literal ${1} assignment ${x=1} call ${a()} call2 ${a()}`;
+ -&gt;  18    }|
+     19    
+     20    function entryTaggedTemplateString() {
+     21        let x;
+
+ACTION: resume
+RESUMED
+PASS: Should have used all steps.
+
+-- Running test case: Debugger.stepping.TemplateStringStepIn
+EXPRESSION: setTimeout(entryTemplateString)
+STEPS: over, in, out, in, out, resume
+PAUSED (debugger-statement)
+PAUSE AT entryTemplateString:17:5
+     13    
+     14    function entryTemplateString() {
+     15        let x;
+ -&gt;  16        |debugger;
+     17        let str = `literal ${1} assignment ${x=1} call ${a()} call2 ${a()}`;
+     18    }
+     19    
+
+ACTION: step-over
+PAUSE AT entryTemplateString:18:5
+     14    function entryTemplateString() {
+     15        let x;
+     16        debugger;
+ -&gt;  17        |let str = `literal ${1} assignment ${x=1} call ${a()} call2 ${a()}`;
+     18    }
+     19    
+     20    function entryTaggedTemplateString() {
+
+ACTION: step-in
+PAUSE AT a:8:5
+      4    &lt;script src=&quot;../resources/log-pause-location.js&quot;&gt;&lt;/script&gt;
+      5    &lt;script&gt;
+      6    function a() {
+ -&gt;   7        |return 1;
+      8    }
+      9    
+     10    function tag(strings, ...values) {
+
+ACTION: step-out
+PAUSE AT entryTemplateString:18:67
+     14    function entryTemplateString() {
+     15        let x;
+     16        debugger;
+ -&gt;  17        let str = `literal ${1} assignment ${x=1} call ${a()} call2 ${|a()}`;
+     18    }
+     19    
+     20    function entryTaggedTemplateString() {
+
+ACTION: step-in
+PAUSE AT a:8:5
+      4    &lt;script src=&quot;../resources/log-pause-location.js&quot;&gt;&lt;/script&gt;
+      5    &lt;script&gt;
+      6    function a() {
+ -&gt;   7        |return 1;
+      8    }
+      9    
+     10    function tag(strings, ...values) {
+
+ACTION: step-out
+PAUSE AT entryTemplateString:19:2
+     15        let x;
+     16        debugger;
+     17        let str = `literal ${1} assignment ${x=1} call ${a()} call2 ${a()}`;
+ -&gt;  18    }|
+     19    
+     20    function entryTaggedTemplateString() {
+     21        let x;
+
+ACTION: resume
+RESUMED
+PASS: Should have used all steps.
+
+-- Running test case: Debugger.stepping.TaggedTemplateStringStepOver
+EXPRESSION: setTimeout(entryTaggedTemplateString)
+STEPS: over, over, resume
+PAUSED (debugger-statement)
+PAUSE AT entryTaggedTemplateString:23:5
+     19    
+     20    function entryTaggedTemplateString() {
+     21        let x;
+ -&gt;  22        |debugger;
+     23        let str = tag`literal ${1} assignment ${x=1} call ${a()} call2 ${a()}`;
+     24    }
+     25    
+
+ACTION: step-over
+PAUSE AT entryTaggedTemplateString:24:5
+     20    function entryTaggedTemplateString() {
+     21        let x;
+     22        debugger;
+ -&gt;  23        |let str = tag`literal ${1} assignment ${x=1} call ${a()} call2 ${a()}`;
+     24    }
+     25    
+     26    // ---------
+
+ACTION: step-over
+PAUSE AT entryTaggedTemplateString:25:2
+     21        let x;
+     22        debugger;
+     23        let str = tag`literal ${1} assignment ${x=1} call ${a()} call2 ${a()}`;
+ -&gt;  24    }|
+     25    
+     26    // ---------
+     27    
+
+ACTION: resume
+RESUMED
+PASS: Should have used all steps.
+
+-- Running test case: Debugger.stepping.TaggedTemplateStringStepIn
+EXPRESSION: setTimeout(entryTaggedTemplateString)
+STEPS: over, in, out, in, out, in, out, resume
+PAUSED (debugger-statement)
+PAUSE AT entryTaggedTemplateString:23:5
+     19    
+     20    function entryTaggedTemplateString() {
+     21        let x;
+ -&gt;  22        |debugger;
+     23        let str = tag`literal ${1} assignment ${x=1} call ${a()} call2 ${a()}`;
+     24    }
+     25    
+
+ACTION: step-over
+PAUSE AT entryTaggedTemplateString:24:5
+     20    function entryTaggedTemplateString() {
+     21        let x;
+     22        debugger;
+ -&gt;  23        |let str = tag`literal ${1} assignment ${x=1} call ${a()} call2 ${a()}`;
+     24    }
+     25    
+     26    // ---------
+
+ACTION: step-in
+PAUSE AT a:8:5
+      4    &lt;script src=&quot;../resources/log-pause-location.js&quot;&gt;&lt;/script&gt;
+      5    &lt;script&gt;
+      6    function a() {
+ -&gt;   7        |return 1;
+      8    }
+      9    
+     10    function tag(strings, ...values) {
+
+ACTION: step-out
+PAUSE AT entryTaggedTemplateString:24:70
+     20    function entryTaggedTemplateString() {
+     21        let x;
+     22        debugger;
+ -&gt;  23        let str = tag`literal ${1} assignment ${x=1} call ${a()} call2 ${|a()}`;
+     24    }
+     25    
+     26    // ---------
+
+ACTION: step-in
+PAUSE AT a:8:5
+      4    &lt;script src=&quot;../resources/log-pause-location.js&quot;&gt;&lt;/script&gt;
+      5    &lt;script&gt;
+      6    function a() {
+ -&gt;   7        |return 1;
+      8    }
+      9    
+     10    function tag(strings, ...values) {
+
+ACTION: step-out
+PAUSE AT entryTaggedTemplateString:24:15
+     20    function entryTaggedTemplateString() {
+     21        let x;
+     22        debugger;
+ -&gt;  23        let str = |tag`literal ${1} assignment ${x=1} call ${a()} call2 ${a()}`;
+     24    }
+     25    
+     26    // ---------
+
+ACTION: step-in
+PAUSE AT tag:12:5
+      8    }
+      9    
+     10    function tag(strings, ...values) {
+ -&gt;  11        |return &quot;ignored&quot;;
+     12    }
+     13    
+     14    function entryTemplateString() {
+
+ACTION: step-out
+PAUSE AT entryTaggedTemplateString:25:2
+     21        let x;
+     22        debugger;
+     23        let str = tag`literal ${1} assignment ${x=1} call ${a()} call2 ${a()}`;
+ -&gt;  24    }|
+     25    
+     26    // ---------
+     27    
+
+ACTION: resume
+RESUMED
+PASS: Should have used all steps.
+
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectordebuggersteppingsteppingtemplatestringhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/inspector/debugger/stepping/stepping-template-string.html (0 => 206652)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/debugger/stepping/stepping-template-string.html                                (rev 0)
+++ trunk/LayoutTests/inspector/debugger/stepping/stepping-template-string.html        2016-09-30 19:22:37 UTC (rev 206652)
</span><span class="lines">@@ -0,0 +1,98 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../../../http/tests/inspector/resources/inspector-test.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../resources/log-pause-location.js&quot;&gt;&lt;/script&gt;
+&lt;script&gt;
+function a() {
+    return 1;
+}
+
+function tag(strings, ...values) {
+    return &quot;ignored&quot;;
+}
+
+function entryTemplateString() {
+    let x;
+    debugger;
+    let str = `literal ${1} assignment ${x=1} call ${a()} call2 ${a()}`;
+}
+
+function entryTaggedTemplateString() {
+    let x;
+    debugger;
+    let str = tag`literal ${1} assignment ${x=1} call ${a()} call2 ${a()}`;
+}
+
+// ---------
+
+function test()
+{
+    let suite = InspectorTest.createAsyncSuite(&quot;Debugger.stepping.template-string&quot;);
+
+    window.initializeSteppingTestSuite(suite);
+
+    addSteppingTestCase({
+        name: &quot;Debugger.stepping.TemplateStringStepOver&quot;,
+        description: &quot;Should be able to step through a template string.&quot;,
+        expression: &quot;setTimeout(entryTemplateString)&quot;,
+        steps: [
+            &quot;over&quot;,
+                &quot;over&quot;, // complete: `...` - leaving entry
+            &quot;resume&quot;,
+        ]
+    });
+
+    addSteppingTestCase({
+        name: &quot;Debugger.stepping.TemplateStringStepIn&quot;,
+        description: &quot;Should be able to step into template string expressions.&quot;,
+        expression: &quot;setTimeout(entryTemplateString)&quot;,
+        steps: [
+            &quot;over&quot;,
+                       // FIXME: Opportunity to pause at assignment expressions.
+                &quot;in&quot;,  // into 1st a
+                &quot;out&quot;, // out of a - before 2nd a()
+                &quot;in&quot;,  // into 2nd a
+                &quot;out&quot;, // out of a - leaving entry
+            &quot;resume&quot;,
+        ]
+    });
+
+    addSteppingTestCase({
+        name: &quot;Debugger.stepping.TaggedTemplateStringStepOver&quot;,
+        description: &quot;Should be able to step through a template string.&quot;,
+        expression: &quot;setTimeout(entryTaggedTemplateString)&quot;,
+        steps: [
+            &quot;over&quot;,
+                &quot;over&quot;, // complete: tag`...` - leaving entry
+            &quot;resume&quot;,
+        ]
+    });
+
+    addSteppingTestCase({
+        name: &quot;Debugger.stepping.TaggedTemplateStringStepIn&quot;,
+        description: &quot;Should be able to step into template string expressions and tag function.&quot;,
+        expression: &quot;setTimeout(entryTaggedTemplateString)&quot;,
+        steps: [
+            &quot;over&quot;,
+                       // FIXME: Opportunity to pause at assignment expressions.
+                &quot;in&quot;,  // into 1st a
+                &quot;out&quot;, // out of a - before 2nd a()
+                &quot;in&quot;,  // into 2nd a
+                &quot;out&quot;, // out of a - before tag
+                &quot;in&quot;,  // into tag
+                &quot;out&quot;, // out of tag - leaving entry
+            &quot;resume&quot;,
+        ]
+    });
+
+    loadMainPageContent().then(() =&gt; {
+        suite.runTestCasesAndFinish();
+    });
+}
+&lt;/script&gt;
+&lt;/head&gt;
+&lt;body onload=&quot;runTest()&quot;&gt;
+&lt;p&gt;Checking pause locations when stepping in, out, and over template strings.&lt;/p&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectordebuggersteppingsteppingtrycatchfinallyexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/inspector/debugger/stepping/stepping-try-catch-finally-expected.txt (0 => 206652)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/debugger/stepping/stepping-try-catch-finally-expected.txt                                (rev 0)
+++ trunk/LayoutTests/inspector/debugger/stepping/stepping-try-catch-finally-expected.txt        2016-09-30 19:22:37 UTC (rev 206652)
</span><span class="lines">@@ -0,0 +1,336 @@
</span><ins>+Checking pause locations when stepping in, out, and over try/catch/finally statements.
+
+
+== Running test suite: Debugger.stepping.try-catch-finally
+-- Running test case: Debugger.stepping.TryCatchNoError
+EXPRESSION: setTimeout(entryTryCatchNoError)
+STEPS: over, over, resume
+PAUSED (debugger-statement)
+PAUSE AT entryTryCatchNoError:20:5
+     16    }
+     17    
+     18    function entryTryCatchNoError() {
+ -&gt;  19        |debugger;
+     20        try {
+     21            a();
+     22        } catch (e) {
+
+ACTION: step-over
+PAUSE AT entryTryCatchNoError:22:9
+     18    function entryTryCatchNoError() {
+     19        debugger;
+     20        try {
+ -&gt;  21            |a();
+     22        } catch (e) {
+     23            shouldNotBeReached();
+     24        }
+
+ACTION: step-over
+PAUSE AT entryTryCatchNoError:26:2
+     22        } catch (e) {
+     23            shouldNotBeReached();
+     24        }
+ -&gt;  25    }|
+     26    
+     27    function entryTryCatchFinallyNoError() {
+     28        debugger;
+
+ACTION: resume
+RESUMED
+PASS: Should have used all steps.
+
+-- Running test case: Debugger.stepping.TryCatchFinallyNoError
+EXPRESSION: setTimeout(entryTryCatchFinallyNoError)
+STEPS: over, over, over, resume
+PAUSED (debugger-statement)
+PAUSE AT entryTryCatchFinallyNoError:29:5
+     25    }
+     26    
+     27    function entryTryCatchFinallyNoError() {
+ -&gt;  28        |debugger;
+     29        try {
+     30            a();
+     31        } catch (e) {
+
+ACTION: step-over
+PAUSE AT entryTryCatchFinallyNoError:31:9
+     27    function entryTryCatchFinallyNoError() {
+     28        debugger;
+     29        try {
+ -&gt;  30            |a();
+     31        } catch (e) {
+     32            shouldNotBeReached();
+     33        } finally {
+
+ACTION: step-over
+PAUSE AT entryTryCatchFinallyNoError:35:9
+     31        } catch (e) {
+     32            shouldNotBeReached();
+     33        } finally {
+ -&gt;  34            |b();
+     35        }   
+     36    }
+     37    
+
+ACTION: step-over
+PAUSE AT entryTryCatchFinallyNoError:37:2
+     33        } finally {
+     34            b();
+     35        }   
+ -&gt;  36    }|
+     37    
+     38    function entryTryExplicitThrow() {
+     39        debugger;
+
+ACTION: resume
+RESUMED
+PASS: Should have used all steps.
+
+-- Running test case: Debugger.stepping.TryExplicitThrow.NoPauseOnException
+EXPRESSION: setTimeout(entryTryExplicitThrow)
+STEPS: over, over, over, over, resume
+PAUSED (debugger-statement)
+PAUSE AT entryTryExplicitThrow:40:5
+     36    }
+     37    
+     38    function entryTryExplicitThrow() {
+ -&gt;  39        |debugger;
+     40        try {
+     41            throw new Error;
+     42        } catch (e) {
+
+ACTION: step-over
+PAUSE AT entryTryExplicitThrow:42:9
+     38    function entryTryExplicitThrow() {
+     39        debugger;
+     40        try {
+ -&gt;  41            |throw new Error;
+     42        } catch (e) {
+     43            a();
+     44        } finally {
+
+ACTION: step-over
+PAUSE AT entryTryExplicitThrow:44:9
+     40        try {
+     41            throw new Error;
+     42        } catch (e) {
+ -&gt;  43            |a();
+     44        } finally {
+     45            b();
+     46        }   
+
+ACTION: step-over
+PAUSE AT entryTryExplicitThrow:46:9
+     42        } catch (e) {
+     43            a();
+     44        } finally {
+ -&gt;  45            |b();
+     46        }   
+     47    }
+     48    
+
+ACTION: step-over
+PAUSE AT entryTryExplicitThrow:48:2
+     44        } finally {
+     45            b();
+     46        }   
+ -&gt;  47    }|
+     48    
+     49    function entryTryRuntimeException() {
+     50        debugger;
+
+ACTION: resume
+RESUMED
+PASS: Should have used all steps.
+
+-- Running test case: Debugger.stepping.TryExplicitThrow.PauseOnException
+EXPRESSION: setTimeout(entryTryExplicitThrow)
+STEPS: over, over, over, over, over, resume
+PAUSED (debugger-statement)
+PAUSE AT entryTryExplicitThrow:40:5
+     36    }
+     37    
+     38    function entryTryExplicitThrow() {
+ -&gt;  39        |debugger;
+     40        try {
+     41            throw new Error;
+     42        } catch (e) {
+
+ACTION: step-over
+PAUSE AT entryTryExplicitThrow:42:9
+     38    function entryTryExplicitThrow() {
+     39        debugger;
+     40        try {
+ -&gt;  41            |throw new Error;
+     42        } catch (e) {
+     43            a();
+     44        } finally {
+
+ACTION: step-over
+PAUSE AT entryTryExplicitThrow:42:24
+     38    function entryTryExplicitThrow() {
+     39        debugger;
+     40        try {
+ -&gt;  41            throw new Error|;
+     42        } catch (e) {
+     43            a();
+     44        } finally {
+
+ACTION: step-over
+PAUSE AT entryTryExplicitThrow:44:9
+     40        try {
+     41            throw new Error;
+     42        } catch (e) {
+ -&gt;  43            |a();
+     44        } finally {
+     45            b();
+     46        }   
+
+ACTION: step-over
+PAUSE AT entryTryExplicitThrow:46:9
+     42        } catch (e) {
+     43            a();
+     44        } finally {
+ -&gt;  45            |b();
+     46        }   
+     47    }
+     48    
+
+ACTION: step-over
+PAUSE AT entryTryExplicitThrow:48:2
+     44        } finally {
+     45            b();
+     46        }   
+ -&gt;  47    }|
+     48    
+     49    function entryTryRuntimeException() {
+     50        debugger;
+
+ACTION: resume
+RESUMED
+PASS: Should have used all steps.
+
+-- Running test case: Debugger.stepping.TryRuntimeException.NoPauseOnException
+EXPRESSION: setTimeout(entryTryRuntimeException)
+STEPS: over, over, over, over, resume
+PAUSED (debugger-statement)
+PAUSE AT entryTryRuntimeException:51:5
+     47    }
+     48    
+     49    function entryTryRuntimeException() {
+ -&gt;  50        |debugger;
+     51        try {
+     52            [].x.x;
+     53        } catch (e) {
+
+ACTION: step-over
+PAUSE AT entryTryRuntimeException:53:9
+     49    function entryTryRuntimeException() {
+     50        debugger;
+     51        try {
+ -&gt;  52            |[].x.x;
+     53        } catch (e) {
+     54            a();
+     55        } finally {
+
+ACTION: step-over
+PAUSE AT entryTryRuntimeException:55:9
+     51        try {
+     52            [].x.x;
+     53        } catch (e) {
+ -&gt;  54            |a();
+     55        } finally {
+     56            b();
+     57        }   
+
+ACTION: step-over
+PAUSE AT entryTryRuntimeException:57:9
+     53        } catch (e) {
+     54            a();
+     55        } finally {
+ -&gt;  56            |b();
+     57        }   
+     58    }
+     59    
+
+ACTION: step-over
+PAUSE AT entryTryRuntimeException:59:2
+     55        } finally {
+     56            b();
+     57        }   
+ -&gt;  58    }|
+     59    
+     60    function entryTryFinallyNoError() {
+     61        try {
+
+ACTION: resume
+RESUMED
+PASS: Should have used all steps.
+
+-- Running test case: Debugger.stepping.TryRuntimeException.PauseOnException
+EXPRESSION: setTimeout(entryTryRuntimeException)
+STEPS: over, over, over, over, over, resume
+PAUSED (debugger-statement)
+PAUSE AT entryTryRuntimeException:51:5
+     47    }
+     48    
+     49    function entryTryRuntimeException() {
+ -&gt;  50        |debugger;
+     51        try {
+     52            [].x.x;
+     53        } catch (e) {
+
+ACTION: step-over
+PAUSE AT entryTryRuntimeException:53:9
+     49    function entryTryRuntimeException() {
+     50        debugger;
+     51        try {
+ -&gt;  52            |[].x.x;
+     53        } catch (e) {
+     54            a();
+     55        } finally {
+
+ACTION: step-over
+PAUSE AT entryTryRuntimeException:53:13
+     49    function entryTryRuntimeException() {
+     50        debugger;
+     51        try {
+ -&gt;  52            [].x|.x;
+     53        } catch (e) {
+     54            a();
+     55        } finally {
+
+ACTION: step-over
+PAUSE AT entryTryRuntimeException:55:9
+     51        try {
+     52            [].x.x;
+     53        } catch (e) {
+ -&gt;  54            |a();
+     55        } finally {
+     56            b();
+     57        }   
+
+ACTION: step-over
+PAUSE AT entryTryRuntimeException:57:9
+     53        } catch (e) {
+     54            a();
+     55        } finally {
+ -&gt;  56            |b();
+     57        }   
+     58    }
+     59    
+
+ACTION: step-over
+PAUSE AT entryTryRuntimeException:59:2
+     55        } finally {
+     56            b();
+     57        }   
+ -&gt;  58    }|
+     59    
+     60    function entryTryFinallyNoError() {
+     61        try {
+
+ACTION: resume
+RESUMED
+PASS: Should have used all steps.
+
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectordebuggersteppingsteppingtrycatchfinallyhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/inspector/debugger/stepping/stepping-try-catch-finally.html (0 => 206652)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/debugger/stepping/stepping-try-catch-finally.html                                (rev 0)
+++ trunk/LayoutTests/inspector/debugger/stepping/stepping-try-catch-finally.html        2016-09-30 19:22:37 UTC (rev 206652)
</span><span class="lines">@@ -0,0 +1,173 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../../../http/tests/inspector/resources/inspector-test.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../resources/log-pause-location.js&quot;&gt;&lt;/script&gt;
+&lt;script&gt;
+function a() {
+    return 1;
+}
+
+function b() {
+    return 1;
+}
+
+function shouldNotBeReached() {
+    return 0;
+}
+
+function entryTryCatchNoError() {
+    debugger;
+    try {
+        a();
+    } catch (e) {
+        shouldNotBeReached();
+    }
+}
+
+function entryTryCatchFinallyNoError() {
+    debugger;
+    try {
+        a();
+    } catch (e) {
+        shouldNotBeReached();
+    } finally {
+        b();
+    }   
+}
+
+function entryTryExplicitThrow() {
+    debugger;
+    try {
+        throw new Error;
+    } catch (e) {
+        a();
+    } finally {
+        b();
+    }   
+}
+
+function entryTryRuntimeException() {
+    debugger;
+    try {
+        [].x.x;
+    } catch (e) {
+        a();
+    } finally {
+        b();
+    }   
+}
+
+function entryTryFinallyNoError() {
+    try {
+        a();
+    } finally {
+        b();
+    }
+}
+
+function entryTryFinallyWithError() {
+    try {
+        throw new Error;
+    } finally {
+        b();
+    }
+}
+
+// ---------
+
+function test()
+{
+    let suite = InspectorTest.createAsyncSuite(&quot;Debugger.stepping.try-catch-finally&quot;);
+
+    window.initializeSteppingTestSuite(suite);
+
+    addSteppingTestCase({
+        name: &quot;Debugger.stepping.TryCatchNoError&quot;,
+        description: &quot;Should be able to step through try/catch without error.&quot;,
+        expression: &quot;setTimeout(entryTryCatchNoError)&quot;,
+        steps: [
+            &quot;over&quot;,
+                &quot;over&quot;, // try: a() - leaving entry
+            &quot;resume&quot;,
+        ]
+    });
+
+    addSteppingTestCase({
+        name: &quot;Debugger.stepping.TryCatchFinallyNoError&quot;,
+        description: &quot;Should be able to step through try/catch/finally without error.&quot;,
+        expression: &quot;setTimeout(entryTryCatchFinallyNoError)&quot;,
+        steps: [
+            &quot;over&quot;,
+                &quot;over&quot;, // try: a()
+                &quot;over&quot;, // finally: b() - leaving entry
+            &quot;resume&quot;,
+        ]
+    });
+
+    addSteppingTestCase({
+        name: &quot;Debugger.stepping.TryExplicitThrow.NoPauseOnException&quot;,
+        description: &quot;Should be able to step through try/catch/finally with thrown error.&quot;,
+        expression: &quot;setTimeout(entryTryExplicitThrow)&quot;,
+        steps: [
+            &quot;over&quot;,
+                &quot;over&quot;, // try: new Error
+                &quot;over&quot;, // catch: a()
+                &quot;over&quot;, // finally: b() - leaving entry
+            &quot;resume&quot;,
+        ]
+    });
+
+    addSteppingTestCase({
+        name: &quot;Debugger.stepping.TryExplicitThrow.PauseOnException&quot;,
+        description: &quot;Should be able to step through try/catch/finally with thrown error.&quot;,
+        expression: &quot;setTimeout(entryTryExplicitThrow)&quot;,
+        pauseOnAllException: true,
+        steps: [
+            &quot;over&quot;,
+                &quot;over&quot;, // try: new Error
+                &quot;over&quot;, // EXCEPTION PAUSE
+                &quot;over&quot;, // catch: a()
+                &quot;over&quot;, // finally: b() - leaving entry
+            &quot;resume&quot;,
+        ]
+    });
+
+    addSteppingTestCase({
+        name: &quot;Debugger.stepping.TryRuntimeException.NoPauseOnException&quot;,
+        description: &quot;Should be able to step through try/catch/finally with runtime exception.&quot;,
+        expression: &quot;setTimeout(entryTryRuntimeException)&quot;,
+        steps: [
+            &quot;over&quot;,
+                &quot;over&quot;, // try: [].x.x
+                &quot;over&quot;, // catch: a()
+                &quot;over&quot;, // finally: b() - leaving entry
+            &quot;resume&quot;,
+        ]
+    });
+
+    addSteppingTestCase({
+        name: &quot;Debugger.stepping.TryRuntimeException.PauseOnException&quot;,
+        description: &quot;Should be able to step through try/catch/finally with runtime exception.&quot;,
+        expression: &quot;setTimeout(entryTryRuntimeException)&quot;,
+        pauseOnAllException: true,
+        steps: [
+            &quot;over&quot;,
+                &quot;over&quot;, // try: [].x.x
+                &quot;over&quot;, // EXCEPTION PAUSE
+                &quot;over&quot;, // catch: a()
+                &quot;over&quot;, // finally: b() - leaving entry
+            &quot;resume&quot;,
+        ]
+    });
+
+    loadMainPageContent().then(() =&gt; {
+        suite.runTestCasesAndFinish();
+    });
+}
+&lt;/script&gt;
+&lt;/head&gt;
+&lt;body onload=&quot;runTest()&quot;&gt;
+&lt;p&gt;Checking pause locations when stepping in, out, and over try/catch/finally statements.&lt;/p&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectordebuggertaildeletedframesfromvmentryexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/inspector/debugger/tail-deleted-frames-from-vm-entry-expected.txt (206651 => 206652)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/debugger/tail-deleted-frames-from-vm-entry-expected.txt        2016-09-30 19:19:44 UTC (rev 206651)
+++ trunk/LayoutTests/inspector/debugger/tail-deleted-frames-from-vm-entry-expected.txt        2016-09-30 19:22:37 UTC (rev 206652)
</span><span class="lines">@@ -94,98 +94,5 @@
</span><span class="cx"> PASS: Variable is a number.
</span><span class="cx"> PASS: Found scope value: 25
</span><span class="cx"> PASS: Did not find variable we were looking for: foo
</span><del>-
-
-------------------------------------
-Hit breakpoint at line: 7, column: 4
-------------------------------------
-Expected frame: {&quot;functionName&quot;:&quot;bar&quot;,&quot;scope&quot;:[&quot;i&quot;,0],&quot;isTailDeleted&quot;:false}
-PASS: Function name: bar is correct.
-PASS: Tail deleted expectation correct: false
-Expected frame: {&quot;functionName&quot;:&quot;bar&quot;,&quot;scope&quot;:[&quot;i&quot;,1],&quot;isTailDeleted&quot;:true}
-PASS: Function name: bar is correct.
-PASS: Tail deleted expectation correct: true
-Expected frame: {&quot;functionName&quot;:&quot;bar&quot;,&quot;scope&quot;:[&quot;i&quot;,2],&quot;isTailDeleted&quot;:true}
-PASS: Function name: bar is correct.
-PASS: Tail deleted expectation correct: true
-Expected frame: {&quot;functionName&quot;:&quot;bar&quot;,&quot;scope&quot;:[&quot;i&quot;,3],&quot;isTailDeleted&quot;:true}
-PASS: Function name: bar is correct.
-PASS: Tail deleted expectation correct: true
-Expected frame: {&quot;functionName&quot;:&quot;bar&quot;,&quot;scope&quot;:[&quot;i&quot;,4],&quot;isTailDeleted&quot;:true}
-PASS: Function name: bar is correct.
-PASS: Tail deleted expectation correct: true
-Expected frame: {&quot;functionName&quot;:&quot;bar&quot;,&quot;scope&quot;:[&quot;i&quot;,5],&quot;isTailDeleted&quot;:true}
-PASS: Function name: bar is correct.
-PASS: Tail deleted expectation correct: true
-Expected frame: {&quot;functionName&quot;:&quot;bar&quot;,&quot;scope&quot;:[&quot;i&quot;,6],&quot;isTailDeleted&quot;:true}
-PASS: Function name: bar is correct.
-PASS: Tail deleted expectation correct: true
-Expected frame: {&quot;functionName&quot;:&quot;bar&quot;,&quot;scope&quot;:[&quot;i&quot;,7],&quot;isTailDeleted&quot;:true}
-PASS: Function name: bar is correct.
-PASS: Tail deleted expectation correct: true
-Expected frame: {&quot;functionName&quot;:&quot;bar&quot;,&quot;scope&quot;:[&quot;i&quot;,8],&quot;isTailDeleted&quot;:true}
-PASS: Function name: bar is correct.
-PASS: Tail deleted expectation correct: true
-Expected frame: {&quot;functionName&quot;:&quot;bar&quot;,&quot;scope&quot;:[&quot;i&quot;,9],&quot;isTailDeleted&quot;:true}
-PASS: Function name: bar is correct.
-PASS: Tail deleted expectation correct: true
-Expected frame: {&quot;functionName&quot;:&quot;timeout&quot;,&quot;scope&quot;:[&quot;foo&quot;,25],&quot;isTailDeleted&quot;:true}
-PASS: Function name: timeout is correct.
-PASS: Tail deleted expectation correct: true
-Looking at frame number: 0
-    variable 'i': {&quot;_type&quot;:&quot;number&quot;,&quot;_description&quot;:&quot;0&quot;,&quot;_hasChildren&quot;:false,&quot;_value&quot;:0}
-PASS: Variable is a number.
-PASS: Found scope value: 0
-PASS: Did not find variable we were looking for: i
-Looking at frame number: 1
-    variable 'i': {&quot;_type&quot;:&quot;number&quot;,&quot;_description&quot;:&quot;1&quot;,&quot;_hasChildren&quot;:false,&quot;_value&quot;:1}
-PASS: Variable is a number.
-PASS: Found scope value: 1
-PASS: Did not find variable we were looking for: i
-Looking at frame number: 2
-    variable 'i': {&quot;_type&quot;:&quot;number&quot;,&quot;_description&quot;:&quot;2&quot;,&quot;_hasChildren&quot;:false,&quot;_value&quot;:2}
-PASS: Variable is a number.
-PASS: Found scope value: 2
-PASS: Did not find variable we were looking for: i
-Looking at frame number: 3
-    variable 'i': {&quot;_type&quot;:&quot;number&quot;,&quot;_description&quot;:&quot;3&quot;,&quot;_hasChildren&quot;:false,&quot;_value&quot;:3}
-PASS: Variable is a number.
-PASS: Found scope value: 3
-PASS: Did not find variable we were looking for: i
-Looking at frame number: 4
-    variable 'i': {&quot;_type&quot;:&quot;number&quot;,&quot;_description&quot;:&quot;4&quot;,&quot;_hasChildren&quot;:false,&quot;_value&quot;:4}
-PASS: Variable is a number.
-PASS: Found scope value: 4
-PASS: Did not find variable we were looking for: i
-Looking at frame number: 5
-    variable 'i': {&quot;_type&quot;:&quot;number&quot;,&quot;_description&quot;:&quot;5&quot;,&quot;_hasChildren&quot;:false,&quot;_value&quot;:5}
-PASS: Variable is a number.
-PASS: Found scope value: 5
-PASS: Did not find variable we were looking for: i
-Looking at frame number: 6
-    variable 'i': {&quot;_type&quot;:&quot;number&quot;,&quot;_description&quot;:&quot;6&quot;,&quot;_hasChildren&quot;:false,&quot;_value&quot;:6}
-PASS: Variable is a number.
-PASS: Found scope value: 6
-PASS: Did not find variable we were looking for: i
-Looking at frame number: 7
-    variable 'i': {&quot;_type&quot;:&quot;number&quot;,&quot;_description&quot;:&quot;7&quot;,&quot;_hasChildren&quot;:false,&quot;_value&quot;:7}
-PASS: Variable is a number.
-PASS: Found scope value: 7
-PASS: Did not find variable we were looking for: i
-Looking at frame number: 8
-    variable 'i': {&quot;_type&quot;:&quot;number&quot;,&quot;_description&quot;:&quot;8&quot;,&quot;_hasChildren&quot;:false,&quot;_value&quot;:8}
-PASS: Variable is a number.
-PASS: Found scope value: 8
-PASS: Did not find variable we were looking for: i
-Looking at frame number: 9
-    variable 'i': {&quot;_type&quot;:&quot;number&quot;,&quot;_description&quot;:&quot;9&quot;,&quot;_hasChildren&quot;:false,&quot;_value&quot;:9}
-PASS: Variable is a number.
-PASS: Found scope value: 9
-PASS: Did not find variable we were looking for: i
-Looking at frame number: 10
-    variable 'foo': {&quot;_type&quot;:&quot;number&quot;,&quot;_description&quot;:&quot;25&quot;,&quot;_hasChildren&quot;:false,&quot;_value&quot;:25}
-PASS: Variable is a number.
-PASS: Found scope value: 25
-PASS: Did not find variable we were looking for: foo
</del><span class="cx"> Tests done
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsinspectordebuggertaildeletedframesfromvmentryhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/inspector/debugger/tail-deleted-frames-from-vm-entry.html (206651 => 206652)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/debugger/tail-deleted-frames-from-vm-entry.html        2016-09-30 19:19:44 UTC (rev 206651)
+++ trunk/LayoutTests/inspector/debugger/tail-deleted-frames-from-vm-entry.html        2016-09-30 19:22:37 UTC (rev 206652)
</span><span class="lines">@@ -75,8 +75,7 @@
</span><span class="cx">     });
</span><span class="cx"> 
</span><span class="cx">     WebInspector.debuggerManager.addEventListener(WebInspector.DebuggerManager.Event.ScriptAdded, function(event) {
</span><del>-        eventScriptObject = event.data.script;
-        
</del><ins>+        let eventScriptObject = event.data.script;
</ins><span class="cx">         if (/tail-deleted-frames-from-vm-entry\.js$/.test(eventScriptObject.url)) {
</span><span class="cx">             scriptObject = eventScriptObject;
</span><span class="cx">             startTest();
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/ChangeLog (206651 => 206652)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/ChangeLog        2016-09-30 19:19:44 UTC (rev 206651)
+++ trunk/Source/JavaScriptCore/ChangeLog        2016-09-30 19:22:37 UTC (rev 206652)
</span><span class="lines">@@ -1,3 +1,210 @@
</span><ins>+2016-09-30  Joseph Pecoraro  &lt;pecoraro@apple.com&gt;
+
+        Web Inspector: Stepping out of a function finishes the line that called it.
+        https://bugs.webkit.org/show_bug.cgi?id=155325
+        &lt;rdar://problem/25094578&gt;
+
+        Reviewed by Mark Lam.
+
+        Also addresses:
+        &lt;https://webkit.org/b/161721&gt; Web Inspector: Stepping all the way through program should not cause a pause on the next program that executes
+        &lt;https://webkit.org/b/161716&gt; Web Inspector: Stepping into a function / program should not require stepping to the first statement
+
+        This change introduces a new op_debug hook: WillExecuteExpression.
+        Currently this new hook is only used for pausing at function calls.
+        We may decide to add it to other places later where pausing with
+        finer granularity then statements (or lines) if useful.
+
+        This updates the location and behavior of some of the existing debug
+        hooks, to be more consistent and useful if the exact location of the
+        pause is displayed. For example, in control flow statements like
+        `if` and `while`, the pause location is the expression itself that
+        will be evaluated, not the location of the `if` or `while` keyword.
+        For example:
+
+            if (|condition)
+            while (|condition)
+
+        Finally, this change gets rid of some unnecessary / useless pause
+        locations such as on entering a function and on entering a program.
+        These pauses are not needed because if there is a statement, we
+        would pause before the statement and it is equivalent. We continue
+        to pause when leaving a function via stepping by uniformly jumping
+        to the closing brace of the function. This gives users a chance
+        to observe state before leaving the function.
+
+        * bytecode/CodeBlock.cpp:
+        (JSC::debugHookName):
+        * bytecode/UnlinkedCodeBlock.cpp:
+        (JSC::dumpLineColumnEntry):
+        Logging strings for the new debug hook.
+
+        * bytecompiler/BytecodeGenerator.h:
+        * bytecompiler/BytecodeGenerator.cpp:
+        (JSC::BytecodeGenerator::emitCallInTailPosition):
+        (JSC::BytecodeGenerator::emitCallEval):
+        (JSC::BytecodeGenerator::emitCallVarargsInTailPosition):
+        (JSC::BytecodeGenerator::emitConstructVarargs):
+        (JSC::BytecodeGenerator::emitCallForwardArgumentsInTailPosition):
+        (JSC::BytecodeGenerator::emitCallDefineProperty):
+        (JSC::BytecodeGenerator::emitConstruct):
+        (JSC::BytecodeGenerator::emitGetTemplateObject):
+        (JSC::BytecodeGenerator::emitIteratorNext):
+        (JSC::BytecodeGenerator::emitIteratorNextWithValue):
+        (JSC::BytecodeGenerator::emitIteratorClose):
+        (JSC::BytecodeGenerator::emitDelegateYield):
+        All emitCall variants now take an enum to decide whether or not to
+        emit the WillExecuteExpression debug hook.
+
+        (JSC::BytecodeGenerator::emitCall):
+        (JSC::BytecodeGenerator::emitCallVarargs):
+        In the two real implementations, actually decide to emit the debug
+        hook or not based on the parameter.
+
+        (JSC::BytecodeGenerator::emitEnumeration):
+        This is shared looping code used by for..of iteration of iterables.
+        When used by ForOfNode, we want to emit a pause location during
+        iteration.
+
+        (JSC::BytecodeGenerator::emitWillLeaveCallFrameDebugHook):
+        This is shared call frame leave code to emit a consistent pause
+        location when leaving a function.
+
+        * bytecompiler/NodesCodegen.cpp:
+        (JSC::EvalFunctionCallNode::emitBytecode):
+        (JSC::FunctionCallValueNode::emitBytecode):
+        (JSC::FunctionCallResolveNode::emitBytecode):
+        (JSC::BytecodeIntrinsicNode::emit_intrinsic_tailCallForwardArguments):
+        (JSC::FunctionCallBracketNode::emitBytecode):
+        (JSC::FunctionCallDotNode::emitBytecode):
+        (JSC::CallFunctionCallDotNode::emitBytecode):
+        (JSC::ApplyFunctionCallDotNode::emitBytecode):
+        (JSC::TaggedTemplateNode::emitBytecode):
+        (JSC::ArrayPatternNode::bindValue):
+        All tail position calls are the function calls that we want to emit
+        debug hooks for. All non-tail call calls appear to be internal
+        implementation details, and these should not have the debug hook.
+
+        (JSC::IfElseNode::emitBytecode):
+        (JSC::WhileNode::emitBytecode):
+        (JSC::WithNode::emitBytecode):
+        (JSC::SwitchNode::emitBytecode):
+        Make the pause location consistent at the expression.
+
+        (JSC::DoWhileNode::emitBytecode):
+        Make the pause location consistent at the expression.
+        Remove the errant pause at the do's '}' when entering the do block.
+
+        (JSC::ForNode::emitBytecode):
+        (JSC::ForInNode::emitMultiLoopBytecode):
+        (JSC::ForOfNode::emitBytecode):
+        Make the pause location consistent at expressions.
+        Also allow stepping to the traditional for loop's
+        update expression, which was previously not possible.
+
+        (JSC::ReturnNode::emitBytecode):
+        (JSC::FunctionNode::emitBytecode):
+        Make the pause location when leaving a function consistently be the
+        function's closing brace. The two cases are stepping through a return
+        statement, or the implicit return undefined at the end of a function.
+
+        (JSC::LabelNode::emitBytecode):
+        (JSC::TryNode::emitBytecode):
+        Remove unnecessary pauses that add no value, as they contain a
+        statement and we will then pause at that statement.
+
+        * parser/Nodes.h:
+        (JSC::StatementNode::isFunctionNode):
+        (JSC::StatementNode::isForOfNode):
+        (JSC::EnumerationNode::lexpr):
+        (JSC::ForOfNode::isForOfNode):
+        New virtual methods to distinguish different nodes.
+
+        * debugger/Debugger.h:
+        Rename m_pauseAtNextStatement to m_pauseAtNextOpportunity.
+        This is the finest granularity of stepping, and it can be
+        pausing at a location that is not a statement.
+        Introduce state to properly handle step out and stepping
+        when there are multiple expressions in a statement.
+
+        * debugger/Debugger.cpp:
+        (JSC::Debugger::Debugger):
+        (JSC::Debugger::setPauseOnNextStatement):
+        (JSC::Debugger::breakProgram):
+        (JSC::Debugger::continueProgram):
+        (JSC::Debugger::stepIntoStatement):
+        (JSC::Debugger::exception):
+        (JSC::Debugger::didReachBreakpoint):
+        
+        Use new variable names, and clarify if we should attempt
+        to pause or not.
+
+        (JSC::Debugger::stepOutOfFunction):
+        Set a new state to indicate a step out action.
+
+        (JSC::Debugger::updateCallFrame):
+        (JSC::Debugger::updateCallFrameAndPauseIfNeeded): Deleted.
+        (JSC::Debugger::updateCallFrameInternal):
+        (JSC::Debugger::pauseIfNeeded):
+        Allow updateCallFrame to either attempt a pause or not.
+        
+        (JSC::Debugger::atStatement):
+        Attempt pause and reset the at first expression flag.
+
+        (JSC::Debugger::atExpression):
+        Attempt a pause when not stepping over. Also skip
+        the first expression pause, since that would be
+        equivalent to when we paused for the expression.
+
+        (JSC::Debugger::callEvent):
+        Do not pause when entering a function.
+
+        (JSC::Debugger::returnEvent):
+        Attempt pause when leaving a function.
+        If the user did a step-over and is leaving the
+        function, then behave like step-out.
+        
+        (JSC::Debugger::unwindEvent):
+        Behave like return except don't change any
+        pausing states. If we needed to pause the
+        Debugger::exception will have handled it.
+
+        (JSC::Debugger::willExecuteProgram):
+        Do not pause when entering a program.
+
+        (JSC::Debugger::didExecuteProgram):
+        Attempt pause when leaving a program that has a caller.
+        This can be useful for exiting an eval(...) program.
+        Otherwise treat this like return, and step-over out
+        of the program should behave like step-out. We use
+        pause at next opportunity because there may be extra
+        callframes we do not know about.
+        When the program doesn't have a parent, clear all
+        our state so we don't errantly pause on the next
+        JavaScript microtask that gets executed.
+        
+        (JSC::Debugger::clearNextPauseState):
+        Helper to clear all of the pause states now that
+        it happens in a couple places.
+
+        * interpreter/Interpreter.cpp:
+        (JSC::notifyDebuggerOfUnwinding):
+        Treat unwinding slightly differently from returning.
+        We will not want to pause when unwinding callframes.
+
+        (JSC::Interpreter::debug):
+        * interpreter/Interpreter.h:
+        New debug hook.
+
+        * inspector/agents/InspectorDebuggerAgent.cpp:
+        (Inspector::InspectorDebuggerAgent::stepInto):
+        (Inspector::InspectorDebuggerAgent::didPause):
+        * inspector/agents/InspectorDebuggerAgent.h:
+        Remove unnecessary stepInto code notification for listeners.
+        The listeners are never notified if the debugger resumes,
+        so whatever state they were setting by this is going to
+        get out of date.
+
</ins><span class="cx"> 2016-09-30  Saam Barati  &lt;sbarati@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Arrow functions should not allow duplicate parameter names
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorebytecodeCodeBlockcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/bytecode/CodeBlock.cpp (206651 => 206652)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/bytecode/CodeBlock.cpp        2016-09-30 19:19:44 UTC (rev 206651)
+++ trunk/Source/JavaScriptCore/bytecode/CodeBlock.cpp        2016-09-30 19:22:37 UTC (rev 206652)
</span><span class="lines">@@ -308,6 +308,8 @@
</span><span class="cx">             return &quot;willLeaveCallFrame&quot;;
</span><span class="cx">         case WillExecuteStatement:
</span><span class="cx">             return &quot;willExecuteStatement&quot;;
</span><ins>+        case WillExecuteExpression:
+            return &quot;willExecuteExpression&quot;;
</ins><span class="cx">         case WillExecuteProgram:
</span><span class="cx">             return &quot;willExecuteProgram&quot;;
</span><span class="cx">         case DidExecuteProgram:
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorebytecodeUnlinkedCodeBlockcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/bytecode/UnlinkedCodeBlock.cpp (206651 => 206652)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/bytecode/UnlinkedCodeBlock.cpp        2016-09-30 19:19:44 UTC (rev 206651)
+++ trunk/Source/JavaScriptCore/bytecode/UnlinkedCodeBlock.cpp        2016-09-30 19:22:37 UTC (rev 206652)
</span><span class="lines">@@ -161,6 +161,7 @@
</span><span class="cx">         case DidReachBreakpoint: event = &quot; DidReachBreakpoint&quot;; break;
</span><span class="cx">         case WillLeaveCallFrame: event = &quot; WillLeaveCallFrame&quot;; break;
</span><span class="cx">         case WillExecuteStatement: event = &quot; WillExecuteStatement&quot;; break;
</span><ins>+        case WillExecuteExpression: event = &quot; WillExecuteExpression&quot;; break;
</ins><span class="cx">         }
</span><span class="cx">     }
</span><span class="cx">     dataLogF(&quot;  [%zu] pc %u @ line %u col %u : %s%s\n&quot;, index, instructionOffset, line, column, opcodeNames[opcode], event);
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorebytecompilerBytecodeGeneratorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp (206651 => 206652)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp        2016-09-30 19:19:44 UTC (rev 206651)
+++ trunk/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp        2016-09-30 19:22:37 UTC (rev 206652)
</span><span class="lines">@@ -3064,19 +3064,19 @@
</span><span class="cx">     instructions().append(name-&gt;index());
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-RegisterID* BytecodeGenerator::emitCall(RegisterID* dst, RegisterID* func, ExpectedFunction expectedFunction, CallArguments&amp; callArguments, const JSTextPosition&amp; divot, const JSTextPosition&amp; divotStart, const JSTextPosition&amp; divotEnd)
</del><ins>+RegisterID* BytecodeGenerator::emitCall(RegisterID* dst, RegisterID* func, ExpectedFunction expectedFunction, CallArguments&amp; callArguments, const JSTextPosition&amp; divot, const JSTextPosition&amp; divotStart, const JSTextPosition&amp; divotEnd, DebuggableCall debuggableCall)
</ins><span class="cx"> {
</span><del>-    return emitCall(op_call, dst, func, expectedFunction, callArguments, divot, divotStart, divotEnd);
</del><ins>+    return emitCall(op_call, dst, func, expectedFunction, callArguments, divot, divotStart, divotEnd, debuggableCall);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-RegisterID* BytecodeGenerator::emitCallInTailPosition(RegisterID* dst, RegisterID* func, ExpectedFunction expectedFunction, CallArguments&amp; callArguments, const JSTextPosition&amp; divot, const JSTextPosition&amp; divotStart, const JSTextPosition&amp; divotEnd)
</del><ins>+RegisterID* BytecodeGenerator::emitCallInTailPosition(RegisterID* dst, RegisterID* func, ExpectedFunction expectedFunction, CallArguments&amp; callArguments, const JSTextPosition&amp; divot, const JSTextPosition&amp; divotStart, const JSTextPosition&amp; divotEnd, DebuggableCall debuggableCall)
</ins><span class="cx"> {
</span><del>-    return emitCall(m_inTailPosition ? op_tail_call : op_call, dst, func, expectedFunction, callArguments, divot, divotStart, divotEnd);
</del><ins>+    return emitCall(m_inTailPosition ? op_tail_call : op_call, dst, func, expectedFunction, callArguments, divot, divotStart, divotEnd, debuggableCall);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-RegisterID* BytecodeGenerator::emitCallEval(RegisterID* dst, RegisterID* func, CallArguments&amp; callArguments, const JSTextPosition&amp; divot, const JSTextPosition&amp; divotStart, const JSTextPosition&amp; divotEnd)
</del><ins>+RegisterID* BytecodeGenerator::emitCallEval(RegisterID* dst, RegisterID* func, CallArguments&amp; callArguments, const JSTextPosition&amp; divot, const JSTextPosition&amp; divotStart, const JSTextPosition&amp; divotEnd, DebuggableCall debuggableCall)
</ins><span class="cx"> {
</span><del>-    return emitCall(op_call_eval, dst, func, NoExpectedFunction, callArguments, divot, divotStart, divotEnd);
</del><ins>+    return emitCall(op_call_eval, dst, func, NoExpectedFunction, callArguments, divot, divotStart, divotEnd, debuggableCall);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> ExpectedFunction BytecodeGenerator::expectedFunctionForIdentifier(const Identifier&amp; identifier)
</span><span class="lines">@@ -3153,7 +3153,7 @@
</span><span class="cx">     return expectedFunction;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-RegisterID* BytecodeGenerator::emitCall(OpcodeID opcodeID, RegisterID* dst, RegisterID* func, ExpectedFunction expectedFunction, CallArguments&amp; callArguments, const JSTextPosition&amp; divot, const JSTextPosition&amp; divotStart, const JSTextPosition&amp; divotEnd)
</del><ins>+RegisterID* BytecodeGenerator::emitCall(OpcodeID opcodeID, RegisterID* dst, RegisterID* func, ExpectedFunction expectedFunction, CallArguments&amp; callArguments, const JSTextPosition&amp; divot, const JSTextPosition&amp; divotStart, const JSTextPosition&amp; divotEnd, DebuggableCall debuggableCall)
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(opcodeID == op_call || opcodeID == op_call_eval || opcodeID == op_tail_call);
</span><span class="cx">     ASSERT(func-&gt;refCount());
</span><span class="lines">@@ -3168,7 +3168,7 @@
</span><span class="cx">             RefPtr&lt;RegisterID&gt; argumentRegister;
</span><span class="cx">             argumentRegister = expression-&gt;emitBytecode(*this, callArguments.argumentRegister(0));
</span><span class="cx">             RefPtr&lt;RegisterID&gt; thisRegister = emitMove(newTemporary(), callArguments.thisRegister());
</span><del>-            return emitCallVarargs(opcodeID == op_tail_call ? op_tail_call_varargs : op_call_varargs, dst, func, callArguments.thisRegister(), argumentRegister.get(), newTemporary(), 0, divot, divotStart, divotEnd);
</del><ins>+            return emitCallVarargs(opcodeID == op_tail_call ? op_tail_call_varargs : op_call_varargs, dst, func, callArguments.thisRegister(), argumentRegister.get(), newTemporary(), 0, divot, divotStart, divotEnd, debuggableCall);
</ins><span class="cx">         }
</span><span class="cx">         for (; n; n = n-&gt;m_next)
</span><span class="cx">             emitNode(callArguments.argumentRegister(argument++), n);
</span><span class="lines">@@ -3179,6 +3179,9 @@
</span><span class="cx">     for (int i = 0; i &lt; CallFrame::headerSizeInRegisters; ++i)
</span><span class="cx">         callFrame.append(newTemporary());
</span><span class="cx"> 
</span><ins>+    if (m_shouldEmitDebugHooks &amp;&amp; debuggableCall == DebuggableCall::Yes)
+        emitDebugHook(WillExecuteExpression, divotStart.line, divotStart.offset, divotStart.lineStartOffset);
+
</ins><span class="cx">     emitExpressionInfo(divot, divotStart, divotEnd);
</span><span class="cx"> 
</span><span class="cx">     RefPtr&lt;Label&gt; done = newLabel();
</span><span class="lines">@@ -3207,29 +3210,32 @@
</span><span class="cx">     return dst;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-RegisterID* BytecodeGenerator::emitCallVarargs(RegisterID* dst, RegisterID* func, RegisterID* thisRegister, RegisterID* arguments, RegisterID* firstFreeRegister, int32_t firstVarArgOffset, const JSTextPosition&amp; divot, const JSTextPosition&amp; divotStart, const JSTextPosition&amp; divotEnd)
</del><ins>+RegisterID* BytecodeGenerator::emitCallVarargs(RegisterID* dst, RegisterID* func, RegisterID* thisRegister, RegisterID* arguments, RegisterID* firstFreeRegister, int32_t firstVarArgOffset, const JSTextPosition&amp; divot, const JSTextPosition&amp; divotStart, const JSTextPosition&amp; divotEnd, DebuggableCall debuggableCall)
</ins><span class="cx"> {
</span><del>-    return emitCallVarargs(op_call_varargs, dst, func, thisRegister, arguments, firstFreeRegister, firstVarArgOffset, divot, divotStart, divotEnd);
</del><ins>+    return emitCallVarargs(op_call_varargs, dst, func, thisRegister, arguments, firstFreeRegister, firstVarArgOffset, divot, divotStart, divotEnd, debuggableCall);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-RegisterID* BytecodeGenerator::emitCallVarargsInTailPosition(RegisterID* dst, RegisterID* func, RegisterID* thisRegister, RegisterID* arguments, RegisterID* firstFreeRegister, int32_t firstVarArgOffset, const JSTextPosition&amp; divot, const JSTextPosition&amp; divotStart, const JSTextPosition&amp; divotEnd)
</del><ins>+RegisterID* BytecodeGenerator::emitCallVarargsInTailPosition(RegisterID* dst, RegisterID* func, RegisterID* thisRegister, RegisterID* arguments, RegisterID* firstFreeRegister, int32_t firstVarArgOffset, const JSTextPosition&amp; divot, const JSTextPosition&amp; divotStart, const JSTextPosition&amp; divotEnd, DebuggableCall debuggableCall)
</ins><span class="cx"> {
</span><del>-    return emitCallVarargs(m_inTailPosition ? op_tail_call_varargs : op_call_varargs, dst, func, thisRegister, arguments, firstFreeRegister, firstVarArgOffset, divot, divotStart, divotEnd);
</del><ins>+    return emitCallVarargs(m_inTailPosition ? op_tail_call_varargs : op_call_varargs, dst, func, thisRegister, arguments, firstFreeRegister, firstVarArgOffset, divot, divotStart, divotEnd, debuggableCall);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-RegisterID* BytecodeGenerator::emitConstructVarargs(RegisterID* dst, RegisterID* func, RegisterID* thisRegister, RegisterID* arguments, RegisterID* firstFreeRegister, int32_t firstVarArgOffset, const JSTextPosition&amp; divot, const JSTextPosition&amp; divotStart, const JSTextPosition&amp; divotEnd)
</del><ins>+RegisterID* BytecodeGenerator::emitConstructVarargs(RegisterID* dst, RegisterID* func, RegisterID* thisRegister, RegisterID* arguments, RegisterID* firstFreeRegister, int32_t firstVarArgOffset, const JSTextPosition&amp; divot, const JSTextPosition&amp; divotStart, const JSTextPosition&amp; divotEnd, DebuggableCall debuggableCall)
</ins><span class="cx"> {
</span><del>-    return emitCallVarargs(op_construct_varargs, dst, func, thisRegister, arguments, firstFreeRegister, firstVarArgOffset, divot, divotStart, divotEnd);
</del><ins>+    return emitCallVarargs(op_construct_varargs, dst, func, thisRegister, arguments, firstFreeRegister, firstVarArgOffset, divot, divotStart, divotEnd, debuggableCall);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-RegisterID* BytecodeGenerator::emitCallForwardArgumentsInTailPosition(RegisterID* dst, RegisterID* func, RegisterID* thisRegister, RegisterID* firstFreeRegister, int32_t firstVarArgOffset, const JSTextPosition&amp; divot, const JSTextPosition&amp; divotStart, const JSTextPosition&amp; divotEnd)
</del><ins>+RegisterID* BytecodeGenerator::emitCallForwardArgumentsInTailPosition(RegisterID* dst, RegisterID* func, RegisterID* thisRegister, RegisterID* firstFreeRegister, int32_t firstVarArgOffset, const JSTextPosition&amp; divot, const JSTextPosition&amp; divotStart, const JSTextPosition&amp; divotEnd, DebuggableCall debuggableCall)
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(m_inTailPosition);
</span><del>-    return emitCallVarargs(op_tail_call_forward_arguments, dst, func, thisRegister, nullptr, firstFreeRegister, firstVarArgOffset, divot, divotStart, divotEnd);
</del><ins>+    return emitCallVarargs(op_tail_call_forward_arguments, dst, func, thisRegister, nullptr, firstFreeRegister, firstVarArgOffset, divot, divotStart, divotEnd, debuggableCall);
</ins><span class="cx"> }
</span><span class="cx">     
</span><del>-RegisterID* BytecodeGenerator::emitCallVarargs(OpcodeID opcode, RegisterID* dst, RegisterID* func, RegisterID* thisRegister, RegisterID* arguments, RegisterID* firstFreeRegister, int32_t firstVarArgOffset, const JSTextPosition&amp; divot, const JSTextPosition&amp; divotStart, const JSTextPosition&amp; divotEnd)
</del><ins>+RegisterID* BytecodeGenerator::emitCallVarargs(OpcodeID opcode, RegisterID* dst, RegisterID* func, RegisterID* thisRegister, RegisterID* arguments, RegisterID* firstFreeRegister, int32_t firstVarArgOffset, const JSTextPosition&amp; divot, const JSTextPosition&amp; divotStart, const JSTextPosition&amp; divotEnd, DebuggableCall debuggableCall)
</ins><span class="cx"> {
</span><ins>+    if (m_shouldEmitDebugHooks &amp;&amp; debuggableCall == DebuggableCall::Yes)
+        emitDebugHook(WillExecuteExpression, divotStart.line, divotStart.offset, divotStart.lineStartOffset);
+
</ins><span class="cx">     emitExpressionInfo(divot, divotStart, divotEnd);
</span><span class="cx"> 
</span><span class="cx">     if (opcode == op_tail_call_varargs)
</span><span class="lines">@@ -3299,7 +3305,7 @@
</span><span class="cx">     emitMove(callArguments.argumentRegister(1), propertyNameRegister);
</span><span class="cx">     emitMove(callArguments.argumentRegister(2), descriptorRegister.get());
</span><span class="cx"> 
</span><del>-    emitCall(newTemporary(), definePropertyRegister.get(), NoExpectedFunction, callArguments, position, position, position);
</del><ins>+    emitCall(newTemporary(), definePropertyRegister.get(), NoExpectedFunction, callArguments, position, position, position, DebuggableCall::No);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> RegisterID* BytecodeGenerator::emitReturn(RegisterID* src)
</span><span class="lines">@@ -3356,7 +3362,7 @@
</span><span class="cx">             auto expression = static_cast&lt;SpreadExpressionNode*&gt;(n-&gt;m_expr)-&gt;expression();
</span><span class="cx">             RefPtr&lt;RegisterID&gt; argumentRegister;
</span><span class="cx">             argumentRegister = expression-&gt;emitBytecode(*this, callArguments.argumentRegister(0));
</span><del>-            return emitConstructVarargs(dst, func, callArguments.thisRegister(), argumentRegister.get(), newTemporary(), 0, divot, divotStart, divotEnd);
</del><ins>+            return emitConstructVarargs(dst, func, callArguments.thisRegister(), argumentRegister.get(), newTemporary(), 0, divot, divotStart, divotEnd, DebuggableCall::No);
</ins><span class="cx">         }
</span><span class="cx">         
</span><span class="cx">         for (ArgumentListNode* n = argumentsNode-&gt;m_listNode; n; n = n-&gt;m_next)
</span><span class="lines">@@ -3465,6 +3471,12 @@
</span><span class="cx">     instructions().append(false);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void BytecodeGenerator::emitWillLeaveCallFrameDebugHook()
+{
+    RELEASE_ASSERT(m_scopeNode-&gt;isFunctionNode());
+    emitDebugHook(WillLeaveCallFrame, m_scopeNode-&gt;lastLine(), m_scopeNode-&gt;startOffset(), m_scopeNode-&gt;lineStartOffset());
+}
+
</ins><span class="cx"> void BytecodeGenerator::pushFinallyContext(StatementNode* finallyBlock)
</span><span class="cx"> {
</span><span class="cx">     // Reclaim free label scopes.
</span><span class="lines">@@ -4057,7 +4069,7 @@
</span><span class="cx">     return false;
</span><span class="cx"> }
</span><span class="cx">     
</span><del>-void BytecodeGenerator::emitEnumeration(ThrowableExpressionData* node, ExpressionNode* subjectNode, const std::function&lt;void(BytecodeGenerator&amp;, RegisterID*)&gt;&amp; callBack, VariableEnvironmentNode* forLoopNode, RegisterID* forLoopSymbolTable)
</del><ins>+void BytecodeGenerator::emitEnumeration(ThrowableExpressionData* node, ExpressionNode* subjectNode, const std::function&lt;void(BytecodeGenerator&amp;, RegisterID*)&gt;&amp; callBack, ForOfNode* forLoopNode, RegisterID* forLoopSymbolTable)
</ins><span class="cx"> {
</span><span class="cx">     RefPtr&lt;RegisterID&gt; subject = newTemporary();
</span><span class="cx">     emitNode(subject.get(), subjectNode);
</span><span class="lines">@@ -4065,7 +4077,7 @@
</span><span class="cx">     {
</span><span class="cx">         CallArguments args(*this, nullptr);
</span><span class="cx">         emitMove(args.thisRegister(), subject.get());
</span><del>-        emitCall(iterator.get(), iterator.get(), NoExpectedFunction, args, node-&gt;divot(), node-&gt;divotStart(), node-&gt;divotEnd());
</del><ins>+        emitCall(iterator.get(), iterator.get(), NoExpectedFunction, args, node-&gt;divot(), node-&gt;divotStart(), node-&gt;divotEnd(), DebuggableCall::No);
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     RefPtr&lt;Label&gt; loopDone = newLabel();
</span><span class="lines">@@ -4107,7 +4119,7 @@
</span><span class="cx"> 
</span><span class="cx">             CallArguments returnArguments(*this, nullptr);
</span><span class="cx">             emitMove(returnArguments.thisRegister(), iterator.get());
</span><del>-            emitCall(value.get(), returnMethod.get(), NoExpectedFunction, returnArguments, node-&gt;divot(), node-&gt;divotStart(), node-&gt;divotEnd());
</del><ins>+            emitCall(value.get(), returnMethod.get(), NoExpectedFunction, returnArguments, node-&gt;divot(), node-&gt;divotStart(), node-&gt;divotEnd(), DebuggableCall::No);
</ins><span class="cx"> 
</span><span class="cx">             emitLabel(catchDone.get());
</span><span class="cx">             emitThrow(exceptionRegister.get());
</span><span class="lines">@@ -4119,8 +4131,11 @@
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         emitLabel(scope-&gt;continueTarget());
</span><del>-        if (forLoopNode)
</del><ins>+        if (forLoopNode) {
+            RELEASE_ASSERT(forLoopNode-&gt;isForOfNode());
</ins><span class="cx">             prepareLexicalScopeForNextForLoopIteration(forLoopNode, forLoopSymbolTable);
</span><ins>+            emitDebugHook(WillExecuteStatement, forLoopNode-&gt;expr()-&gt;firstLine(), forLoopNode-&gt;expr()-&gt;startOffset(), forLoopNode-&gt;expr()-&gt;lineStartOffset());
+        }
</ins><span class="cx"> 
</span><span class="cx">         {
</span><span class="cx">             emitIteratorNext(value.get(), iterator.get(), node);
</span><span class="lines">@@ -4162,7 +4177,7 @@
</span><span class="cx"> 
</span><span class="cx">     CallArguments arguments(*this, nullptr);
</span><span class="cx">     emitLoad(arguments.thisRegister(), JSValue(addTemplateRegistryKeyConstant(TemplateRegistryKey(rawStrings, cookedStrings))));
</span><del>-    return emitCall(dst, getTemplateObject.get(), NoExpectedFunction, arguments, taggedTemplate-&gt;divot(), taggedTemplate-&gt;divotStart(), taggedTemplate-&gt;divotEnd());
</del><ins>+    return emitCall(dst, getTemplateObject.get(), NoExpectedFunction, arguments, taggedTemplate-&gt;divot(), taggedTemplate-&gt;divotStart(), taggedTemplate-&gt;divotEnd(), DebuggableCall::No);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> RegisterID* BytecodeGenerator::emitGetEnumerableLength(RegisterID* dst, RegisterID* base)
</span><span class="lines">@@ -4276,7 +4291,7 @@
</span><span class="cx">         RefPtr&lt;RegisterID&gt; next = emitGetById(newTemporary(), iterator, propertyNames().next);
</span><span class="cx">         CallArguments nextArguments(*this, nullptr);
</span><span class="cx">         emitMove(nextArguments.thisRegister(), iterator);
</span><del>-        emitCall(dst, next.get(), NoExpectedFunction, nextArguments, node-&gt;divot(), node-&gt;divotStart(), node-&gt;divotEnd());
</del><ins>+        emitCall(dst, next.get(), NoExpectedFunction, nextArguments, node-&gt;divot(), node-&gt;divotStart(), node-&gt;divotEnd(), DebuggableCall::No);
</ins><span class="cx">     }
</span><span class="cx">     {
</span><span class="cx">         RefPtr&lt;Label&gt; typeIsObject = newLabel();
</span><span class="lines">@@ -4294,7 +4309,7 @@
</span><span class="cx">         CallArguments nextArguments(*this, nullptr, 1);
</span><span class="cx">         emitMove(nextArguments.thisRegister(), iterator);
</span><span class="cx">         emitMove(nextArguments.argumentRegister(0), value);
</span><del>-        emitCall(dst, next.get(), NoExpectedFunction, nextArguments, node-&gt;divot(), node-&gt;divotStart(), node-&gt;divotEnd());
</del><ins>+        emitCall(dst, next.get(), NoExpectedFunction, nextArguments, node-&gt;divot(), node-&gt;divotStart(), node-&gt;divotEnd(), DebuggableCall::No);
</ins><span class="cx">     }
</span><span class="cx">     {
</span><span class="cx">         RefPtr&lt;Label&gt; typeIsObject = newLabel();
</span><span class="lines">@@ -4314,7 +4329,7 @@
</span><span class="cx">     RefPtr&lt;RegisterID&gt; value = newTemporary();
</span><span class="cx">     CallArguments returnArguments(*this, nullptr);
</span><span class="cx">     emitMove(returnArguments.thisRegister(), iterator);
</span><del>-    emitCall(value.get(), returnMethod.get(), NoExpectedFunction, returnArguments, node-&gt;divot(), node-&gt;divotStart(), node-&gt;divotEnd());
</del><ins>+    emitCall(value.get(), returnMethod.get(), NoExpectedFunction, returnArguments, node-&gt;divot(), node-&gt;divotStart(), node-&gt;divotEnd(), DebuggableCall::No);
</ins><span class="cx">     emitJumpIfTrue(emitIsObject(newTemporary(), value.get()), done.get());
</span><span class="cx">     emitThrowTypeError(ASCIILiteral(&quot;Iterator result interface is not an object.&quot;));
</span><span class="cx">     emitLabel(done.get());
</span><span class="lines">@@ -4565,7 +4580,7 @@
</span><span class="cx">         {
</span><span class="cx">             CallArguments args(*this, nullptr);
</span><span class="cx">             emitMove(args.thisRegister(), argument);
</span><del>-            emitCall(iterator.get(), iterator.get(), NoExpectedFunction, args, node-&gt;divot(), node-&gt;divotStart(), node-&gt;divotEnd());
</del><ins>+            emitCall(iterator.get(), iterator.get(), NoExpectedFunction, args, node-&gt;divot(), node-&gt;divotStart(), node-&gt;divotEnd(), DebuggableCall::No);
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         RefPtr&lt;Label&gt; loopDone = newLabel();
</span><span class="lines">@@ -4609,7 +4624,7 @@
</span><span class="cx">                     CallArguments throwArguments(*this, nullptr, 1);
</span><span class="cx">                     emitMove(throwArguments.thisRegister(), iterator.get());
</span><span class="cx">                     emitMove(throwArguments.argumentRegister(0), generatorValueRegister());
</span><del>-                    emitCall(value.get(), throwMethod.get(), NoExpectedFunction, throwArguments, node-&gt;divot(), node-&gt;divotStart(), node-&gt;divotEnd());
</del><ins>+                    emitCall(value.get(), throwMethod.get(), NoExpectedFunction, throwArguments, node-&gt;divot(), node-&gt;divotStart(), node-&gt;divotEnd(), DebuggableCall::No);
</ins><span class="cx"> 
</span><span class="cx">                     emitJumpIfTrue(emitIsObject(newTemporary(), value.get()), branchOnResult.get());
</span><span class="cx">                     emitThrowTypeError(ASCIILiteral(&quot;Iterator result interface is not an object.&quot;));
</span><span class="lines">@@ -4631,7 +4646,7 @@
</span><span class="cx">                     CallArguments returnArguments(*this, nullptr, 1);
</span><span class="cx">                     emitMove(returnArguments.thisRegister(), iterator.get());
</span><span class="cx">                     emitMove(returnArguments.argumentRegister(0), generatorValueRegister());
</span><del>-                    emitCall(value.get(), returnMethod.get(), NoExpectedFunction, returnArguments, node-&gt;divot(), node-&gt;divotStart(), node-&gt;divotEnd());
</del><ins>+                    emitCall(value.get(), returnMethod.get(), NoExpectedFunction, returnArguments, node-&gt;divot(), node-&gt;divotStart(), node-&gt;divotEnd(), DebuggableCall::No);
</ins><span class="cx"> 
</span><span class="cx">                     RefPtr&lt;Label&gt; returnIteratorResultIsObject = newLabel();
</span><span class="cx">                     emitJumpIfTrue(emitIsObject(newTemporary(), value.get()), returnIteratorResultIsObject.get());
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorebytecompilerBytecodeGeneratorh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.h (206651 => 206652)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.h        2016-09-30 19:19:44 UTC (rev 206651)
+++ trunk/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.h        2016-09-30 19:22:37 UTC (rev 206652)
</span><span class="lines">@@ -61,6 +61,7 @@
</span><span class="cx">         ExpectArrayConstructor
</span><span class="cx">     };
</span><span class="cx"> 
</span><ins>+    enum class DebuggableCall { Yes, No };
</ins><span class="cx">     enum class ThisResolutionType { Local, Scoped };
</span><span class="cx">     
</span><span class="cx">     class CallArguments {
</span><span class="lines">@@ -574,12 +575,12 @@
</span><span class="cx">         void emitPutSetterByVal(RegisterID* base, RegisterID* property, unsigned propertyDescriptorOptions, RegisterID* setter);
</span><span class="cx">         
</span><span class="cx">         ExpectedFunction expectedFunctionForIdentifier(const Identifier&amp;);
</span><del>-        RegisterID* emitCall(RegisterID* dst, RegisterID* func, ExpectedFunction, CallArguments&amp;, const JSTextPosition&amp; divot, const JSTextPosition&amp; divotStart, const JSTextPosition&amp; divotEnd);
-        RegisterID* emitCallInTailPosition(RegisterID* dst, RegisterID* func, ExpectedFunction, CallArguments&amp;, const JSTextPosition&amp; divot, const JSTextPosition&amp; divotStart, const JSTextPosition&amp; divotEnd);
-        RegisterID* emitCallEval(RegisterID* dst, RegisterID* func, CallArguments&amp;, const JSTextPosition&amp; divot, const JSTextPosition&amp; divotStart, const JSTextPosition&amp; divotEnd);
-        RegisterID* emitCallVarargs(RegisterID* dst, RegisterID* func, RegisterID* thisRegister, RegisterID* arguments, RegisterID* firstFreeRegister, int32_t firstVarArgOffset, const JSTextPosition&amp; divot, const JSTextPosition&amp; divotStart, const JSTextPosition&amp; divotEnd);
-        RegisterID* emitCallVarargsInTailPosition(RegisterID* dst, RegisterID* func, RegisterID* thisRegister, RegisterID* arguments, RegisterID* firstFreeRegister, int32_t firstVarArgOffset, const JSTextPosition&amp; divot, const JSTextPosition&amp; divotStart, const JSTextPosition&amp; divotEnd);
-        RegisterID* emitCallForwardArgumentsInTailPosition(RegisterID* dst, RegisterID* func, RegisterID* thisRegister, RegisterID* firstFreeRegister, int32_t firstVarArgOffset, const JSTextPosition&amp; divot, const JSTextPosition&amp; divotStart, const JSTextPosition&amp; divotEnd);
</del><ins>+        RegisterID* emitCall(RegisterID* dst, RegisterID* func, ExpectedFunction, CallArguments&amp;, const JSTextPosition&amp; divot, const JSTextPosition&amp; divotStart, const JSTextPosition&amp; divotEnd, DebuggableCall);
+        RegisterID* emitCallInTailPosition(RegisterID* dst, RegisterID* func, ExpectedFunction, CallArguments&amp;, const JSTextPosition&amp; divot, const JSTextPosition&amp; divotStart, const JSTextPosition&amp; divotEnd, DebuggableCall);
+        RegisterID* emitCallEval(RegisterID* dst, RegisterID* func, CallArguments&amp;, const JSTextPosition&amp; divot, const JSTextPosition&amp; divotStart, const JSTextPosition&amp; divotEnd, DebuggableCall);
+        RegisterID* emitCallVarargs(RegisterID* dst, RegisterID* func, RegisterID* thisRegister, RegisterID* arguments, RegisterID* firstFreeRegister, int32_t firstVarArgOffset, const JSTextPosition&amp; divot, const JSTextPosition&amp; divotStart, const JSTextPosition&amp; divotEnd, DebuggableCall);
+        RegisterID* emitCallVarargsInTailPosition(RegisterID* dst, RegisterID* func, RegisterID* thisRegister, RegisterID* arguments, RegisterID* firstFreeRegister, int32_t firstVarArgOffset, const JSTextPosition&amp; divot, const JSTextPosition&amp; divotStart, const JSTextPosition&amp; divotEnd, DebuggableCall);
+        RegisterID* emitCallForwardArgumentsInTailPosition(RegisterID* dst, RegisterID* func, RegisterID* thisRegister, RegisterID* firstFreeRegister, int32_t firstVarArgOffset, const JSTextPosition&amp; divot, const JSTextPosition&amp; divotStart, const JSTextPosition&amp; divotEnd, DebuggableCall);
</ins><span class="cx"> 
</span><span class="cx">         enum PropertyDescriptorOption {
</span><span class="cx">             PropertyConfigurable = 1,
</span><span class="lines">@@ -589,7 +590,7 @@
</span><span class="cx">         void emitCallDefineProperty(RegisterID* newObj, RegisterID* propertyNameRegister,
</span><span class="cx">             RegisterID* valueRegister, RegisterID* getterRegister, RegisterID* setterRegister, unsigned options, const JSTextPosition&amp;);
</span><span class="cx"> 
</span><del>-        void emitEnumeration(ThrowableExpressionData* enumerationNode, ExpressionNode* subjectNode, const std::function&lt;void(BytecodeGenerator&amp;, RegisterID*)&gt;&amp; callBack, VariableEnvironmentNode* = nullptr, RegisterID* forLoopSymbolTable = nullptr);
</del><ins>+        void emitEnumeration(ThrowableExpressionData* enumerationNode, ExpressionNode* subjectNode, const std::function&lt;void(BytecodeGenerator&amp;, RegisterID*)&gt;&amp; callBack, ForOfNode* = nullptr, RegisterID* forLoopSymbolTable = nullptr);
</ins><span class="cx"> 
</span><span class="cx">         RegisterID* emitGetTemplateObject(RegisterID* dst, TaggedTemplateNode*);
</span><span class="cx"> 
</span><span class="lines">@@ -676,6 +677,7 @@
</span><span class="cx">         RegisterID* emitLoadDerivedConstructorFromArrowFunctionLexicalEnvironment();
</span><span class="cx"> 
</span><span class="cx">         void emitDebugHook(DebugHookID, unsigned line, unsigned charOffset, unsigned lineStart);
</span><ins>+        void emitWillLeaveCallFrameDebugHook();
</ins><span class="cx"> 
</span><span class="cx">         bool isInFinallyBlock() { return m_finallyDepth &gt; 0; }
</span><span class="cx"> 
</span><span class="lines">@@ -787,7 +789,7 @@
</span><span class="cx">         // (i.e. &quot;Object()&quot; is identical to &quot;new Object()&quot;).
</span><span class="cx">         ExpectedFunction emitExpectedFunctionSnippet(RegisterID* dst, RegisterID* func, ExpectedFunction, CallArguments&amp;, Label* done);
</span><span class="cx">         
</span><del>-        RegisterID* emitCall(OpcodeID, RegisterID* dst, RegisterID* func, ExpectedFunction, CallArguments&amp;, const JSTextPosition&amp; divot, const JSTextPosition&amp; divotStart, const JSTextPosition&amp; divotEnd);
</del><ins>+        RegisterID* emitCall(OpcodeID, RegisterID* dst, RegisterID* func, ExpectedFunction, CallArguments&amp;, const JSTextPosition&amp; divot, const JSTextPosition&amp; divotStart, const JSTextPosition&amp; divotEnd, DebuggableCall);
</ins><span class="cx"> 
</span><span class="cx">         RegisterID* newRegister();
</span><span class="cx"> 
</span><span class="lines">@@ -853,8 +855,8 @@
</span><span class="cx"> 
</span><span class="cx">         void getVariablesUnderTDZ(VariableEnvironment&amp;);
</span><span class="cx"> 
</span><del>-        RegisterID* emitConstructVarargs(RegisterID* dst, RegisterID* func, RegisterID* thisRegister, RegisterID* arguments, RegisterID* firstFreeRegister, int32_t firstVarArgOffset, const JSTextPosition&amp; divot, const JSTextPosition&amp; divotStart, const JSTextPosition&amp; divotEnd);
-        RegisterID* emitCallVarargs(OpcodeID, RegisterID* dst, RegisterID* func, RegisterID* thisRegister, RegisterID* arguments, RegisterID* firstFreeRegister, int32_t firstVarArgOffset, const JSTextPosition&amp; divot, const JSTextPosition&amp; divotStart, const JSTextPosition&amp; divotEnd);
</del><ins>+        RegisterID* emitConstructVarargs(RegisterID* dst, RegisterID* func, RegisterID* thisRegister, RegisterID* arguments, RegisterID* firstFreeRegister, int32_t firstVarArgOffset, const JSTextPosition&amp; divot, const JSTextPosition&amp; divotStart, const JSTextPosition&amp; divotEnd, DebuggableCall);
+        RegisterID* emitCallVarargs(OpcodeID, RegisterID* dst, RegisterID* func, RegisterID* thisRegister, RegisterID* arguments, RegisterID* firstFreeRegister, int32_t firstVarArgOffset, const JSTextPosition&amp; divot, const JSTextPosition&amp; divotStart, const JSTextPosition&amp; divotEnd, DebuggableCall);
</ins><span class="cx">         
</span><span class="cx">         void emitLogShadowChickenPrologueIfNecessary();
</span><span class="cx">         void emitLogShadowChickenTailIfNecessary();
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorebytecompilerNodesCodegencpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp (206651 => 206652)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp        2016-09-30 19:19:44 UTC (rev 206651)
+++ trunk/Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp        2016-09-30 19:22:37 UTC (rev 206652)
</span><span class="lines">@@ -339,7 +339,7 @@
</span><span class="cx">     for (TemplateExpressionListNode* templateExpression = m_templateLiteral-&gt;templateExpressions(); templateExpression; templateExpression = templateExpression-&gt;next())
</span><span class="cx">         generator.emitNode(callArguments.argumentRegister(argumentIndex++), templateExpression-&gt;value());
</span><span class="cx"> 
</span><del>-    return generator.emitCallInTailPosition(generator.finalDestination(dst, tag.get()), tag.get(), expectedFunction, callArguments, divot(), divotStart(), divotEnd());
</del><ins>+    return generator.emitCallInTailPosition(generator.finalDestination(dst, tag.get()), tag.get(), expectedFunction, callArguments, divot(), divotStart(), divotEnd(), DebuggableCall::Yes);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> // ------------------------------ ArrayNode ------------------------------------
</span><span class="lines">@@ -753,7 +753,7 @@
</span><span class="cx">         RefPtr&lt;RegisterID&gt; func = generator.emitMove(generator.tempDestination(dst), local);
</span><span class="cx">         CallArguments callArguments(generator, m_args);
</span><span class="cx">         generator.emitLoad(callArguments.thisRegister(), jsUndefined());
</span><del>-        return generator.emitCallEval(generator.finalDestination(dst, func.get()), func.get(), callArguments, divot(), divotStart(), divotEnd());
</del><ins>+        return generator.emitCallEval(generator.finalDestination(dst, func.get()), func.get(), callArguments, divot(), divotStart(), divotEnd(), DebuggableCall::No);
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     RefPtr&lt;RegisterID&gt; func = generator.newTemporary();
</span><span class="lines">@@ -765,7 +765,7 @@
</span><span class="cx">         generator.emitResolveScope(callArguments.thisRegister(), var));
</span><span class="cx">     generator.emitGetFromScope(func.get(), callArguments.thisRegister(), var, ThrowIfNotFound);
</span><span class="cx">     generator.emitTDZCheckIfNecessary(var, func.get(), nullptr);
</span><del>-    return generator.emitCallEval(generator.finalDestination(dst, func.get()), func.get(), callArguments, divot(), divotStart(), divotEnd());
</del><ins>+    return generator.emitCallEval(generator.finalDestination(dst, func.get()), func.get(), callArguments, divot(), divotStart(), divotEnd(), DebuggableCall::No);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> // ------------------------------ FunctionCallValueNode ----------------------------------
</span><span class="lines">@@ -804,7 +804,7 @@
</span><span class="cx">     RefPtr&lt;RegisterID&gt; returnValue = generator.finalDestination(dst, func.get());
</span><span class="cx">     CallArguments callArguments(generator, m_args);
</span><span class="cx">     generator.emitLoad(callArguments.thisRegister(), jsUndefined());
</span><del>-    RegisterID* ret = generator.emitCallInTailPosition(returnValue.get(), func.get(), NoExpectedFunction, callArguments, divot(), divotStart(), divotEnd());
</del><ins>+    RegisterID* ret = generator.emitCallInTailPosition(returnValue.get(), func.get(), NoExpectedFunction, callArguments, divot(), divotStart(), divotEnd(), DebuggableCall::Yes);
</ins><span class="cx">     generator.emitProfileType(returnValue.get(), divotStart(), divotEnd());
</span><span class="cx">     return ret;
</span><span class="cx"> }
</span><span class="lines">@@ -824,7 +824,7 @@
</span><span class="cx">         generator.emitLoad(callArguments.thisRegister(), jsUndefined());
</span><span class="cx">         // This passes NoExpectedFunction because we expect that if the function is in a
</span><span class="cx">         // local variable, then it's not one of our built-in constructors.
</span><del>-        RegisterID* ret = generator.emitCallInTailPosition(returnValue.get(), func.get(), NoExpectedFunction, callArguments, divot(), divotStart(), divotEnd());
</del><ins>+        RegisterID* ret = generator.emitCallInTailPosition(returnValue.get(), func.get(), NoExpectedFunction, callArguments, divot(), divotStart(), divotEnd(), DebuggableCall::Yes);
</ins><span class="cx">         generator.emitProfileType(returnValue.get(), divotStart(), divotEnd());
</span><span class="cx">         return ret;
</span><span class="cx">     }
</span><span class="lines">@@ -840,7 +840,7 @@
</span><span class="cx">         generator.emitResolveScope(callArguments.thisRegister(), var));
</span><span class="cx">     generator.emitGetFromScope(func.get(), callArguments.thisRegister(), var, ThrowIfNotFound);
</span><span class="cx">     generator.emitTDZCheckIfNecessary(var, func.get(), nullptr);
</span><del>-    RegisterID* ret = generator.emitCallInTailPosition(returnValue.get(), func.get(), expectedFunction, callArguments, divot(), divotStart(), divotEnd());
</del><ins>+    RegisterID* ret = generator.emitCallInTailPosition(returnValue.get(), func.get(), expectedFunction, callArguments, divot(), divotStart(), divotEnd(), DebuggableCall::Yes);
</ins><span class="cx">     generator.emitProfileType(returnValue.get(), divotStart(), divotEnd());
</span><span class="cx">     return ret;
</span><span class="cx"> }
</span><span class="lines">@@ -895,7 +895,7 @@
</span><span class="cx">     ASSERT(!node-&gt;m_next);
</span><span class="cx"> 
</span><span class="cx">     RefPtr&lt;RegisterID&gt; finalDst = generator.finalDestination(dst);
</span><del>-    return generator.emitCallForwardArgumentsInTailPosition(finalDst.get(), function.get(), thisRegister.get(), generator.newTemporary(), 0, divot(), divotStart(), divotEnd());
</del><ins>+    return generator.emitCallForwardArgumentsInTailPosition(finalDst.get(), function.get(), thisRegister.get(), generator.newTemporary(), 0, divot(), divotStart(), divotEnd(), DebuggableCall::No);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> RegisterID* BytecodeIntrinsicNode::emit_intrinsic_tryGetById(BytecodeGenerator&amp; generator, RegisterID* dst)
</span><span class="lines">@@ -1063,7 +1063,7 @@
</span><span class="cx">         generator.emitMove(callArguments.thisRegister(), thisRegister.get());
</span><span class="cx">     } else
</span><span class="cx">         generator.emitMove(callArguments.thisRegister(), base.get());
</span><del>-    RegisterID* ret = generator.emitCallInTailPosition(returnValue.get(), function.get(), NoExpectedFunction, callArguments, divot(), divotStart(), divotEnd());
</del><ins>+    RegisterID* ret = generator.emitCallInTailPosition(returnValue.get(), function.get(), NoExpectedFunction, callArguments, divot(), divotStart(), divotEnd(), DebuggableCall::Yes);
</ins><span class="cx">     generator.emitProfileType(returnValue.get(), divotStart(), divotEnd());
</span><span class="cx">     return ret;
</span><span class="cx"> }
</span><span class="lines">@@ -1086,7 +1086,7 @@
</span><span class="cx">         generator.emitGetById(function.get(), superBase.get(), callArguments.thisRegister(), m_ident);
</span><span class="cx">     } else
</span><span class="cx">         generator.emitGetById(function.get(), callArguments.thisRegister(), m_ident);
</span><del>-    RegisterID* ret = generator.emitCallInTailPosition(returnValue.get(), function.get(), NoExpectedFunction, callArguments, divot(), divotStart(), divotEnd());
</del><ins>+    RegisterID* ret = generator.emitCallInTailPosition(returnValue.get(), function.get(), NoExpectedFunction, callArguments, divot(), divotStart(), divotEnd(), DebuggableCall::Yes);
</ins><span class="cx">     generator.emitProfileType(returnValue.get(), divotStart(), divotEnd());
</span><span class="cx">     return ret;
</span><span class="cx"> }
</span><span class="lines">@@ -1116,7 +1116,7 @@
</span><span class="cx">             argumentsRegister = generator.emitNode(subject);
</span><span class="cx">             generator.emitExpressionInfo(spread-&gt;divot(), spread-&gt;divotStart(), spread-&gt;divotEnd());
</span><span class="cx">             RefPtr&lt;RegisterID&gt; thisRegister = generator.emitGetByVal(generator.newTemporary(), argumentsRegister.get(), generator.emitLoad(0, jsNumber(0)));
</span><del>-            generator.emitCallVarargsInTailPosition(returnValue.get(), base.get(), thisRegister.get(), argumentsRegister.get(), generator.newTemporary(), 1, divot(), divotStart(), divotEnd());
</del><ins>+            generator.emitCallVarargsInTailPosition(returnValue.get(), base.get(), thisRegister.get(), argumentsRegister.get(), generator.newTemporary(), 1, divot(), divotStart(), divotEnd(), DebuggableCall::Yes);
</ins><span class="cx">         } else if (m_args-&gt;m_listNode &amp;&amp; m_args-&gt;m_listNode-&gt;m_expr) {
</span><span class="cx">             ArgumentListNode* oldList = m_args-&gt;m_listNode;
</span><span class="cx">             m_args-&gt;m_listNode = m_args-&gt;m_listNode-&gt;m_next;
</span><span class="lines">@@ -1124,13 +1124,13 @@
</span><span class="cx">             RefPtr&lt;RegisterID&gt; realFunction = generator.emitMove(generator.tempDestination(dst), base.get());
</span><span class="cx">             CallArguments callArguments(generator, m_args);
</span><span class="cx">             generator.emitNode(callArguments.thisRegister(), oldList-&gt;m_expr);
</span><del>-            generator.emitCallInTailPosition(returnValue.get(), realFunction.get(), NoExpectedFunction, callArguments, divot(), divotStart(), divotEnd());
</del><ins>+            generator.emitCallInTailPosition(returnValue.get(), realFunction.get(), NoExpectedFunction, callArguments, divot(), divotStart(), divotEnd(), DebuggableCall::Yes);
</ins><span class="cx">             m_args-&gt;m_listNode = oldList;
</span><span class="cx">         } else {
</span><span class="cx">             RefPtr&lt;RegisterID&gt; realFunction = generator.emitMove(generator.tempDestination(dst), base.get());
</span><span class="cx">             CallArguments callArguments(generator, m_args);
</span><span class="cx">             generator.emitLoad(callArguments.thisRegister(), jsUndefined());
</span><del>-            generator.emitCallInTailPosition(returnValue.get(), realFunction.get(), NoExpectedFunction, callArguments, divot(), divotStart(), divotEnd());
</del><ins>+            generator.emitCallInTailPosition(returnValue.get(), realFunction.get(), NoExpectedFunction, callArguments, divot(), divotStart(), divotEnd(), DebuggableCall::Yes);
</ins><span class="cx">         }
</span><span class="cx">     }
</span><span class="cx">     if (emitCallCheck) {
</span><span class="lines">@@ -1139,7 +1139,7 @@
</span><span class="cx">         {
</span><span class="cx">             CallArguments callArguments(generator, m_args);
</span><span class="cx">             generator.emitMove(callArguments.thisRegister(), base.get());
</span><del>-            generator.emitCallInTailPosition(returnValue.get(), function.get(), NoExpectedFunction, callArguments, divot(), divotStart(), divotEnd());
</del><ins>+            generator.emitCallInTailPosition(returnValue.get(), function.get(), NoExpectedFunction, callArguments, divot(), divotStart(), divotEnd(), DebuggableCall::Yes);
</ins><span class="cx">         }
</span><span class="cx">         generator.emitLabel(end.get());
</span><span class="cx">     }
</span><span class="lines">@@ -1203,7 +1203,7 @@
</span><span class="cx">                     generator.emitLabel(end.get());
</span><span class="cx">                 };
</span><span class="cx">                 generator.emitEnumeration(this, spread-&gt;expression(), extractor);
</span><del>-                generator.emitCallVarargsInTailPosition(returnValue.get(), realFunction.get(), thisRegister.get(), argumentsRegister.get(), generator.newTemporary(), 0, divot(), divotStart(), divotEnd());
</del><ins>+                generator.emitCallVarargsInTailPosition(returnValue.get(), realFunction.get(), thisRegister.get(), argumentsRegister.get(), generator.newTemporary(), 0, divot(), divotStart(), divotEnd(), DebuggableCall::Yes);
</ins><span class="cx">             } else if (m_args-&gt;m_listNode-&gt;m_next) {
</span><span class="cx">                 ASSERT(m_args-&gt;m_listNode-&gt;m_next-&gt;m_expr-&gt;isSimpleArray());
</span><span class="cx">                 ASSERT(!m_args-&gt;m_listNode-&gt;m_next-&gt;m_next);
</span><span class="lines">@@ -1211,13 +1211,13 @@
</span><span class="cx">                 RefPtr&lt;RegisterID&gt; realFunction = generator.emitMove(generator.tempDestination(dst), base.get());
</span><span class="cx">                 CallArguments callArguments(generator, m_args);
</span><span class="cx">                 generator.emitNode(callArguments.thisRegister(), oldList-&gt;m_expr);
</span><del>-                generator.emitCallInTailPosition(returnValue.get(), realFunction.get(), NoExpectedFunction, callArguments, divot(), divotStart(), divotEnd());
</del><ins>+                generator.emitCallInTailPosition(returnValue.get(), realFunction.get(), NoExpectedFunction, callArguments, divot(), divotStart(), divotEnd(), DebuggableCall::Yes);
</ins><span class="cx">             } else {
</span><span class="cx">                 m_args-&gt;m_listNode = m_args-&gt;m_listNode-&gt;m_next;
</span><span class="cx">                 RefPtr&lt;RegisterID&gt; realFunction = generator.emitMove(generator.tempDestination(dst), base.get());
</span><span class="cx">                 CallArguments callArguments(generator, m_args);
</span><span class="cx">                 generator.emitNode(callArguments.thisRegister(), oldList-&gt;m_expr);
</span><del>-                generator.emitCallInTailPosition(returnValue.get(), realFunction.get(), NoExpectedFunction, callArguments, divot(), divotStart(), divotEnd());
</del><ins>+                generator.emitCallInTailPosition(returnValue.get(), realFunction.get(), NoExpectedFunction, callArguments, divot(), divotStart(), divotEnd(), DebuggableCall::Yes);
</ins><span class="cx">             }
</span><span class="cx">             m_args-&gt;m_listNode = oldList;
</span><span class="cx">         } else {
</span><span class="lines">@@ -1224,7 +1224,7 @@
</span><span class="cx">             RefPtr&lt;RegisterID&gt; realFunction = generator.emitMove(generator.tempDestination(dst), base.get());
</span><span class="cx">             CallArguments callArguments(generator, m_args);
</span><span class="cx">             generator.emitLoad(callArguments.thisRegister(), jsUndefined());
</span><del>-            generator.emitCallInTailPosition(returnValue.get(), realFunction.get(), NoExpectedFunction, callArguments, divot(), divotStart(), divotEnd());
</del><ins>+            generator.emitCallInTailPosition(returnValue.get(), realFunction.get(), NoExpectedFunction, callArguments, divot(), divotStart(), divotEnd(), DebuggableCall::Yes);
</ins><span class="cx">         }
</span><span class="cx">     } else {
</span><span class="cx">         ASSERT(m_args-&gt;m_listNode &amp;&amp; m_args-&gt;m_listNode-&gt;m_next);
</span><span class="lines">@@ -1239,7 +1239,7 @@
</span><span class="cx">         while ((args = args-&gt;m_next))
</span><span class="cx">             generator.emitNode(args-&gt;m_expr);
</span><span class="cx"> 
</span><del>-        generator.emitCallVarargsInTailPosition(returnValue.get(), realFunction.get(), thisRegister.get(), argsRegister.get(), generator.newTemporary(), 0, divot(), divotStart(), divotEnd());
</del><ins>+        generator.emitCallVarargsInTailPosition(returnValue.get(), realFunction.get(), thisRegister.get(), argsRegister.get(), generator.newTemporary(), 0, divot(), divotStart(), divotEnd(), DebuggableCall::Yes);
</ins><span class="cx">     }
</span><span class="cx">     if (emitCallCheck) {
</span><span class="cx">         generator.emitJump(end.get());
</span><span class="lines">@@ -1246,7 +1246,7 @@
</span><span class="cx">         generator.emitLabel(realCall.get());
</span><span class="cx">         CallArguments callArguments(generator, m_args);
</span><span class="cx">         generator.emitMove(callArguments.thisRegister(), base.get());
</span><del>-        generator.emitCallInTailPosition(returnValue.get(), function.get(), NoExpectedFunction, callArguments, divot(), divotStart(), divotEnd());
</del><ins>+        generator.emitCallInTailPosition(returnValue.get(), function.get(), NoExpectedFunction, callArguments, divot(), divotStart(), divotEnd(), DebuggableCall::Yes);
</ins><span class="cx">         generator.emitLabel(end.get());
</span><span class="cx">     }
</span><span class="cx">     generator.emitProfileType(returnValue.get(), divotStart(), divotEnd());
</span><span class="lines">@@ -2453,7 +2453,7 @@
</span><span class="cx"> 
</span><span class="cx"> void IfElseNode::emitBytecode(BytecodeGenerator&amp; generator, RegisterID* dst)
</span><span class="cx"> {
</span><del>-    generator.emitDebugHook(WillExecuteStatement, firstLine(), startOffset(), lineStartOffset());
</del><ins>+    generator.emitDebugHook(WillExecuteStatement, m_condition-&gt;firstLine(), m_condition-&gt;startOffset(), m_condition-&gt;lineStartOffset());
</ins><span class="cx">     
</span><span class="cx">     RefPtr&lt;Label&gt; beforeThen = generator.newLabel();
</span><span class="cx">     RefPtr&lt;Label&gt; beforeElse = generator.newLabel();
</span><span class="lines">@@ -2495,12 +2495,11 @@
</span><span class="cx">     RefPtr&lt;Label&gt; topOfLoop = generator.newLabel();
</span><span class="cx">     generator.emitLabel(topOfLoop.get());
</span><span class="cx">     generator.emitLoopHint();
</span><del>-    generator.emitDebugHook(WillExecuteStatement, lastLine(), startOffset(), lineStartOffset());
</del><span class="cx"> 
</span><span class="cx">     generator.emitNodeInTailPosition(dst, m_statement);
</span><span class="cx"> 
</span><span class="cx">     generator.emitLabel(scope-&gt;continueTarget());
</span><del>-    generator.emitDebugHook(WillExecuteStatement, lastLine(), startOffset(), lineStartOffset());
</del><ins>+    generator.emitDebugHook(WillExecuteStatement, m_expr-&gt;firstLine(), m_expr-&gt;startOffset(), m_expr-&gt;lineStartOffset());
</ins><span class="cx">     generator.emitNodeInConditionContext(m_expr, topOfLoop.get(), scope-&gt;breakTarget(), FallThroughMeansFalse);
</span><span class="cx"> 
</span><span class="cx">     generator.emitLabel(scope-&gt;breakTarget());
</span><span class="lines">@@ -2523,7 +2522,7 @@
</span><span class="cx">     generator.emitNodeInTailPosition(dst, m_statement);
</span><span class="cx"> 
</span><span class="cx">     generator.emitLabel(scope-&gt;continueTarget());
</span><del>-    generator.emitDebugHook(WillExecuteStatement, firstLine(), startOffset(), lineStartOffset());
</del><ins>+    generator.emitDebugHook(WillExecuteStatement, m_expr-&gt;firstLine(), m_expr-&gt;startOffset(), m_expr-&gt;lineStartOffset());
</ins><span class="cx"> 
</span><span class="cx">     generator.emitNodeInConditionContext(m_expr, topOfLoop.get(), scope-&gt;breakTarget(), FallThroughMeansFalse);
</span><span class="cx"> 
</span><span class="lines">@@ -2541,14 +2540,21 @@
</span><span class="cx">     RegisterID* forLoopSymbolTable = nullptr;
</span><span class="cx">     generator.pushLexicalScope(this, BytecodeGenerator::TDZCheckOptimization::Optimize, BytecodeGenerator::NestedScopeType::IsNested, &amp;forLoopSymbolTable);
</span><span class="cx"> 
</span><del>-    generator.emitDebugHook(WillExecuteStatement, firstLine(), startOffset(), lineStartOffset());
</del><ins>+    if (m_expr1 || m_expr2) {
+        ExpressionNode* firstExpr = m_expr1 ? m_expr1 : m_expr2;
+        generator.emitDebugHook(WillExecuteStatement, firstExpr-&gt;firstLine(), firstExpr-&gt;startOffset(), firstExpr-&gt;lineStartOffset());
+    }
</ins><span class="cx"> 
</span><del>-    if (m_expr1)
</del><ins>+    if (m_expr1) {
+        generator.emitDebugHook(WillExecuteExpression, m_expr1-&gt;firstLine(), m_expr1-&gt;startOffset(), m_expr1-&gt;lineStartOffset());
</ins><span class="cx">         generator.emitNode(generator.ignoredResult(), m_expr1);
</span><del>-    
</del><ins>+    }
+
</ins><span class="cx">     RefPtr&lt;Label&gt; topOfLoop = generator.newLabel();
</span><del>-    if (m_expr2)
</del><ins>+    if (m_expr2) {
+        generator.emitDebugHook(WillExecuteExpression, m_expr2-&gt;firstLine(), m_expr2-&gt;startOffset(), m_expr2-&gt;lineStartOffset());
</ins><span class="cx">         generator.emitNodeInConditionContext(m_expr2, topOfLoop.get(), scope-&gt;breakTarget(), FallThroughMeansTrue);
</span><ins>+    }
</ins><span class="cx"> 
</span><span class="cx">     generator.emitLabel(topOfLoop.get());
</span><span class="cx">     generator.emitLoopHint();
</span><span class="lines">@@ -2557,14 +2563,16 @@
</span><span class="cx">     generator.emitNodeInTailPosition(dst, m_statement);
</span><span class="cx"> 
</span><span class="cx">     generator.emitLabel(scope-&gt;continueTarget());
</span><del>-    generator.emitDebugHook(WillExecuteStatement, firstLine(), startOffset(), lineStartOffset());
</del><span class="cx">     generator.prepareLexicalScopeForNextForLoopIteration(this, forLoopSymbolTable);
</span><del>-    if (m_expr3)
</del><ins>+    if (m_expr3) {
+        generator.emitDebugHook(WillExecuteStatement, m_expr3-&gt;firstLine(), m_expr3-&gt;startOffset(), m_expr3-&gt;lineStartOffset());
</ins><span class="cx">         generator.emitNode(generator.ignoredResult(), m_expr3);
</span><ins>+    }
</ins><span class="cx"> 
</span><del>-    if (m_expr2)
</del><ins>+    if (m_expr2) {
+        generator.emitDebugHook(WillExecuteStatement, m_expr2-&gt;firstLine(), m_expr2-&gt;startOffset(), m_expr2-&gt;lineStartOffset());
</ins><span class="cx">         generator.emitNodeInConditionContext(m_expr2, topOfLoop.get(), scope-&gt;breakTarget(), FallThroughMeansFalse);
</span><del>-    else
</del><ins>+    } else
</ins><span class="cx">         generator.emitJump(topOfLoop.get());
</span><span class="cx"> 
</span><span class="cx">     generator.emitLabel(scope-&gt;breakTarget());
</span><span class="lines">@@ -2693,7 +2701,7 @@
</span><span class="cx">     RegisterID* forLoopSymbolTable = nullptr;
</span><span class="cx">     generator.pushLexicalScope(this, BytecodeGenerator::TDZCheckOptimization::Optimize, BytecodeGenerator::NestedScopeType::IsNested, &amp;forLoopSymbolTable);
</span><span class="cx"> 
</span><del>-    generator.emitDebugHook(WillExecuteStatement, firstLine(), startOffset(), lineStartOffset());
</del><ins>+    generator.emitDebugHook(WillExecuteStatement, m_expr-&gt;firstLine(), m_expr-&gt;startOffset(), m_expr-&gt;lineStartOffset());
</ins><span class="cx"> 
</span><span class="cx">     if (m_lexpr-&gt;isAssignResolveNode())
</span><span class="cx">         generator.emitNode(generator.ignoredResult(), m_lexpr);
</span><span class="lines">@@ -2743,6 +2751,7 @@
</span><span class="cx">         generator.emitLabel(scope-&gt;continueTarget());
</span><span class="cx">         generator.prepareLexicalScopeForNextForLoopIteration(this, forLoopSymbolTable);
</span><span class="cx">         generator.emitInc(i.get());
</span><ins>+        generator.emitDebugHook(WillExecuteStatement, m_expr-&gt;firstLine(), m_expr-&gt;startOffset(), m_expr-&gt;lineStartOffset());
</ins><span class="cx">         generator.emitJump(loopStart.get());
</span><span class="cx"> 
</span><span class="cx">         generator.emitLabel(scope-&gt;breakTarget());
</span><span class="lines">@@ -2782,6 +2791,7 @@
</span><span class="cx">         generator.prepareLexicalScopeForNextForLoopIteration(this, forLoopSymbolTable);
</span><span class="cx">         generator.emitInc(enumeratorIndex.get());
</span><span class="cx">         generator.emitEnumeratorStructurePropertyName(propertyName.get(), enumerator.get(), enumeratorIndex.get());
</span><ins>+        generator.emitDebugHook(WillExecuteStatement, m_expr-&gt;firstLine(), m_expr-&gt;startOffset(), m_expr-&gt;lineStartOffset());
</ins><span class="cx">         generator.emitJump(loopStart.get());
</span><span class="cx">         
</span><span class="cx">         generator.emitLabel(scope-&gt;breakTarget());
</span><span class="lines">@@ -2818,6 +2828,7 @@
</span><span class="cx">         generator.prepareLexicalScopeForNextForLoopIteration(this, forLoopSymbolTable);
</span><span class="cx">         generator.emitInc(enumeratorIndex.get());
</span><span class="cx">         generator.emitEnumeratorGenericPropertyName(propertyName.get(), enumerator.get(), enumeratorIndex.get());
</span><ins>+        generator.emitDebugHook(WillExecuteStatement, m_expr-&gt;firstLine(), m_expr-&gt;startOffset(), m_expr-&gt;lineStartOffset());
</ins><span class="cx">         generator.emitJump(loopStart.get());
</span><span class="cx"> 
</span><span class="cx">         generator.emitLabel(scope-&gt;breakTarget());
</span><span class="lines">@@ -2825,7 +2836,6 @@
</span><span class="cx">         generator.emitLabel(loopEnd.get());
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    generator.emitDebugHook(WillExecuteStatement, firstLine(), startOffset(), lineStartOffset());
</del><span class="cx">     generator.emitLabel(end.get());
</span><span class="cx">     generator.popLexicalScope(this);
</span><span class="cx">     generator.emitProfileControlFlow(profilerEndOffset);
</span><span class="lines">@@ -2841,7 +2851,6 @@
</span><span class="cx"> 
</span><span class="cx">     RegisterID* forLoopSymbolTable = nullptr;
</span><span class="cx">     generator.pushLexicalScope(this, BytecodeGenerator::TDZCheckOptimization::Optimize, BytecodeGenerator::NestedScopeType::IsNested, &amp;forLoopSymbolTable);
</span><del>-    generator.emitDebugHook(WillExecuteStatement, firstLine(), startOffset(), lineStartOffset());
</del><span class="cx">     auto extractor = [this, dst](BytecodeGenerator&amp; generator, RegisterID* value)
</span><span class="cx">     {
</span><span class="cx">         if (m_lexpr-&gt;isResolveNode()) {
</span><span class="lines">@@ -2974,7 +2983,7 @@
</span><span class="cx">         generator.emitPopScopes(generator.scopeRegister(), 0);
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    generator.emitDebugHook(WillLeaveCallFrame, lastLine(), startOffset(), lineStartOffset());
</del><ins>+    generator.emitWillLeaveCallFrameDebugHook();
</ins><span class="cx">     generator.emitReturn(returnRegister.get());
</span><span class="cx">     generator.emitProfileControlFlow(endOffset()); 
</span><span class="cx">     // Emitting an unreachable return here is needed in case this op_profile_control_flow is the 
</span><span class="lines">@@ -2987,7 +2996,7 @@
</span><span class="cx"> 
</span><span class="cx"> void WithNode::emitBytecode(BytecodeGenerator&amp; generator, RegisterID* dst)
</span><span class="cx"> {
</span><del>-    generator.emitDebugHook(WillExecuteStatement, firstLine(), startOffset(), lineStartOffset());
</del><ins>+    generator.emitDebugHook(WillExecuteStatement, m_expr-&gt;firstLine(), m_expr-&gt;startOffset(), m_expr-&gt;lineStartOffset());
</ins><span class="cx"> 
</span><span class="cx">     RefPtr&lt;RegisterID&gt; scope = generator.emitNode(m_expr);
</span><span class="cx">     generator.emitExpressionInfo(m_divot, m_divot - m_expressionLength, m_divot);
</span><span class="lines">@@ -3162,7 +3171,7 @@
</span><span class="cx"> 
</span><span class="cx"> void SwitchNode::emitBytecode(BytecodeGenerator&amp; generator, RegisterID* dst)
</span><span class="cx"> {
</span><del>-    generator.emitDebugHook(WillExecuteStatement, firstLine(), startOffset(), lineStartOffset());
</del><ins>+    generator.emitDebugHook(WillExecuteStatement, m_expr-&gt;firstLine(), m_expr-&gt;startOffset(), m_expr-&gt;lineStartOffset());
</ins><span class="cx">     
</span><span class="cx">     LabelScopePtr scope = generator.newLabelScope(LabelScope::Switch);
</span><span class="cx"> 
</span><span class="lines">@@ -3180,8 +3189,6 @@
</span><span class="cx"> 
</span><span class="cx"> void LabelNode::emitBytecode(BytecodeGenerator&amp; generator, RegisterID* dst)
</span><span class="cx"> {
</span><del>-    generator.emitDebugHook(WillExecuteStatement, firstLine(), startOffset(), lineStartOffset());
-
</del><span class="cx">     ASSERT(!generator.breakTarget(m_name));
</span><span class="cx"> 
</span><span class="cx">     LabelScopePtr scope = generator.newLabelScope(LabelScope::NamedLabel, &amp;m_name);
</span><span class="lines">@@ -3212,8 +3219,6 @@
</span><span class="cx">     // NOTE: The catch and finally blocks must be labeled explicitly, so the
</span><span class="cx">     // optimizer knows they may be jumped to from anywhere.
</span><span class="cx"> 
</span><del>-    generator.emitDebugHook(WillExecuteStatement, firstLine(), startOffset(), lineStartOffset());
-
</del><span class="cx">     ASSERT(m_catchBlock || m_finallyBlock);
</span><span class="cx"> 
</span><span class="cx">     RefPtr&lt;Label&gt; tryStartLabel = generator.newLabel();
</span><span class="lines">@@ -3437,7 +3442,7 @@
</span><span class="cx">             RegisterID* r0 = generator.isConstructor() ? generator.thisRegister() : generator.emitLoad(0, jsUndefined());
</span><span class="cx">             generator.emitProfileType(r0, ProfileTypeBytecodeFunctionReturnStatement); // Do not emit expression info for this profile because it's not in the user's source code.
</span><span class="cx">             ASSERT(startOffset() &gt;= lineStartOffset());
</span><del>-            generator.emitDebugHook(WillLeaveCallFrame, lastLine(), startOffset(), lineStartOffset());
</del><ins>+            generator.emitWillLeaveCallFrameDebugHook();
</ins><span class="cx">             generator.emitReturn(r0);
</span><span class="cx">             return;
</span><span class="cx">         }
</span><span class="lines">@@ -3691,7 +3696,7 @@
</span><span class="cx">         generator.emitGetById(iterator.get(), rhs, generator.propertyNames().iteratorSymbol);
</span><span class="cx">         CallArguments args(generator, nullptr);
</span><span class="cx">         generator.emitMove(args.thisRegister(), rhs);
</span><del>-        generator.emitCall(iterator.get(), iterator.get(), NoExpectedFunction, args, divot(), divotStart(), divotEnd());
</del><ins>+        generator.emitCall(iterator.get(), iterator.get(), NoExpectedFunction, args, divot(), divotStart(), divotEnd(), DebuggableCall::No);
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     if (m_targetPatterns.isEmpty()) {
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoredebuggerDebuggercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/debugger/Debugger.cpp (206651 => 206652)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/debugger/Debugger.cpp        2016-09-30 19:19:44 UTC (rev 206651)
+++ trunk/Source/JavaScriptCore/debugger/Debugger.cpp        2016-09-30 19:22:37 UTC (rev 206652)
</span><span class="lines">@@ -41,7 +41,7 @@
</span><span class="cx"> using namespace JSC;
</span><span class="cx"> 
</span><span class="cx"> struct GatherSourceProviders : public MarkedBlock::VoidFunctor {
</span><del>-    // FIXME: This is a mutable field becaue this isn't a C++ lambda.
</del><ins>+    // FIXME: This is a mutable field because this isn't a C++ lambda.
</ins><span class="cx">     // https://bugs.webkit.org/show_bug.cgi?id=159644
</span><span class="cx">     mutable HashSet&lt;SourceProvider*&gt; sourceProviders;
</span><span class="cx">     JSGlobalObject* m_globalObject;
</span><span class="lines">@@ -122,7 +122,8 @@
</span><span class="cx"> Debugger::Debugger(VM&amp; vm)
</span><span class="cx">     : m_vm(vm)
</span><span class="cx">     , m_pauseOnExceptionsState(DontPauseOnExceptions)
</span><del>-    , m_pauseOnNextStatement(false)
</del><ins>+    , m_pauseAtNextOpportunity(false)
+    , m_pastFirstExpressionInStatement(false)
</ins><span class="cx">     , m_isPaused(false)
</span><span class="cx">     , m_breakpointsActivated(false)
</span><span class="cx">     , m_hasHandlerForExceptionCallback(false)
</span><span class="lines">@@ -545,7 +546,7 @@
</span><span class="cx"> 
</span><span class="cx"> void Debugger::setPauseOnNextStatement(bool pause)
</span><span class="cx"> {
</span><del>-    m_pauseOnNextStatement = pause;
</del><ins>+    m_pauseAtNextOpportunity = pause;
</ins><span class="cx">     if (pause)
</span><span class="cx">         setSteppingMode(SteppingModeEnabled);
</span><span class="cx"> }
</span><span class="lines">@@ -558,7 +559,7 @@
</span><span class="cx">     if (!m_vm.topCallFrame)
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    m_pauseOnNextStatement = true;
</del><ins>+    m_pauseAtNextOpportunity = true;
</ins><span class="cx">     setSteppingMode(SteppingModeEnabled);
</span><span class="cx">     m_currentCallFrame = m_vm.topCallFrame;
</span><span class="cx">     pauseIfNeeded(m_currentCallFrame);
</span><span class="lines">@@ -569,7 +570,7 @@
</span><span class="cx">     if (!m_isPaused)
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    m_pauseOnNextStatement = false;
</del><ins>+    m_pauseAtNextOpportunity = false;
</ins><span class="cx">     notifyDoneProcessingDebuggerEvents();
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -578,7 +579,7 @@
</span><span class="cx">     if (!m_isPaused)
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    m_pauseOnNextStatement = true;
</del><ins>+    m_pauseAtNextOpportunity = true;
</ins><span class="cx">     setSteppingMode(SteppingModeEnabled);
</span><span class="cx">     notifyDoneProcessingDebuggerEvents();
</span><span class="cx"> }
</span><span class="lines">@@ -599,11 +600,28 @@
</span><span class="cx"> 
</span><span class="cx">     VMEntryFrame* topVMEntryFrame = m_vm.topVMEntryFrame;
</span><span class="cx">     m_pauseOnCallFrame = m_currentCallFrame ? m_currentCallFrame-&gt;callerFrame(topVMEntryFrame) : nullptr;
</span><ins>+    m_pauseOnStepOut = true;
</ins><span class="cx">     notifyDoneProcessingDebuggerEvents();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void Debugger::updateCallFrame(CallFrame* callFrame)
</del><ins>+void Debugger::updateCallFrame(CallFrame* callFrame, CallFrameUpdateAction action)
</ins><span class="cx"> {
</span><ins>+    if (!callFrame) {
+        m_currentCallFrame = nullptr;
+        return;
+    }
+
+    updateCallFrameInternal(callFrame);
+
+    if (action == AttemptPause)
+        pauseIfNeeded(callFrame);
+
+    if (!isStepping())
+        m_currentCallFrame = nullptr;
+}
+
+void Debugger::updateCallFrameInternal(CallFrame* callFrame)
+{
</ins><span class="cx">     m_currentCallFrame = callFrame;
</span><span class="cx">     SourceID sourceID = DebuggerCallFrame::sourceIDForCallFrame(callFrame);
</span><span class="cx">     if (m_lastExecutedSourceID != sourceID) {
</span><span class="lines">@@ -612,14 +630,6 @@
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void Debugger::updateCallFrameAndPauseIfNeeded(CallFrame* callFrame)
-{
-    updateCallFrame(callFrame);
-    pauseIfNeeded(callFrame);
-    if (!isStepping())
-        m_currentCallFrame = nullptr;
-}
-
</del><span class="cx"> void Debugger::pauseIfNeeded(CallFrame* callFrame)
</span><span class="cx"> {
</span><span class="cx">     VM&amp; vm = callFrame-&gt;vm();
</span><span class="lines">@@ -633,7 +643,7 @@
</span><span class="cx"> 
</span><span class="cx">     Breakpoint breakpoint;
</span><span class="cx">     bool didHitBreakpoint = false;
</span><del>-    bool pauseNow = m_pauseOnNextStatement;
</del><ins>+    bool pauseNow = m_pauseAtNextOpportunity;
</ins><span class="cx">     pauseNow |= (m_pauseOnCallFrame == m_currentCallFrame);
</span><span class="cx"> 
</span><span class="cx">     DebuggerPausedScope debuggerPausedScope(*this);
</span><span class="lines">@@ -645,11 +655,12 @@
</span><span class="cx">     if (!pauseNow)
</span><span class="cx">         return;
</span><span class="cx"> 
</span><ins>+    clearNextPauseState();
+
</ins><span class="cx">     // Make sure we are not going to pause again on breakpoint actions by
</span><span class="cx">     // reseting the pause state before executing any breakpoint actions.
</span><span class="cx">     TemporaryPausedState pausedState(*this);
</span><del>-    m_pauseOnCallFrame = nullptr;
-    m_pauseOnNextStatement = false;
</del><ins>+
</ins><span class="cx">     JSGlobalObject* vmEntryGlobalObject = callFrame-&gt;vmEntryGlobalObject();
</span><span class="cx"> 
</span><span class="cx">     if (didHitBreakpoint) {
</span><span class="lines">@@ -669,7 +680,7 @@
</span><span class="cx"> 
</span><span class="cx">     m_pausingBreakpointID = noBreakpointID;
</span><span class="cx"> 
</span><del>-    if (!m_pauseOnNextStatement &amp;&amp; !m_pauseOnCallFrame) {
</del><ins>+    if (!m_pauseAtNextOpportunity &amp;&amp; !m_pauseOnCallFrame) {
</ins><span class="cx">         setSteppingMode(SteppingModeDisabled);
</span><span class="cx">         m_currentCallFrame = nullptr;
</span><span class="cx">     }
</span><span class="lines">@@ -682,13 +693,13 @@
</span><span class="cx"> 
</span><span class="cx">     PauseReasonDeclaration reason(*this, PausedForException);
</span><span class="cx">     if (m_pauseOnExceptionsState == PauseOnAllExceptions || (m_pauseOnExceptionsState == PauseOnUncaughtExceptions &amp;&amp; !hasCatchHandler)) {
</span><del>-        m_pauseOnNextStatement = true;
</del><ins>+        m_pauseAtNextOpportunity = true;
</ins><span class="cx">         setSteppingMode(SteppingModeEnabled);
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     m_hasHandlerForExceptionCallback = true;
</span><span class="cx">     m_currentException = exception;
</span><del>-    updateCallFrameAndPauseIfNeeded(callFrame);
</del><ins>+    updateCallFrame(callFrame, AttemptPause);
</ins><span class="cx">     m_currentException = JSValue();
</span><span class="cx">     m_hasHandlerForExceptionCallback = false;
</span><span class="cx"> }
</span><span class="lines">@@ -698,17 +709,36 @@
</span><span class="cx">     if (m_isPaused)
</span><span class="cx">         return;
</span><span class="cx"> 
</span><ins>+    m_pastFirstExpressionInStatement = false;
+
</ins><span class="cx">     PauseReasonDeclaration reason(*this, PausedAtStatement);
</span><del>-    updateCallFrameAndPauseIfNeeded(callFrame);
</del><ins>+    updateCallFrame(callFrame, AttemptPause);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void Debugger::atExpression(CallFrame* callFrame)
+{
+    if (m_isPaused)
+        return;
+
+    // If this is the first call in a statement, then we would have paused at the statement.
+    if (!m_pastFirstExpressionInStatement) {
+        m_pastFirstExpressionInStatement = true;
+        return;
+    }
+
+    // Only pause at the next expression with step-in and step-out, not step-over.
+    bool shouldAttemptPause = m_pauseAtNextOpportunity || m_pauseOnStepOut;
+
+    PauseReasonDeclaration reason(*this, PausedAtExpression);
+    updateCallFrame(callFrame, shouldAttemptPause ? AttemptPause : NoPause);
+}
+
</ins><span class="cx"> void Debugger::callEvent(CallFrame* callFrame)
</span><span class="cx"> {
</span><span class="cx">     if (m_isPaused)
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    PauseReasonDeclaration reason(*this, PausedAfterCall);
-    updateCallFrameAndPauseIfNeeded(callFrame);
</del><ins>+    updateCallFrame(callFrame, NoPause);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void Debugger::returnEvent(CallFrame* callFrame)
</span><span class="lines">@@ -716,21 +746,48 @@
</span><span class="cx">     if (m_isPaused)
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    PauseReasonDeclaration reason(*this, PausedBeforeReturn);
-    updateCallFrameAndPauseIfNeeded(callFrame);
</del><ins>+    {
+        PauseReasonDeclaration reason(*this, PausedBeforeReturn);
+        updateCallFrame(callFrame, AttemptPause);
+    }
</ins><span class="cx"> 
</span><del>-    // detach may have been called during pauseIfNeeded
</del><ins>+    // Detach may have been called during pauseIfNeeded.
</ins><span class="cx">     if (!m_currentCallFrame)
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    // Treat stepping over a return statement like stepping out.
</del><ins>+    VMEntryFrame* topVMEntryFrame = m_vm.topVMEntryFrame;
+    CallFrame* callerFrame = m_currentCallFrame-&gt;callerFrame(topVMEntryFrame);
+
+    // Returning from a call, there was at least one expression on the statement we are returning to.
+    m_pastFirstExpressionInStatement = true;
+
+    // Treat stepping over a return statement like a step-out.
</ins><span class="cx">     if (m_currentCallFrame == m_pauseOnCallFrame) {
</span><del>-        VMEntryFrame* topVMEntryFrame = m_vm.topVMEntryFrame;
-        m_pauseOnCallFrame = m_currentCallFrame-&gt;callerFrame(topVMEntryFrame);
</del><ins>+        m_pauseOnCallFrame = callerFrame;
+        m_pauseOnStepOut = true;
</ins><span class="cx">     }
</span><span class="cx"> 
</span><ins>+    updateCallFrame(callerFrame, NoPause);
+}
+
+void Debugger::unwindEvent(CallFrame* callFrame)
+{
+    if (m_isPaused)
+        return;
+
+    updateCallFrame(callFrame, NoPause);
+
+    if (!m_currentCallFrame)
+        return;
+
</ins><span class="cx">     VMEntryFrame* topVMEntryFrame = m_vm.topVMEntryFrame;
</span><del>-    m_currentCallFrame = m_currentCallFrame-&gt;callerFrame(topVMEntryFrame);
</del><ins>+    CallFrame* callerFrame = m_currentCallFrame-&gt;callerFrame(topVMEntryFrame);
+
+    // Treat stepping over an exception location like a step-out.
+    if (m_currentCallFrame == m_pauseOnCallFrame)
+        m_pauseOnCallFrame = callerFrame;
+
+    updateCallFrame(callerFrame, NoPause);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void Debugger::willExecuteProgram(CallFrame* callFrame)
</span><span class="lines">@@ -738,8 +795,7 @@
</span><span class="cx">     if (m_isPaused)
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    PauseReasonDeclaration reason(*this, PausedAtStartOfProgram);
-    updateCallFrameAndPauseIfNeeded(callFrame);
</del><ins>+    updateCallFrame(callFrame, NoPause);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void Debugger::didExecuteProgram(CallFrame* callFrame)
</span><span class="lines">@@ -748,19 +804,38 @@
</span><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     PauseReasonDeclaration reason(*this, PausedAtEndOfProgram);
</span><del>-    updateCallFrameAndPauseIfNeeded(callFrame);
</del><ins>+    updateCallFrame(callFrame, AttemptPause);
</ins><span class="cx"> 
</span><del>-    // Treat stepping over the end of a program like stepping out.
</del><ins>+    // Detach may have been called during pauseIfNeeded.
</ins><span class="cx">     if (!m_currentCallFrame)
</span><span class="cx">         return;
</span><ins>+
+    VMEntryFrame* topVMEntryFrame = m_vm.topVMEntryFrame;
+    CallFrame* callerFrame = m_currentCallFrame-&gt;callerFrame(topVMEntryFrame);
+
+    // Returning from a program, could be eval(), there was at least one expression on the statement we are returning to.
+    m_pastFirstExpressionInStatement = true;
+
+    // Treat stepping over the end of a program like a step-out.
</ins><span class="cx">     if (m_currentCallFrame == m_pauseOnCallFrame) {
</span><del>-        VMEntryFrame* topVMEntryFrame = m_vm.topVMEntryFrame;
-        m_pauseOnCallFrame = m_currentCallFrame-&gt;callerFrame(topVMEntryFrame);
</del><ins>+        m_pauseOnCallFrame = callerFrame;
+        m_pauseAtNextOpportunity = true;
</ins><span class="cx">     }
</span><del>-    VMEntryFrame* topVMEntryFrame = m_vm.topVMEntryFrame;
-    m_currentCallFrame = m_currentCallFrame-&gt;callerFrame(topVMEntryFrame);
</del><ins>+
+    updateCallFrame(callerFrame, NoPause);
+
+    // Do not continue stepping into an unknown future program.
+    if (!m_currentCallFrame)
+        clearNextPauseState();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void Debugger::clearNextPauseState()
+{
+    m_pauseOnCallFrame = nullptr;
+    m_pauseAtNextOpportunity = false;
+    m_pauseOnStepOut = false;
+}
+
</ins><span class="cx"> void Debugger::didReachBreakpoint(CallFrame* callFrame)
</span><span class="cx"> {
</span><span class="cx">     if (m_isPaused)
</span><span class="lines">@@ -767,9 +842,9 @@
</span><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     PauseReasonDeclaration reason(*this, PausedForDebuggerStatement);
</span><del>-    m_pauseOnNextStatement = true;
</del><ins>+    m_pauseAtNextOpportunity = true;
</ins><span class="cx">     setSteppingMode(SteppingModeEnabled);
</span><del>-    updateCallFrameAndPauseIfNeeded(callFrame);
</del><ins>+    updateCallFrame(callFrame, AttemptPause);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> DebuggerCallFrame* Debugger::currentDebuggerCallFrame()
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoredebuggerDebuggerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/debugger/Debugger.h (206651 => 206652)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/debugger/Debugger.h        2016-09-30 19:19:44 UTC (rev 206651)
+++ trunk/Source/JavaScriptCore/debugger/Debugger.h        2016-09-30 19:22:37 UTC (rev 206652)
</span><span class="lines">@@ -91,9 +91,8 @@
</span><span class="cx">         NotPaused,
</span><span class="cx">         PausedForException,
</span><span class="cx">         PausedAtStatement,
</span><del>-        PausedAfterCall,
</del><ins>+        PausedAtExpression,
</ins><span class="cx">         PausedBeforeReturn,
</span><del>-        PausedAtStartOfProgram,
</del><span class="cx">         PausedAtEndOfProgram,
</span><span class="cx">         PausedForBreakpoint,
</span><span class="cx">         PausedForDebuggerStatement,
</span><span class="lines">@@ -118,8 +117,10 @@
</span><span class="cx"> 
</span><span class="cx">     void exception(CallFrame*, JSValue exceptionValue, bool hasCatchHandler);
</span><span class="cx">     void atStatement(CallFrame*);
</span><ins>+    void atExpression(CallFrame*);
</ins><span class="cx">     void callEvent(CallFrame*);
</span><span class="cx">     void returnEvent(CallFrame*);
</span><ins>+    void unwindEvent(CallFrame*);
</ins><span class="cx">     void willExecuteProgram(CallFrame*);
</span><span class="cx">     void didExecuteProgram(CallFrame*);
</span><span class="cx">     void didReachBreakpoint(CallFrame*);
</span><span class="lines">@@ -184,9 +185,11 @@
</span><span class="cx">     // that we don't break on the same line more than once. Once we switch to a
</span><span class="cx">     // bytecode PC key'ed breakpoint, we will not need these anymore and should
</span><span class="cx">     // be able to remove them.
</span><del>-    void updateCallFrame(JSC::CallFrame*);
-    void updateCallFrameAndPauseIfNeeded(JSC::CallFrame*);
</del><ins>+    enum CallFrameUpdateAction { AttemptPause, NoPause };
+    void updateCallFrame(JSC::CallFrame*, CallFrameUpdateAction);
+    void updateCallFrameInternal(JSC::CallFrame*);
</ins><span class="cx">     void pauseIfNeeded(JSC::CallFrame*);
</span><ins>+    void clearNextPauseState();
</ins><span class="cx"> 
</span><span class="cx">     enum SteppingMode {
</span><span class="cx">         SteppingModeDisabled,
</span><span class="lines">@@ -209,7 +212,9 @@
</span><span class="cx">     HashSet&lt;JSGlobalObject*&gt; m_globalObjects;
</span><span class="cx"> 
</span><span class="cx">     PauseOnExceptionsState m_pauseOnExceptionsState;
</span><del>-    bool m_pauseOnNextStatement : 1;
</del><ins>+    bool m_pauseAtNextOpportunity : 1;
+    bool m_pauseOnStepOut : 1;
+    bool m_pastFirstExpressionInStatement : 1;
</ins><span class="cx">     bool m_isPaused : 1;
</span><span class="cx">     bool m_breakpointsActivated : 1;
</span><span class="cx">     bool m_hasHandlerForExceptionCallback : 1;
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectoragentsInspectorDebuggerAgentcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/inspector/agents/InspectorDebuggerAgent.cpp (206651 => 206652)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/agents/InspectorDebuggerAgent.cpp        2016-09-30 19:19:44 UTC (rev 206651)
+++ trunk/Source/JavaScriptCore/inspector/agents/InspectorDebuggerAgent.cpp        2016-09-30 19:22:37 UTC (rev 206652)
</span><span class="lines">@@ -537,9 +537,6 @@
</span><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     m_scriptDebugServer.stepIntoStatement();
</span><del>-
-    if (m_listener)
-        m_listener-&gt;stepInto();
</del><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void InspectorDebuggerAgent::stepOut(ErrorString&amp; errorString)
</span><span class="lines">@@ -706,9 +703,8 @@
</span><span class="cx">             m_breakAuxData = buildExceptionPauseReason(exceptionOrCaughtValue, injectedScript);
</span><span class="cx">             break;
</span><span class="cx">         case JSC::Debugger::PausedAtStatement:
</span><del>-        case JSC::Debugger::PausedAfterCall:
</del><ins>+        case JSC::Debugger::PausedAtExpression:
</ins><span class="cx">         case JSC::Debugger::PausedBeforeReturn:
</span><del>-        case JSC::Debugger::PausedAtStartOfProgram:
</del><span class="cx">         case JSC::Debugger::PausedAtEndOfProgram:
</span><span class="cx">             // Pause was just stepping. Nothing to report.
</span><span class="cx">             break;
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectoragentsInspectorDebuggerAgenth"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/inspector/agents/InspectorDebuggerAgent.h (206651 => 206652)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/agents/InspectorDebuggerAgent.h        2016-09-30 19:19:44 UTC (rev 206651)
+++ trunk/Source/JavaScriptCore/inspector/agents/InspectorDebuggerAgent.h        2016-09-30 19:22:37 UTC (rev 206652)
</span><span class="lines">@@ -98,7 +98,6 @@
</span><span class="cx">         virtual ~Listener() { }
</span><span class="cx">         virtual void debuggerWasEnabled() = 0;
</span><span class="cx">         virtual void debuggerWasDisabled() = 0;
</span><del>-        virtual void stepInto() = 0;
</del><span class="cx">         virtual void didPause() = 0;
</span><span class="cx">     };
</span><span class="cx">     void setListener(Listener* listener) { m_listener = listener; }
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreinterpreterInterpretercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/interpreter/Interpreter.cpp (206651 => 206652)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/interpreter/Interpreter.cpp        2016-09-30 19:19:44 UTC (rev 206651)
+++ trunk/Source/JavaScriptCore/interpreter/Interpreter.cpp        2016-09-30 19:22:37 UTC (rev 206652)
</span><span class="lines">@@ -587,7 +587,7 @@
</span><span class="cx">     if (Debugger* debugger = callFrame-&gt;vmEntryGlobalObject()-&gt;debugger()) {
</span><span class="cx">         SuspendExceptionScope scope(&amp;vm);
</span><span class="cx">         if (jsDynamicCast&lt;JSFunction*&gt;(callFrame-&gt;callee()))
</span><del>-            debugger-&gt;returnEvent(callFrame);
</del><ins>+            debugger-&gt;unwindEvent(callFrame);
</ins><span class="cx">         else
</span><span class="cx">             debugger-&gt;didExecuteProgram(callFrame);
</span><span class="cx">         ASSERT_UNUSED(catchScope, !catchScope.exception());
</span><span class="lines">@@ -1241,6 +1241,9 @@
</span><span class="cx">         case WillExecuteStatement:
</span><span class="cx">             debugger-&gt;atStatement(callFrame);
</span><span class="cx">             break;
</span><ins>+        case WillExecuteExpression:
+            debugger-&gt;atExpression(callFrame);
+            break;
</ins><span class="cx">         case WillExecuteProgram:
</span><span class="cx">             debugger-&gt;willExecuteProgram(callFrame);
</span><span class="cx">             break;
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreinterpreterInterpreterh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/interpreter/Interpreter.h (206651 => 206652)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/interpreter/Interpreter.h        2016-09-30 19:19:44 UTC (rev 206651)
+++ trunk/Source/JavaScriptCore/interpreter/Interpreter.h        2016-09-30 19:22:37 UTC (rev 206652)
</span><span class="lines">@@ -73,7 +73,8 @@
</span><span class="cx">         DidEnterCallFrame,
</span><span class="cx">         DidReachBreakpoint,
</span><span class="cx">         WillLeaveCallFrame,
</span><del>-        WillExecuteStatement
</del><ins>+        WillExecuteStatement,
+        WillExecuteExpression,
</ins><span class="cx">     };
</span><span class="cx"> 
</span><span class="cx">     enum StackFrameCodeType {
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreparserNodesh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/parser/Nodes.h (206651 => 206652)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/parser/Nodes.h        2016-09-30 19:19:44 UTC (rev 206651)
+++ trunk/Source/JavaScriptCore/parser/Nodes.h        2016-09-30 19:22:37 UTC (rev 206652)
</span><span class="lines">@@ -208,6 +208,7 @@
</span><span class="cx">         void setNext(StatementNode* next) { m_next = next; }
</span><span class="cx"> 
</span><span class="cx">         virtual bool isEmptyStatement() const { return false; }
</span><ins>+        virtual bool isFunctionNode() const { return false; }
</ins><span class="cx">         virtual bool isReturnNode() const { return false; }
</span><span class="cx">         virtual bool isExprStatement() const { return false; }
</span><span class="cx">         virtual bool isBreak() const { return false; }
</span><span class="lines">@@ -215,6 +216,7 @@
</span><span class="cx">         virtual bool isBlock() const { return false; }
</span><span class="cx">         virtual bool isFuncDeclNode() const { return false; }
</span><span class="cx">         virtual bool isModuleDeclarationNode() const { return false; }
</span><ins>+        virtual bool isForOfNode() const { return false; }
</ins><span class="cx"> 
</span><span class="cx">     protected:
</span><span class="cx">         StatementNode* m_next;
</span><span class="lines">@@ -1460,7 +1462,9 @@
</span><span class="cx">         using ParserArenaDeletable::operator new;
</span><span class="cx"> 
</span><span class="cx">         EnumerationNode(const JSTokenLocation&amp;, ExpressionNode*, ExpressionNode*, StatementNode*, VariableEnvironment&amp;);
</span><del>-        
</del><ins>+
+        ExpressionNode* expr() const { return m_expr; }
+
</ins><span class="cx">     protected:
</span><span class="cx">         ExpressionNode* m_lexpr;
</span><span class="cx">         ExpressionNode* m_expr;
</span><span class="lines">@@ -1481,7 +1485,8 @@
</span><span class="cx">     class ForOfNode : public EnumerationNode {
</span><span class="cx">     public:
</span><span class="cx">         ForOfNode(const JSTokenLocation&amp;, ExpressionNode*, ExpressionNode*, StatementNode*, VariableEnvironment&amp;);
</span><del>-        
</del><ins>+        bool isForOfNode() const override { return true; }
+
</ins><span class="cx">     private:
</span><span class="cx">         void emitBytecode(BytecodeGenerator&amp;, RegisterID* = 0) override;
</span><span class="cx">     };
</span><span class="lines">@@ -1933,6 +1938,8 @@
</span><span class="cx"> 
</span><span class="cx">         void emitBytecode(BytecodeGenerator&amp;, RegisterID* = 0) override;
</span><span class="cx"> 
</span><ins>+        bool isFunctionNode() const override { return true; }
+
</ins><span class="cx">         void finishParsing(const Identifier&amp;, FunctionMode);
</span><span class="cx">         
</span><span class="cx">         const Identifier&amp; ident() { return m_ident; }
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (206651 => 206652)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-09-30 19:19:44 UTC (rev 206651)
+++ trunk/Source/WebCore/ChangeLog        2016-09-30 19:22:37 UTC (rev 206652)
</span><span class="lines">@@ -1,3 +1,32 @@
</span><ins>+2016-09-30  Joseph Pecoraro  &lt;pecoraro@apple.com&gt;
+
+        Web Inspector: Stepping out of a function finishes the line that called it.
+        https://bugs.webkit.org/show_bug.cgi?id=155325
+        &lt;rdar://problem/25094578&gt;
+
+        Reviewed by Mark Lam.
+
+        Tests: inspector/debugger/stepping/stepInto.html
+               inspector/debugger/stepping/stepOut.html
+               inspector/debugger/stepping/stepOver.html
+               inspector/debugger/stepping/stepping-arrow-functions.html
+               inspector/debugger/stepping/stepping-classes.html
+               inspector/debugger/stepping/stepping-control-flow.html
+               inspector/debugger/stepping/stepping-function-calls.html
+               inspector/debugger/stepping/stepping-function-default-parameters.html
+               inspector/debugger/stepping/stepping-literal-construction.html
+               inspector/debugger/stepping/stepping-loops.html
+               inspector/debugger/stepping/stepping-misc.html
+               inspector/debugger/stepping/stepping-switch.html
+               inspector/debugger/stepping/stepping-template-string.html
+               inspector/debugger/stepping/stepping-try-catch-finally.html
+
+        * inspector/InspectorDOMDebuggerAgent.h:
+        * inspector/InspectorDOMDebuggerAgent.cpp:
+        (WebCore::InspectorDOMDebuggerAgent::stepInto): Deleted.
+        Setting this state in step-into does not make sense since we do not
+        know when the debugger resumes and won't know when to clear it.
+
</ins><span class="cx"> 2016-09-30  Alex Christensen  &lt;achristensen@webkit.org&gt;
</span><span class="cx"> 
</span><span class="cx">         Fix off-by-one error in URLParser::parseIPv4Host
</span></span></pre></div>
<a id="trunkSourceWebCoreinspectorInspectorDOMDebuggerAgentcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/inspector/InspectorDOMDebuggerAgent.cpp (206651 => 206652)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/inspector/InspectorDOMDebuggerAgent.cpp        2016-09-30 19:19:44 UTC (rev 206651)
+++ trunk/Source/WebCore/inspector/InspectorDOMDebuggerAgent.cpp        2016-09-30 19:22:37 UTC (rev 206652)
</span><span class="lines">@@ -85,11 +85,6 @@
</span><span class="cx">     disable();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void InspectorDOMDebuggerAgent::stepInto()
-{
-    m_pauseInNextEventListener = true;
-}
-
</del><span class="cx"> void InspectorDOMDebuggerAgent::didPause()
</span><span class="cx"> {
</span><span class="cx">     m_pauseInNextEventListener = false;
</span></span></pre></div>
<a id="trunkSourceWebCoreinspectorInspectorDOMDebuggerAgenth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/inspector/InspectorDOMDebuggerAgent.h (206651 => 206652)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/inspector/InspectorDOMDebuggerAgent.h        2016-09-30 19:19:44 UTC (rev 206651)
+++ trunk/Source/WebCore/inspector/InspectorDOMDebuggerAgent.h        2016-09-30 19:22:37 UTC (rev 206652)
</span><span class="lines">@@ -84,7 +84,6 @@
</span><span class="cx">     // Inspector::InspectorDebuggerAgent::Listener implementation.
</span><span class="cx">     void debuggerWasEnabled() override;
</span><span class="cx">     void debuggerWasDisabled() override;
</span><del>-    void stepInto() override;
</del><span class="cx">     void didPause() override;
</span><span class="cx">     void disable();
</span><span class="cx"> 
</span></span></pre>
</div>
</div>

</body>
</html>