Fix contextmenu for console view messages
Fix contextmenu for console view messages

In https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2364598
we refactored the storage of the "message" field (which is a reference
to ConsoleMessage model object) via a weakmap. However, this field is actually
assigned in `ConsoleViewMessage`, which was not using this weakmap.
Therefore, the lookup would fail and throw an error.

The incorrect refactoring was due to the fact that `ConsoleCommand` *also*
overrides the `message` field, which threw me off the first time. For some reason,
the `ConsoleCommand` is anologous to the `ConsoleMessage` model object, but they
are still different classes.

Since this change got into M86, I am applying the smallest change to fix
the user behavior. In the future, we should refactor `ConsoleView` in combination
with `ConsoleViewMessage` to make sure they both use the same WeakMap.

R=6d0eecbeb7fb9d172f49b4b32481d2466fd89429@chromium.org
CC=szuend@chromium.org

Fixed: 1120987
Change-Id: I67cb3ea685698c5326ad26032dd66e46e367124b
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2372146
Reviewed-by: Peter Marshall <6d0eecbeb7fb9d172f49b4b32481d2466fd89429@chromium.org>
Commit-Queue: Tim van der Lippe <dba8716ee7f8d16236046f74d2167cb94410f6ed@chromium.org>

ChromeDevTools/devtools-frontend,ChromeDevTools/devtools-frontend,ChromeDevTools/devtools-frontend,ChromeDevTools/devtools-frontend,ChromeDevTools/devtools-frontend,ChromeDevTools/devtools-frontend