This should be fixed before shipping PaintWorklet.
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/59028394b71ed30f862465017f78db9de0f517f8 commit 59028394b71ed30f862465017f78db9de0f517f8 Author: Xida Chen <xidachen@chromium.org> Date: Thu Jun 29 03:48:29 2017 Show PaintWorkletGlobalScope in dev-tool's console list Currently, if we open a webpage that calls registerPaint API and open the dev-tool, we would see "top" under the console list. The reason is that when the MainThreadDebugger::ContextCreated is called, the |human_readable_name| is set to an empty string. This CL changes it such that when the InitializeContextIfNeeded is called from PaintWorkletGlobalScope::Create, we pass a string to set the |human_readable_name| when it is not the main world, and that string will show up in the dev-tool's console list. Bug: 728591 Change-Id: I588d40c03d670331fdabee456411c34f75a7fb02 Reviewed-on: https://chromium-review.googlesource.com/543616 Commit-Queue: Xida Chen <xidachen@chromium.org> Reviewed-by: Philip Rogers <pdr@chromium.org> Reviewed-by: Andrey Kosyakov <caseq@chromium.org> Reviewed-by: Jeremy Roman <jbroman@chromium.org> Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org> Cr-Commit-Position: refs/heads/master@{#483286} [add] https://crrev.com/59028394b71ed30f862465017f78db9de0f517f8/third_party/WebKit/LayoutTests/inspector/console/paintworklet-console-selector-expected.txt [add] https://crrev.com/59028394b71ed30f862465017f78db9de0f517f8/third_party/WebKit/LayoutTests/inspector/console/paintworklet-console-selector.html [modify] https://crrev.com/59028394b71ed30f862465017f78db9de0f517f8/third_party/WebKit/Source/bindings/core/v8/ScriptController.cpp [modify] https://crrev.com/59028394b71ed30f862465017f78db9de0f517f8/third_party/WebKit/Source/bindings/core/v8/WorkerOrWorkletScriptController.cpp [modify] https://crrev.com/59028394b71ed30f862465017f78db9de0f517f8/third_party/WebKit/Source/bindings/core/v8/WorkerOrWorkletScriptController.h [modify] https://crrev.com/59028394b71ed30f862465017f78db9de0f517f8/third_party/WebKit/Source/core/frame/HostsUsingFeatures.cpp [modify] https://crrev.com/59028394b71ed30f862465017f78db9de0f517f8/third_party/WebKit/Source/core/inspector/MainThreadDebugger.cpp [modify] https://crrev.com/59028394b71ed30f862465017f78db9de0f517f8/third_party/WebKit/Source/core/workers/WorkerThread.cpp [modify] https://crrev.com/59028394b71ed30f862465017f78db9de0f517f8/third_party/WebKit/Source/modules/csspaint/PaintWorkletGlobalScope.cpp [modify] https://crrev.com/59028394b71ed30f862465017f78db9de0f517f8/third_party/WebKit/Source/platform/bindings/DOMWrapperWorld.cpp [modify] https://crrev.com/59028394b71ed30f862465017f78db9de0f517f8/third_party/WebKit/Source/platform/bindings/DOMWrapperWorld.h [modify] https://crrev.com/59028394b71ed30f862465017f78db9de0f517f8/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp
Comment 1 by xidac...@chromium.org
, Jun 5 2017