v8/test/inspector/runtime
Alexey Kozyatinskiy 5cb11a17cd Reland "[inspector] added Runtime.installBinding method"
This is a reland of 49c4ac7753

Original change's description:
> [inspector] added Runtime.installBinding method
>
> A lot of different clients use console.debug as a message channel from
> page to protocol client. console.debug is a little slow and not
> designed for this use case.
>
> This CL introduces new method: Runtime.installBinding. This method
> installs binding function by given name on global object on each
> inspected context including any context created later.
> Binding function takes exactly one string argument. Each time when
> binding function is called, Runtime.bindingCalled notification is
> triggered and includes passed payload.
>
> Binding function survives page reload and reinstalled right after
> console object is setup. So installed binding can be used inside
> script added by Page.addScriptToEvaluateOnNewDocument so client may do
> something like:
> Runtime.installBinding({name: 'send'});
> Page.addScriptToEvaluateOnNewDocument({source: 'console.debug = send'});
> .. navigate page ..
>
> In microbenchmark this function is ~4.6 times faster then
> console.debug.
>
> R=lushnikov@chromium.org,pfeldman@chromium.org
>
> Bug: none
> Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel
> Change-Id: I3e0e231dde9d45116709d248f6e9e7ec7037e8e3
> Reviewed-on: https://chromium-review.googlesource.com/1077662
> Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
> Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#53462}

TBR=dgozman@chromium.org

Bug: none
Change-Id: I58d053581a86f15338dea621498058b7b75c7c85
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel
Reviewed-on: https://chromium-review.googlesource.com/1081833
Reviewed-by: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53479}
2018-06-01 22:52:55 +00:00
..
add-binding-expected.txt Reland "[inspector] added Runtime.installBinding method" 2018-06-01 22:52:55 +00:00
add-binding.js Reland "[inspector] added Runtime.installBinding method" 2018-06-01 22:52:55 +00:00
await-promise-expected.txt Revert "[inspector] RemoteObject.description should be empty for primitive type" 2018-05-31 18:52:08 +00:00
await-promise.js [inspector] improved exception details for Runtime.evaluate with awaitPromise 2017-07-07 14:23:32 +00:00
call-function-on-async-expected.txt Revert "[inspector] RemoteObject.description should be empty for primitive type" 2018-05-31 18:52:08 +00:00
call-function-on-async.js [inspector] support BigInt in inspector 2018-03-09 21:28:00 +00:00
clear-of-command-line-api-expected.txt Revert "[inspector] RemoteObject.description should be empty for primitive type" 2018-05-31 18:52:08 +00:00
clear-of-command-line-api.js [inspector] Refactor protocol-test.js 2017-05-19 00:35:45 +00:00
client-console-api-message-expected.txt [inspector] avoid cloning of async call chains 2017-04-18 15:53:08 +00:00
client-console-api-message.js [inspector] Refactor protocol-test.js 2017-05-19 00:35:45 +00:00
command-line-api-expected.txt Revert "[inspector] RemoteObject.description should be empty for primitive type" 2018-05-31 18:52:08 +00:00
command-line-api-without-side-effects-expected.txt [inspector] whitelist side-effect-free console API callbacks 2018-04-23 22:06:07 +00:00
command-line-api-without-side-effects.js [inspector] whitelist side-effect-free console API callbacks 2018-04-23 22:06:07 +00:00
command-line-api.js Revert "[inspector] queryObjects returns result" 2018-03-28 01:49:48 +00:00
compile-script-expected.txt [inspector] Refactor protocol-test.js 2017-05-19 00:35:45 +00:00
compile-script.js [inspector] Refactor protocol-test.js 2017-05-19 00:35:45 +00:00
console-api-repeated-in-console-expected.txt [inspector] Refactor protocol-test.js 2017-05-19 00:35:45 +00:00
console-api-repeated-in-console.js [inspector] Refactor protocol-test.js 2017-05-19 00:35:45 +00:00
console-assert-expected.txt Revert "[inspector] RemoteObject.description should be empty for primitive type" 2018-05-31 18:52:08 +00:00
console-assert.js [inspector] Refactor protocol-test.js 2017-05-19 00:35:45 +00:00
console-context-expected.txt [inspector] implement console.countReset() 2018-05-09 14:59:04 +00:00
console-context.js [inspector] introduced console.context 2017-06-12 15:49:13 +00:00
console-deprecated-methods-expected.txt [inspector] Refactor protocol-test.js 2017-05-19 00:35:45 +00:00
console-deprecated-methods.js [inspector] Refactor protocol-test.js 2017-05-19 00:35:45 +00:00
console-line-and-column-expected.txt Revert "[inspector] RemoteObject.description should be empty for primitive type" 2018-05-31 18:52:08 +00:00
console-line-and-column.js [inspector] Refactor protocol-test.js 2017-05-19 00:35:45 +00:00
console-log-doesnt-run-microtasks-expected.txt Revert "[inspector] RemoteObject.description should be empty for primitive type" 2018-05-31 18:52:08 +00:00
console-log-doesnt-run-microtasks.js [inspector] Refactor protocol-test.js 2017-05-19 00:35:45 +00:00
console-memory-expected.txt Revert "[inspector] RemoteObject.description should be empty for primitive type" 2018-05-31 18:52:08 +00:00
console-memory.js [inspector] Refactor protocol-test.js 2017-05-19 00:35:45 +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] Refactor protocol-test.js 2017-05-19 00:35:45 +00:00
console-methods-expected.txt [inspector] implement console.countReset() 2018-05-09 14:59:04 +00:00
console-methods.js [inspector] implement console.countReset() 2018-05-09 14:59:04 +00:00
console-spec-expected.txt [inspector] Refactor protocol-test.js 2017-05-19 00:35:45 +00:00
console-spec.js [inspector] Refactor protocol-test.js 2017-05-19 00:35:45 +00:00
console-time-end-format-expected.txt [inspector] align console.time(undefined) and console.time() with spec 2017-10-17 00:09:26 +00:00
console-time-end-format.js [inspector] align console.time(undefined) and console.time() with spec 2017-10-17 00:09:26 +00:00
console-time-repeat-expected.txt Do not reset timer for console.time calls with the same label 2017-12-01 19:17:30 +00:00
console-time-repeat.js Do not reset timer for console.time calls with the same label 2017-12-01 19:17:30 +00:00
console-timestamp-expected.txt [inspector] Refactor protocol-test.js 2017-05-19 00:35:45 +00:00
console-timestamp.js [inspector] Refactor protocol-test.js 2017-05-19 00:35:45 +00:00
context-destroyed-on-context-collected-expected.txt [inspector] support for cases when embedder doesn't call contextDestroyed 2017-08-01 23:06:20 +00:00
context-destroyed-on-context-collected.js [inspector] support for cases when embedder doesn't call contextDestroyed 2017-08-01 23:06:20 +00:00
create-context-expected.txt Reland [inspector] introduced stackTraceId and externalAsyncTask API 2017-11-22 20:56:10 +00:00
create-context.js [inspector] Refactor protocol-test.js 2017-05-19 00:35:45 +00:00
enable-async-stack-expected.txt Expose Runtime.setAsyncCallStackDepth API for async stack collection. 2018-06-01 03:09:27 +00:00
enable-async-stack.js Expose Runtime.setAsyncCallStackDepth API for async stack collection. 2018-06-01 03:09:27 +00:00
es6-module-expected.txt Revert "[inspector] RemoteObject.description should be empty for primitive type" 2018-05-31 18:52:08 +00:00
es6-module.js [inspector] Refactor protocol-test.js 2017-05-19 00:35:45 +00:00
evaluate-async-expected.txt Revert "[inspector] RemoteObject.description should be empty for primitive type" 2018-05-31 18:52:08 +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] Refactor protocol-test.js 2017-05-19 00:35:45 +00:00
evaluate-async.js [inspector] aligned Runtime.evaluate(awaitPromise: true) with await semantic 2017-08-15 01:35:29 +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] Refactor protocol-test.js 2017-05-19 00:35:45 +00:00
evaluate-run-microtasks-expected.txt Revert "[inspector] RemoteObject.description should be empty for primitive type" 2018-05-31 18:52:08 +00:00
evaluate-run-microtasks.js Set RuntimeAgent evaluate to use DebugEvaluate::Global 2018-02-16 19:56:20 +00:00
evaluate-timeout-expected.txt Reland "[inspector] added timeout argument for Runtime.evaluate" 2018-04-14 07:27:32 +00:00
evaluate-timeout.js Reland "[inspector] added timeout argument for Runtime.evaluate" 2018-04-14 07:27:32 +00:00
evaluate-unserializable-expected.txt Revert "[inspector] RemoteObject.description should be empty for primitive type" 2018-05-31 18:52:08 +00:00
evaluate-unserializable.js [inspector] support BigInt in inspector 2018-03-09 21:28:00 +00:00
evaluate-with-context-id-equal-zero-expected.txt [inspector] Refactor protocol-test.js 2017-05-19 00:35:45 +00:00
evaluate-with-context-id-equal-zero.js [inspector] Refactor protocol-test.js 2017-05-19 00:35:45 +00:00
evaluate-with-generate-preview-expected.txt [inspector] support BigInt in inspector 2018-03-09 21:28:00 +00:00
evaluate-with-generate-preview.js [inspector] support BigInt in inspector 2018-03-09 21:28:00 +00:00
evaluate-without-side-effects-expected.txt Revert "[inspector] RemoteObject.description should be empty for primitive type" 2018-05-31 18:52:08 +00:00
evaluate-without-side-effects.js [debug] disable debug breaks in side-effect free debug-evaluate. 2018-03-26 16:27:32 +00:00
exception-thrown-expected.txt Revert "[inspector] RemoteObject.description should be empty for primitive type" 2018-05-31 18:52:08 +00:00
exception-thrown.js [inspector] Refactor protocol-test.js 2017-05-19 00:35:45 +00:00
function-scopes-expected.txt Revert "[inspector] RemoteObject.description should be empty for primitive type" 2018-05-31 18:52:08 +00:00
function-scopes.js [inspector] report [[Scopes]] all the time 2017-09-12 21:17:35 +00:00
get-heap-usage-expected.txt [inspector] Add Runtime.getIsolateId & Runtime.getHeapUsage commands 2018-03-20 23:33:53 +00:00
get-heap-usage.js [inspector] Add Runtime.getIsolateId & Runtime.getHeapUsage commands 2018-03-20 23:33:53 +00:00
get-isolate-id-expected.txt [inspector] Add Runtime.getIsolateId & Runtime.getHeapUsage commands 2018-03-20 23:33:53 +00:00
get-isolate-id.js [inspector] Add Runtime.getIsolateId & Runtime.getHeapUsage commands 2018-03-20 23:33:53 +00:00
get-properties-expected.txt [inspector] Make test byte order independent 2018-01-23 20:24:46 +00:00
get-properties-on-proxy-expected.txt Revert "[inspector] RemoteObject.description should be empty for primitive type" 2018-05-31 18:52:08 +00:00
get-properties-on-proxy.js [proxy] Set [[ProxyTarget]] to null during revocation 2018-01-10 11:23:54 +00:00
get-properties-preview-expected.txt [inspector] Refactor protocol-test.js 2017-05-19 00:35:45 +00:00
get-properties-preview.js [inspector] Refactor protocol-test.js 2017-05-19 00:35:45 +00:00
get-properties.js [inspector] Make test byte order independent 2018-01-23 20:24:46 +00:00
internal-properties-entries-expected.txt Revert "[inspector] RemoteObject.description should be empty for primitive type" 2018-05-31 18:52:08 +00:00
internal-properties-entries.js [inspector] Refactor protocol-test.js 2017-05-19 00:35:45 +00:00
internal-properties-expected.txt Revert "[inspector] RemoteObject.description should be empty for primitive type" 2018-05-31 18:52:08 +00:00
internal-properties.js [inspector] support BigInt in inspector 2018-03-09 21:28:00 +00:00
length-or-size-description-expected.txt inspector: add lengths for binary data descriptions 2017-07-25 00:19:55 +00:00
length-or-size-description.js inspector: add lengths for binary data descriptions 2017-07-25 00:19:55 +00:00
property-on-console-proto-expected.txt Revert "[inspector] RemoteObject.description should be empty for primitive type" 2018-05-31 18:52:08 +00:00
property-on-console-proto.js [inspector] Refactor protocol-test.js 2017-05-19 00:35:45 +00:00
protocol-works-with-different-locale-expected.txt Revert "[inspector] RemoteObject.description should be empty for primitive type" 2018-05-31 18:52:08 +00:00
protocol-works-with-different-locale.js [inspector] Refactor protocol-test.js 2017-05-19 00:35:45 +00:00
query-objects-expected.txt [inspector] queryObjects() should take objectGroup 2018-03-14 20:12:56 +00:00
query-objects.js [inspector] queryObjects() should take objectGroup 2018-03-14 20:12:56 +00:00
regression-732717-expected.txt [inspector] console.context should be ready for GC 2017-06-13 10:38:15 +00:00
regression-732717.js [inspector] console.context should be ready for GC 2017-06-13 10:38:15 +00:00
regression-736302-expected.txt DevTools: also use default label for console.count 2017-12-01 20:17:20 +00:00
regression-736302.js [inspector] catch exception during object.toString() call for console 2017-07-12 06:01:42 +00:00
run-script-async-expected.txt [inspector] aligned Runtime.evaluate(awaitPromise: true) with await semantic 2017-08-15 01:35:29 +00:00
run-script-async.js [inspector] aligned Runtime.evaluate(awaitPromise: true) with await semantic 2017-08-15 01:35:29 +00:00
runtime-disable-preserve-injected-script-expected.txt Revert "[inspector] RemoteObject.description should be empty for primitive type" 2018-05-31 18:52:08 +00:00
runtime-disable-preserve-injected-script.js [inspector] don't discard injected-script on runtime.disable 2017-08-10 04:33:14 +00:00
runtime-evaluate-null-property-expected.txt [inspector] aligned Runtime.evaluate(returnValue:true) result with json 2017-12-19 20:16:09 +00:00
runtime-evaluate-null-property.js [inspector] aligned Runtime.evaluate(returnValue:true) result with json 2017-12-19 20:16:09 +00:00
runtime-evaluate-with-dirty-context-expected.txt Revert "[inspector] RemoteObject.description should be empty for primitive type" 2018-05-31 18:52:08 +00:00
runtime-evaluate-with-dirty-context.js [inspector] Refactor protocol-test.js 2017-05-19 00:35:45 +00:00
runtime-get-properties-and-accessor-expected.txt [inspector] do not call native accessor in Rumtime.getProperties 2017-11-06 17:45:46 +00:00
runtime-get-properties-and-accessor.js [inspector] do not call native accessor in Rumtime.getProperties 2017-11-06 17:45:46 +00:00
runtime-global-lexical-scope-names-expected.txt [inspector] added Runtime.globalLexicalScopeNames method 2017-10-17 01:02:37 +00:00
runtime-global-lexical-scope-names.js [inspector] added Runtime.globalLexicalScopeNames method 2017-10-17 01:02:37 +00:00
runtime-restore-expected.txt Revert "[inspector] RemoteObject.description should be empty for primitive type" 2018-05-31 18:52:08 +00:00
runtime-restore.js [inspector] added Runtime.globalLexicalScopeNames method 2017-10-17 01:02:37 +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] Refactor protocol-test.js 2017-05-19 00:35:45 +00:00
terminate-execution-expected.txt Revert "[inspector] RemoteObject.description should be empty for primitive type" 2018-05-31 18:52:08 +00:00
terminate-execution.js Reland "[inspector] added Runtime.terminateExecution" 2018-03-19 02:14:52 +00:00