New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 715033 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Oct 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Inspecting slot fallback content on Document causes DCHECK()

Project Member Reported by kochi@chromium.org, Apr 25 2017

Issue description

Chrome Version: ToT (debug build)
OS: Any

Steps to reproduce:

1. Open attached file (document-slot.html)
2. Open inspector
3. Inspect slot element


A <slot> element can have fallback content in Document tree
(not in a shadow tree).

Calling HTMLSlotElement::FirstDistributedNode() for such a slot
will cause DCHECK() on this line:
https://cs.chromium.org/chromium/src/third_party/WebKit/Source/core/html/HTMLSlotElement.h?type=cs&q=FirstDistributedNode&l=54

backtrace

#0 0x7f949406535b base::debug::StackTrace::StackTrace()
#1 0x7f949406405c base::debug::StackTrace::StackTrace()
#2 0x7f9494064e6f base::debug::(anonymous namespace)::StackDumpSignalHandler()
#3 0x7f94997a2330 <unknown>
#4 0x7f948582dc37 gsignal
#5 0x7f9485831028 abort
#6 0x7f9494062056 base::debug::(anonymous namespace)::DebugBreak()
#7 0x7f9494062038 base::debug::BreakDebugger()
#8 0x7f94940d7bf4 logging::LogMessage::~LogMessage()
#9 0x7f948bc229d6 blink::HTMLSlotElement::FirstDistributedNode()
#10 0x7f948c25c54d blink::InspectorDOMAgent::BuildDistributedNodesForSlot()
#11 0x7f948c254360 blink::InspectorDOMAgent::BuildObjectForNode()
#12 0x7f948c25505e blink::InspectorDOMAgent::BuildArrayForContainerChildren()
#13 0x7f948c254d1d blink::InspectorDOMAgent::PushChildNodesToFrontend()
#14 0x7f948c25558f blink::InspectorDOMAgent::requestChildNodes()
#15 0x7f948c2555f9 blink::InspectorDOMAgent::requestChildNodes()
#16 0x7f948cf2d921 blink::protocol::DOM::DispatcherImpl::requestChildNodes()
#17 0x7f948cf2c4b6 blink::protocol::DOM::DispatcherImpl::dispatch()
#18 0x7f948cfc2222 blink::protocol::UberDispatcher::dispatch()
#19 0x7f948c2d5532 blink::InspectorSession::DispatchProtocolMessage()
#20 0x7f94897914c0 blink::WebDevToolsAgentImpl::DispatchMessageFromFrontend()
#21 0x7f948979134e blink::WebDevToolsAgentImpl::DispatchOnInspectorBackend()
#22 0x7f9496f8d80f content::DevToolsAgent::OnDispatchOnInspectorBackend()

 
document-slot.html
55 bytes View Download

Comment 1 by hayato@chromium.org, Apr 26 2017

Status: Available (was: Untriaged)

Comment 2 by hayato@chromium.org, May 26 2017

Cc: kochi@chromium.org
Owner: yuzus@chromium.org
Status: Assigned (was: Available)
yuzus@, could you have a chance to take look?
kochi@, help yuzus@ if needed.

Comment 3 by hayato@chromium.org, Jul 11 2017

Components: -Blink>DOM>ShadowDOM

Comment 4 by kochi@chromium.org, Aug 30 2017

Owner: elkurin@google.com
elkurin@, could you check if this still happens, and if so, could you fix?
Project Member

Comment 5 by sheriffbot@chromium.org, Oct 11 2017

Labels: Hotlist-Recharge-BouncingOwner
Owner: ----
Status: Untriaged (was: Assigned)
The assigned owner "elkurin@google.com" is not able to receive e-mails, please re-triage.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot

Comment 6 by kochi@chromium.org, Oct 12 2017

Owner: rakina@chromium.org
Status: Assigned (was: Untriaged)
Rakina, this would be a good bug to learn about debugging Blink.
Project Member

Comment 7 by bugdroid1@chromium.org, Oct 16 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/b44ad5f753584eca237a6185a749d05ddec87209

commit b44ad5f753584eca237a6185a749d05ddec87209
Author: Rakina Zata Amni <rakina@chromium.org>
Date: Mon Oct 16 04:59:15 2017

Check if slot is in a shadow tree before building its distributed nodes

If you open a page with a slot that's not under a shadow tree
and try to inspect that slot, it will crash because of a DCHECK
when trying to build distributed nodes for that slot.

Solution: Added a condition to check whether a slot is in a shadow tree
or not before building distributed nodes for that slot.

Bug:  715033 
Change-Id: Ic778c1ebff95d6a035d2bb53932ac50761357beb
Reviewed-on: https://chromium-review.googlesource.com/715976
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Reviewed-by: Takayoshi Kochi <kochi@chromium.org>
Commit-Queue: Rakina Amni <rakina@chromium.org>
Cr-Commit-Position: refs/heads/master@{#508985}
[add] https://crrev.com/b44ad5f753584eca237a6185a749d05ddec87209/third_party/WebKit/LayoutTests/http/tests/devtools/elements/shadow/inspect-slot-not-in-shadow-tree-expected.txt
[add] https://crrev.com/b44ad5f753584eca237a6185a749d05ddec87209/third_party/WebKit/LayoutTests/http/tests/devtools/elements/shadow/inspect-slot-not-in-shadow-tree.html
[modify] https://crrev.com/b44ad5f753584eca237a6185a749d05ddec87209/third_party/WebKit/Source/core/inspector/InspectorDOMAgent.cpp

Comment 8 by rakina@chromium.org, Oct 16 2017

Status: Fixed (was: Assigned)

Sign in to add a comment