Commit Graph

21 Commits

Author SHA1 Message Date
Florian Sattler
9c702f4d3d [cleanup] Refactor inspector to use default members.
Fixing clang-tidy warning.

Bug: v8:8015
Cq-Include-Trybots: luci.chromium.try:linux_chromium_headless_rel;luci.chromium.try:linux_chromium_rel_ng;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: I78bdf30b54a75fd96de0ca3d9243e1b55e9988ef
Reviewed-on: https://chromium-review.googlesource.com/1224090
Commit-Queue: Florian Sattler <sattlerf@google.com>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55984}
2018-09-18 09:13:59 +00:00
Andrey Lushnikov
22cb8d45c3 inspector: teach v8Inspector to return default context
This is a follow-up to https://chromium-review.googlesource.com/c/v8/v8/+/1173718

R=kozy, pfeldman
TBR=pfeldman

Cq-Include-Trybots: luci.chromium.try:linux_chromium_headless_rel;luci.chromium.try:linux_chromium_rel_ng;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: I48b4ca5589505d03773477623654fa54703f0714
Reviewed-on: https://chromium-review.googlesource.com/1175061
Commit-Queue: Andrey Lushnikov <lushnikov@chromium.org>
Reviewed-by: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55133}
2018-08-14 21:00:17 +00:00
Andrey Lushnikov
fba8c5ecc2 inspector: introduce V8Inspector::contextById(contextId)
This is a pre-requisite for https://chromium-review.googlesource.com/c/chromium/src/+/1134430

R=kozy

Cq-Include-Trybots: luci.chromium.try:linux_chromium_headless_rel;luci.chromium.try:linux_chromium_rel_ng;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: Ic437eaffd0870e1ce6b16e4992e9232515e091ec
Reviewed-on: https://chromium-review.googlesource.com/1173718
Reviewed-by: Pavel Feldman <pfeldman@chromium.org>
Reviewed-by: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Commit-Queue: Andrey Lushnikov <lushnikov@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55131}
2018-08-14 18:21:47 +00:00
Alexey Kozyatinskiy
dbfcc4878a [inspector] added V8InspectorClient::resourceNameToUrl
Some clients (see Node.js) use platform path as ScriptOrigin.
Reporting platform path in protocol makes using protocol much harder.
This CL introduced V8InspectorClient::resourceNameToUrl method that
is called for any reported using protocol url.
V8Inspector uses url internally as well so protocol client may generate
pattern for blackboxing with file urls only and does not need to build
complicated regexp that covers files urls and platform paths on
different platforms.

R=lushnikov@chromium.org
TBR=yangguo@chromium.org

Bug: none
Cq-Include-Trybots: luci.chromium.try:linux_chromium_headless_rel;luci.chromium.try:linux_chromium_rel_ng;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: Iff302e7441df922fa5d689fe510f5a9bfd470b9b
Reviewed-on: https://chromium-review.googlesource.com/1164624
Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Reviewed-by: Alexei Filippov <alph@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55029}
2018-08-09 21:36:24 +00:00
Hidy Han
9a49396c7c Provide API to expose non-empty top source url.
Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: I6390806935ada277db965718a804ab090b3be5dd
Reviewed-on: https://chromium-review.googlesource.com/1041157
Reviewed-by: Pavel Feldman <pfeldman@chromium.org>
Reviewed-by: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Commit-Queue: Hidy Han <hidyhan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53047}
2018-05-07 20:47:19 +00:00
Eugene Ostroukhov
7821aadc53 [inspector] remove wrapObject overload
Bug: 
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_chromium_rel_ng
Change-Id: I8ca7bf33fb848caedce101876316832a1e9cf58f
Reviewed-on: https://chromium-review.googlesource.com/836735
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Reviewed-by: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Commit-Queue: Eugene Ostroukhov <eostroukhov@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50248}
2017-12-20 20:17:21 +00:00
Eugene Ostroukhov
64d145534c [inspector] allow generatePreview for wrapObject
This method is needed by some Blink agents to generate object previews.

Bug: 
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_chromium_rel_ng
Change-Id: I2304a6e44ea65ec469f3a3216b8bed789f706d0c
Reviewed-on: https://chromium-review.googlesource.com/821596
Reviewed-by: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Commit-Queue: Eugene Ostroukhov <eostroukhov@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50049}
2017-12-12 18:02:13 +00:00
Alexey Kozyatinskiy
885a5669aa Reland [inspector] introduced stackTraceId and externalAsyncTask API
Sometimes we need to capture stack trace on one debugger and use it
later as a parent stack on another debugger (e.g. worker.postMessage).

This CL includes following addition to our protocol and v8-inspector.h:
  - added Runtime.StackTraceId, this id represents stack trace captured
    on debugger with given id,
  - protocol client can fetch Runtime.StackTrace by
    Runtime.StacKTraceId using Debugger.getStackTrace method,
  - externalParent field is added to Debugger.paused event, it may
    contain external parent stack trace,
  - V8Inspector::storeCurrentStackTrace captures current stack trace
    and returns V8StackTraceId for embedder this id can be used as
    argument for V8Inspector::externalAsyncTaskStarted and
    V8Inspector::externalAsyncTaskFinished method. Any async stack
    trace captured between these calls will get passed external stack
    trace as external parent. These methods are designed to be called
    on different debuggers. If async task is scheduled and started on
    one debugger user should continue to use asyncTask* API,
  - Debugger.enable methods returns unique debuggerId.

TBR=dgozman@chromium.org,jgruber@chromium.org

Bug: chromium:778796
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_chromium_rel_ng
Change-Id: I2c1a2b2e30ed69ccb61d10f08686f4edb09f50e4
Reviewed-on: https://chromium-review.googlesource.com/786274
Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Reviewed-by: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49591}
2017-11-22 20:56:10 +00:00
Clemens Hammacher
4379533ca4 Revert "[inspector] introduced stackTraceId and externalAsyncTask API"
This reverts commit 3a41b697cd.

Reason for revert: Break msvc: https://build.chromium.org/p/client.v8/builders/V8%20Win64%20-%20msvc/builds/250

Original change's description:
> [inspector] introduced stackTraceId and externalAsyncTask API
> 
> Sometimes we need to capture stack trace on one debugger and use it
> later as a parent stack on another debugger (e.g. worker.postMessage).
> 
> This CL includes following addition to our protocol and v8-inspector.h:
>   - added Runtime.StackTraceId, this id represents stack trace captured
>     on debugger with given id,
>   - protocol client can fetch Runtime.StackTrace by
>     Runtime.StacKTraceId using Debugger.getStackTrace method,
>   - externalParent field is added to Debugger.paused event, it may
>     contain external parent stack trace,
>   - V8Inspector::storeCurrentStackTrace captures current stack trace
>     and returns V8StackTraceId for embedder this id can be used as
>     argument for V8Inspector::externalAsyncTaskStarted and
>     V8Inspector::externalAsyncTaskFinished method. Any async stack
>     trace captured between these calls will get passed external stack
>     trace as external parent. These methods are designed to be called
>     on different debuggers. If async task is scheduled and started on
>     one debugger user should continue to use asyncTask* API,
>   - Debugger.enable methods returns unique debuggerId.
> 
> Bug: chromium:778796
> Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_chromium_rel_ng
> Change-Id: I16aba0d04bfcea90f3e187e635a0588c92354539
> Reviewed-on: https://chromium-review.googlesource.com/754183
> Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
> Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#49582}

TBR=dgozman@chromium.org,pfeldman@chromium.org,yangguo@chromium.org,kozyatinskiy@chromium.org,jgruber@chromium.org

Change-Id: I9b52354fa0841e5148596cf594317f2e5fe508ea
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:778796
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_chromium_rel_ng
Reviewed-on: https://chromium-review.googlesource.com/786152
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49584}
2017-11-22 17:39:00 +00:00
Alexey Kozyatinskiy
3a41b697cd [inspector] introduced stackTraceId and externalAsyncTask API
Sometimes we need to capture stack trace on one debugger and use it
later as a parent stack on another debugger (e.g. worker.postMessage).

This CL includes following addition to our protocol and v8-inspector.h:
  - added Runtime.StackTraceId, this id represents stack trace captured
    on debugger with given id,
  - protocol client can fetch Runtime.StackTrace by
    Runtime.StacKTraceId using Debugger.getStackTrace method,
  - externalParent field is added to Debugger.paused event, it may
    contain external parent stack trace,
  - V8Inspector::storeCurrentStackTrace captures current stack trace
    and returns V8StackTraceId for embedder this id can be used as
    argument for V8Inspector::externalAsyncTaskStarted and
    V8Inspector::externalAsyncTaskFinished method. Any async stack
    trace captured between these calls will get passed external stack
    trace as external parent. These methods are designed to be called
    on different debuggers. If async task is scheduled and started on
    one debugger user should continue to use asyncTask* API,
  - Debugger.enable methods returns unique debuggerId.

Bug: chromium:778796
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_chromium_rel_ng
Change-Id: I16aba0d04bfcea90f3e187e635a0588c92354539
Reviewed-on: https://chromium-review.googlesource.com/754183
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49582}
2017-11-22 16:33:06 +00:00
Alexey Kozyatinskiy
b1cd96ec4b [inspector] added V8InspectorClient::maxAsyncCallStackDepthChanged
R=dgozman@chromium.org

Bug: none
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_chromium_rel_ng
Change-Id: I0fa10978266feb3c3907ce1f3386ae7a34a33582
Reviewed-on: https://chromium-review.googlesource.com/726490
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#48705}
2017-10-18 19:49:57 +00:00
kozyatinskiy
43791ce02c [inspector] finally removed *ExecuteScript from inspector
We don't need hints from embedder any more.

BUG=none
R=dgozman@chromium.org

Review-Url: https://codereview.chromium.org/2773143002
Cr-Commit-Position: refs/heads/master@{#44158}
2017-03-27 19:26:18 +00:00
kozyatinskiy
7cc1694f51 [inspector] exposed ExecutionContextId getter by context
BUG=none
R=pfeldman@chromium.org

Review-Url: https://codereview.chromium.org/2690663003
Cr-Commit-Position: refs/heads/master@{#43122}
2017-02-11 02:42:17 +00:00
pfeldman
82ef9f75e3 V8 Inspector: complete migration to the standard message level enum.
BUG=chromium:682521

Review-Url: https://codereview.chromium.org/2659913002
Cr-Commit-Position: refs/heads/master@{#42747}
2017-01-27 18:49:09 +00:00
pfeldman
76e31da4f6 V8 Inspector: remove V8ConsoleAPIType from the API, reuse v8::Isolate::MessageErrorLevel instead.
BUG=chromium:682521

Review-Url: https://codereview.chromium.org/2656613004
Cr-Commit-Position: refs/heads/master@{#42666}
2017-01-25 22:23:18 +00:00
kozyatinskiy
d385ed069b [inspector] removed old v8_inspector::Channel API
BUG=chromium:350797
R=dgozman@chromium.org
TBR=yangguo@chromium.org

Review-Url: https://codereview.chromium.org/2527473004
Cr-Commit-Position: refs/heads/master@{#41371}
2016-11-29 19:31:23 +00:00
kozyatinskiy
eb3551d0a3 Roll third_party/inspector_protocol to 4ad35c45aca9834b67ec2cb152c816ea1b7ceb48
This roll includes:
  - [inspector_protocol] Introduce protocol::Serializable [1]

[1] https://codereview.chromium.org/2526603002

BUG=chromium:350797
R=dgozman@chromium.org

Review-Url: https://codereview.chromium.org/2523583005
Cr-Commit-Position: refs/heads/master@{#41197}
2016-11-23 00:45:54 +00:00
kozyatinskiy
e882623820 [inspector] fixed all shorten-64-to-32 warnings
BUG=chromium:635948
R=dgozman@chromium.org,alph@chromium.org

Committed: https://crrev.com/3d10918d2e1c57d72531c55a956262f5a72fceaa
Review-Url: https://codereview.chromium.org/2332163002
Cr-Original-Commit-Position: refs/heads/master@{#39426}
Cr-Commit-Position: refs/heads/master@{#39610}
2016-09-22 01:48:10 +00:00
hablich
4b8f6543f4 Revert of [inspector] fixed all shorten-64-to-32 warnings (patchset #4 id:80001 of https://codereview.chromium.org/2332163002/ )
Reason for revert:
Blocking V8 roll: https://codereview.chromium.org/2347463002/

See https://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_ng/builds/293368 for compile error.

Original issue's description:
> [inspector] fixed all shorten-64-to-32 warnings
>
> BUG=chromium:635948
> R=dgozman@chromium.org,alph@chromium.org
>
> Committed: https://crrev.com/3d10918d2e1c57d72531c55a956262f5a72fceaa
> Cr-Commit-Position: refs/heads/master@{#39426}

TBR=jochen@chromium.org,alph@chromium.org,dgozman@chromium.org,kozyatinskiy@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=chromium:635948

Review-Url: https://codereview.chromium.org/2339173004
Cr-Commit-Position: refs/heads/master@{#39432}
2016-09-15 00:42:06 +00:00
kozyatinskiy
3d10918d2e [inspector] fixed all shorten-64-to-32 warnings
BUG=chromium:635948
R=dgozman@chromium.org,alph@chromium.org

Review-Url: https://codereview.chromium.org/2332163002
Cr-Commit-Position: refs/heads/master@{#39426}
2016-09-14 18:25:00 +00:00
dgozman
81b7e77ff0 [inspector] Build inspector under v8_enable_inspector build flag.
- inspector becomes a dependency of v8_base;
- generated public protocol files are placed to gen/v8/include/inspector/<Domain.h>;
- added v8_enable_inspector_override to be used in embedders (gn only);
- combined public headers into v8-inspector.h and v8-inspector-protocol.h.

BUG=chromium:635948

Review-Url: https://codereview.chromium.org/2292053003
Cr-Commit-Position: refs/heads/master@{#39226}
2016-09-06 23:26:35 +00:00