v8/test/inspector/runtime
kozyatinskiy 760c56bddf [inspector] changed a way of preserving stepping between tasks
Indisputable profit:
- correct break location in next task (see tests),
- stepOver with async await never lands in random code (see related test and issue),
- inspector doesn't store current stepping state in debugger agent and completely trust V8 - step to new inspector-V8 design (I will finish design doc soon).
- willExecuteScript and didExecuteScript instrumentation could be removed from code base - reduce probability of future errors.
- finally - less code,
- stepping implementation in V8 makes another step to follow our stepping strategy (stepOut should do stepInto and break when exit current frame) (another one one page design doc based on @aandrey comment is coming),
- knowledge about existing of context groups is still inspector-only.

Disputable part is related to super rare scenario when in single isolate we have more then one context group id with enabled debugger agent:
- if one agent request break in own context (stepping, pause, e.t.c.) then we ignore all breaks in another agent. From one hand it looks like good: user clicks stepInto and they don't expect that execution could be paused by another instance of DevTools in unobservable from current DevTools way (second DevTools will get paused notification and run nested message loop). From another hand we shouldn't ignore breakpoints or debugger statement never. In general, I think that proposed behavior is rathe feature then issue.
- and disadvantage, on attempt to break in non-target context group id we just call StepOut until reach target context group id, step out call could deoptimize code in non related to current debugger agent context. But break could happens only in case of debugger stmt or breakpoint - sound like minor issue. Ignoring break on exception sounds like real issue but by module of rareness of this case I think we can ignore this.

Implementation details:
- when debugger agent request break for any reason it passes target context group id to V8Debugger - last agent requesting break is preferred.
- when V8Debugger gets BreakProgramRequested notification from V8, it checks current context group id against target context group id, if they match then just process break as usual otherwise makes StepOut action,
- debug.cc at the end of microtask if last_scheduled_action is StepOut, schedules StepIn and will break on first instruction in next task.

BUG=chromium:654022
R=dgozman@chromium.org,yangguo@chromium.org

Review-Url: https://codereview.chromium.org/2748503002
Cr-Commit-Position: refs/heads/master@{#44034}
2017-03-22 16:20:54 +00:00
..
await-promise-expected.txt [inspector] async stacks for Promise.then calls... 2017-01-10 12:54:12 +00:00
await-promise.js [inspector] added reconnect method for tests 2017-02-28 20:22:24 +00:00
call-function-on-async-expected.txt [inspector] Make InspectorTest.sendCommand* private 2016-10-03 23:33:07 +00:00
call-function-on-async.js [inspector] added reconnect method for tests 2017-02-28 20:22:24 +00:00
clear-of-command-line-api-expected.txt [inspector] Make InspectorTest.sendCommand* private 2016-10-03 23:33:07 +00:00
clear-of-command-line-api.js [inspector] added reconnect method for tests 2017-02-28 20:22:24 +00:00
compile-script-expected.txt [inspector] Make InspectorTest.sendCommand* private 2016-10-03 23:33:07 +00:00
compile-script.js [inspector] Make InspectorTest.sendCommand* private 2016-10-03 23:33:07 +00:00
console-api-repeated-in-console-expected.txt [inspector] added inspector test runner [part 5] 2016-10-02 21:23:03 +00:00
console-api-repeated-in-console.js [inspector] added reconnect method for tests 2017-02-28 20:22:24 +00:00
console-assert-expected.txt [inspector] make console.assert much faster 2016-11-23 17:09:50 +00:00
console-assert.js [inspector] added reconnect method for tests 2017-02-28 20:22:24 +00:00
console-deprecated-methods-expected.txt [inspector] added inspector test runner [part 5] 2016-10-02 21:23:03 +00:00
console-deprecated-methods.js [inspector] added reconnect method for tests 2017-02-28 20:22:24 +00:00
console-line-and-column-expected.txt [inspector] introduced exceptionThrown support in test runner 2016-10-05 15:08:14 +00:00
console-line-and-column.js [inspector] Make InspectorTest.sendCommand* private 2016-10-03 23:33:07 +00:00
console-log-doesnt-run-microtasks-expected.txt [inspector] added inspector test runner [part 5] 2016-10-02 21:23:03 +00:00
console-log-doesnt-run-microtasks.js [inspector] added reconnect method for tests 2017-02-28 20:22:24 +00:00
console-messages-limits-expected.txt [inspector] introduced memory size limit for console message storage 2017-01-30 17:05:58 +00:00
console-messages-limits.js [inspector] added reconnect method for tests 2017-02-28 20:22:24 +00:00
console-methods-expected.txt [inspector] added missing test for console methods 2017-02-02 23:05:11 +00:00
console-methods.js [inspector] added reconnect method for tests 2017-02-28 20:22:24 +00:00
console-time-end-format-expected.txt [inspector] console.timeEnd formats ms in the same way as JS formats double 2017-01-17 20:21:38 +00:00
console-time-end-format.js [inspector] added reconnect method for tests 2017-02-28 20:22:24 +00:00
console-timestamp-expected.txt [inspector] added inspector test runner [part 5] 2016-10-02 21:23:03 +00:00
console-timestamp.js [inspector] Make InspectorTest.sendCommand* private 2016-10-03 23:33:07 +00:00
create-context-expected.txt [inspector] changed a way of preserving stepping between tasks 2017-03-22 16:20:54 +00:00
create-context.js [inspector] added createContextGroup for tests 2017-03-07 22:30:05 +00:00
es6-module-expected.txt [inspector] added length for scriptParsed notification 2017-03-07 22:01:37 +00:00
es6-module.js [inspector] added reconnect method for tests 2017-02-28 20:22:24 +00:00
evaluate-async-expected.txt [inspector] Make InspectorTest.sendCommand* private 2016-10-03 23:33:07 +00:00
evaluate-async-with-wrap-error-expected.txt [inspector] Make InspectorTest.sendCommand* private 2016-10-03 23:33:07 +00:00
evaluate-async-with-wrap-error.js [inspector] added reconnect method for tests 2017-02-28 20:22:24 +00:00
evaluate-async.js [inspector] added reconnect method for tests 2017-02-28 20:22:24 +00:00
evaluate-empty-stack-expected.txt [debug] remove JSON debug protocol related tests. 2016-11-24 10:43:22 +00:00
evaluate-empty-stack.js [inspector] added reconnect method for tests 2017-02-28 20:22:24 +00:00
evaluate-with-context-id-equal-zero-expected.txt [inspector] Make InspectorTest.sendCommand* private 2016-10-03 23:33:07 +00:00
evaluate-with-context-id-equal-zero.js [inspector] added reconnect method for tests 2017-02-28 20:22:24 +00:00
evaluate-with-generate-preview-expected.txt [inspector] remove iterators and for...of loops from injected-script-source 2017-03-03 19:30:40 +00:00
evaluate-with-generate-preview.js [inspector] remove iterators and for...of loops from injected-script-source 2017-03-03 19:30:40 +00:00
exception-thrown-expected.txt [inspector] introduced exceptionThrown support in test runner 2016-10-05 15:08:14 +00:00
exception-thrown.js [inspector] added reconnect method for tests 2017-02-28 20:22:24 +00:00
get-properties-expected.txt [inspector] remove iterators and for...of loops from injected-script-source 2017-03-03 19:30:40 +00:00
get-properties-on-proxy-expected.txt [inspector] Make InspectorTest.sendCommand* private 2016-10-03 23:33:07 +00:00
get-properties-on-proxy.js [inspector] added reconnect method for tests 2017-02-28 20:22:24 +00:00
get-properties-preview-expected.txt [inspector] added inspector test runner [part 5] 2016-10-02 21:23:03 +00:00
get-properties-preview.js [inspector] Make InspectorTest.sendCommand* private 2016-10-03 23:33:07 +00:00
get-properties.js [inspector] remove iterators and for...of loops from injected-script-source 2017-03-03 19:30:40 +00:00
internal-properties-entries-expected.txt [inspector] introduced v8::debug::EntriesPreview for inspector 2017-02-07 07:46:21 +00:00
internal-properties-entries.js [inspector] added reconnect method for tests 2017-02-28 20:22:24 +00:00
internal-properties-expected.txt [inspector] introduced debug::GeneratorObject 2017-02-07 23:09:02 +00:00
internal-properties.js [inspector] added reconnect method for tests 2017-02-28 20:22:24 +00:00
length-or-size-description-expected.txt Re-land of Use parenthesis in descriptions for array/map/set lengths/sizes 2016-12-02 01:26:45 +00:00
length-or-size-description.js [inspector] added reconnect method for tests 2017-02-28 20:22:24 +00:00
property-on-console-proto-expected.txt [inspector] Make InspectorTest.sendCommand* private 2016-10-03 23:33:07 +00:00
property-on-console-proto.js [inspector] added reconnect method for tests 2017-02-28 20:22:24 +00:00
protocol-works-with-different-locale-expected.txt V8 Inspector: remove V8ConsoleAPIType from the API, reuse v8::Isolate::MessageErrorLevel instead. 2017-01-25 22:23:18 +00:00
protocol-works-with-different-locale.js [inspector] added reconnect method for tests 2017-02-28 20:22:24 +00:00
run-script-async-expected.txt [inspector] Make InspectorTest.sendCommand* private 2016-10-03 23:33:07 +00:00
run-script-async.js [inspector] added reconnect method for tests 2017-02-28 20:22:24 +00:00
runtime-restore-expected.txt [inspector] added reconnect method for tests 2017-02-28 20:22:24 +00:00
runtime-restore.js [inspector] added reconnect method for tests 2017-02-28 20:22:24 +00:00
set-or-map-entries-expected.txt Re-land of Use parenthesis in descriptions for array/map/set lengths/sizes 2016-12-02 01:26:45 +00:00
set-or-map-entries.js [inspector] added reconnect method for tests 2017-02-28 20:22:24 +00:00