• Alexey Kozyatinskiy's avatar
    [inspector] introduced console.context · 701d79d0
    Alexey Kozyatinskiy authored
    console.context(name:string) method returns console instance, this console instance fully implements console interface (including fact that any method can be called without console as receiver).
    Protocol.Runtime.consoleAPICalled notification contains additional context:string field:
    - "anonymous#unique-id" for any method call on unnamed console context,
    - "name#unique-id" for any method call on named console context.
    
    console.count and console.timeEnd have context as a scope.
    console.clear clear all messages regardless on what context instance it was called.
    
    console calls is ~10% slower with this CL since we need to store and then fetch console_context_id and console_context_name from function object.
    We recently (in April) made console calls twice faster so 10% doesn't sound critical and existing of console.log call in hot code is problem by itself.
    
    R=pfeldman@chromium.org
    
    Bug: chromium:728767
    Change-Id: I5fc73216fb8b28bfe1e8c2c1b393ebfbe43cd02e
    Reviewed-on: https://chromium-review.googlesource.com/522128Reviewed-by: 's avatarIgor Sheludko <ishell@chromium.org>
    Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
    Reviewed-by: 's avatarDmitry Gozman <dgozman@chromium.org>
    Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#45864}
    701d79d0
Name
Last commit
Last update
..
await-promise-expected.txt Loading commit data...
await-promise.js Loading commit data...
call-function-on-async-expected.txt Loading commit data...
call-function-on-async.js Loading commit data...
clear-of-command-line-api-expected.txt Loading commit data...
clear-of-command-line-api.js Loading commit data...
client-console-api-message-expected.txt Loading commit data...
client-console-api-message.js Loading commit data...
command-line-api-expected.txt Loading commit data...
command-line-api.js Loading commit data...
compile-script-expected.txt Loading commit data...
compile-script.js Loading commit data...
console-api-repeated-in-console-expected.txt Loading commit data...
console-api-repeated-in-console.js Loading commit data...
console-assert-expected.txt Loading commit data...
console-assert.js Loading commit data...
console-context-expected.txt Loading commit data...
console-context.js Loading commit data...
console-deprecated-methods-expected.txt Loading commit data...
console-deprecated-methods.js Loading commit data...
console-line-and-column-expected.txt Loading commit data...
console-line-and-column.js Loading commit data...
console-log-doesnt-run-microtasks-expected.txt Loading commit data...
console-log-doesnt-run-microtasks.js Loading commit data...
console-memory-expected.txt Loading commit data...
console-memory.js Loading commit data...
console-messages-limits-expected.txt Loading commit data...
console-messages-limits.js Loading commit data...
console-methods-expected.txt Loading commit data...
console-methods.js Loading commit data...
console-spec-expected.txt Loading commit data...
console-spec.js Loading commit data...
console-time-end-format-expected.txt Loading commit data...
console-time-end-format.js Loading commit data...
console-timestamp-expected.txt Loading commit data...
console-timestamp.js Loading commit data...
create-context-expected.txt Loading commit data...
create-context.js Loading commit data...
es6-module-expected.txt Loading commit data...
es6-module.js Loading commit data...
evaluate-async-expected.txt Loading commit data...
evaluate-async-with-wrap-error-expected.txt Loading commit data...
evaluate-async-with-wrap-error.js Loading commit data...
evaluate-async.js Loading commit data...
evaluate-empty-stack-expected.txt Loading commit data...
evaluate-empty-stack.js Loading commit data...
evaluate-with-context-id-equal-zero-expected.txt Loading commit data...
evaluate-with-context-id-equal-zero.js Loading commit data...
evaluate-with-generate-preview-expected.txt Loading commit data...
evaluate-with-generate-preview.js Loading commit data...
exception-thrown-expected.txt Loading commit data...
exception-thrown.js Loading commit data...
get-properties-expected.txt Loading commit data...
get-properties-on-proxy-expected.txt Loading commit data...
get-properties-on-proxy.js Loading commit data...
get-properties-preview-expected.txt Loading commit data...
get-properties-preview.js Loading commit data...
get-properties.js Loading commit data...
internal-properties-entries-expected.txt Loading commit data...
internal-properties-entries.js Loading commit data...
internal-properties-expected.txt Loading commit data...
internal-properties.js Loading commit data...
length-or-size-description-expected.txt Loading commit data...
length-or-size-description.js Loading commit data...
property-on-console-proto-expected.txt Loading commit data...
property-on-console-proto.js Loading commit data...
protocol-works-with-different-locale-expected.txt Loading commit data...
protocol-works-with-different-locale.js Loading commit data...
run-script-async-expected.txt Loading commit data...
run-script-async.js Loading commit data...
runtime-evaluate-with-dirty-context-expected.txt Loading commit data...
runtime-evaluate-with-dirty-context.js Loading commit data...
runtime-restore-expected.txt Loading commit data...
runtime-restore.js Loading commit data...
set-or-map-entries-expected.txt Loading commit data...
set-or-map-entries.js Loading commit data...