Chrome Version: ToT Debug build
OS: All but iOS
What steps will reproduce the problem?
(1) Open the following HTML with Debug build Chromium
(2) Click on "Press me" text
<!DOCTYPE html>
<div onmousedown="handleDown(this)">Press me</div>
<script>
function handleDown(node) {
var d2 = new Document();
d2.appendChild(node);
}
</script>
What is the expected result?
No crash.
What happens instead?
DCHECK failure.
[88220:775:0721/120416.494034:FATAL:Document.cpp(4437)] Check failed: node->GetDocument() == this (#document vs. #document)
0 libbase.dylib 0x000000010bd905ae base::debug::StackTrace::StackTrace(unsigned long) + 174
1 libbase.dylib 0x000000010bd9067d base::debug::StackTrace::StackTrace(unsigned long) + 29
2 libbase.dylib 0x000000010bd8e91c base::debug::StackTrace::StackTrace() + 28
3 libbase.dylib 0x000000010be2d62f logging::LogMessage::~LogMessage() + 479
4 libbase.dylib 0x000000010be2afa5 logging::LogMessage::~LogMessage() + 21
5 libblink_core.dylib 0x000000013f39a990 blink::Document::SetSequentialFocusNavigationStartingPoint(blink::Node*) + 304
6 libblink_core.dylib 0x000000013fef1cdf blink::MouseEventManager::HandleMousePressEvent(blink::EventWithHitTestResults<blink::WebMouseEvent> const&) + 1231
7 libblink_core.dylib 0x000000013fed88be blink::EventHandler::HandleMousePressEvent(blink::WebMouseEvent const&) + 3198
8 libblink_core.dylib 0x0000000140713ca3 blink::PageWidgetEventHandler::HandleMouseDown(blink::LocalFrame&, blink::WebMouseEvent const&) + 83
9 libblink_web.dylib 0x000000014c3c9ed4 blink::WebViewImpl::HandleMouseDown(blink::LocalFrame&, blink::WebMouseEvent const&) + 1220
blink::MouseEventManager::HandleMousePressEvent should call SetSequentialFocusNavigationStartingPoint for inner_node's Document, not frame_->GetDocument().
Comment 1 by kochi@chromium.org
, Jul 21 2017Status: Assigned (was: Available)