• 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
benchmarks Loading commit data...
build_overrides Loading commit data...
docs Loading commit data...
gni Loading commit data...
gypfiles Loading commit data...
include Loading commit data...
infra Loading commit data...
samples Loading commit data...
src Loading commit data...
test Loading commit data...
testing Loading commit data...
third_party Loading commit data...
tools Loading commit data...
.clang-format Loading commit data...
.gitignore Loading commit data...
.gn Loading commit data...
.ycm_extra_conf.py Loading commit data...
AUTHORS Loading commit data...
BUILD.gn Loading commit data...
CODE_OF_CONDUCT.md Loading commit data...
ChangeLog Loading commit data...
DEPS Loading commit data...
LICENSE Loading commit data...
LICENSE.fdlibm Loading commit data...
LICENSE.strongtalk Loading commit data...
LICENSE.v8 Loading commit data...
LICENSE.valgrind Loading commit data...
Makefile Loading commit data...
Makefile.android Loading commit data...
OWNERS Loading commit data...
PRESUBMIT.py Loading commit data...
README.md Loading commit data...
WATCHLISTS Loading commit data...
codereview.settings Loading commit data...
snapshot_toolchain.gni Loading commit data...