Title: [185507] trunk/Source/WebCore
- Revision
- 185507
- Author
- [email protected]
- Date
- 2015-06-12 09:48:58 -0700 (Fri, 12 Jun 2015)
Log Message
Web Inspector: CRASH trying to inspect text that was removed/replaced
https://bugs.webkit.org/show_bug.cgi?id=145898
Patch by Joseph Pecoraro <[email protected]> on 2015-06-12
Reviewed by Darin Adler.
* inspector/InspectorDOMAgent.cpp:
(WebCore::InspectorDOMAgent::inspect):
(WebCore::InspectorDOMAgent::focusNode):
Ensure we only cause focusNode with a node to focus. If the original
node that was provided is no longer in the document, then we won't
actually find a node to inspect.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (185506 => 185507)
--- trunk/Source/WebCore/ChangeLog 2015-06-12 16:45:15 UTC (rev 185506)
+++ trunk/Source/WebCore/ChangeLog 2015-06-12 16:48:58 UTC (rev 185507)
@@ -1,3 +1,17 @@
+2015-06-12 Joseph Pecoraro <[email protected]>
+
+ Web Inspector: CRASH trying to inspect text that was removed/replaced
+ https://bugs.webkit.org/show_bug.cgi?id=145898
+
+ Reviewed by Darin Adler.
+
+ * inspector/InspectorDOMAgent.cpp:
+ (WebCore::InspectorDOMAgent::inspect):
+ (WebCore::InspectorDOMAgent::focusNode):
+ Ensure we only cause focusNode with a node to focus. If the original
+ node that was provided is no longer in the document, then we won't
+ actually find a node to inspect.
+
2015-06-12 KwangHyuk Kim <[email protected]>
[EFL] canvas/philip/tests/toDataURL.jpeg.foo tests have been failed since r185417.
Modified: trunk/Source/WebCore/inspector/InspectorDOMAgent.cpp (185506 => 185507)
--- trunk/Source/WebCore/inspector/InspectorDOMAgent.cpp 2015-06-12 16:45:15 UTC (rev 185506)
+++ trunk/Source/WebCore/inspector/InspectorDOMAgent.cpp 2015-06-12 16:48:58 UTC (rev 185507)
@@ -966,12 +966,15 @@
{
ErrorString unused;
RefPtr<Node> node = inspectedNode;
- setSearchingForNode(unused, false, 0);
+ setSearchingForNode(unused, false, nullptr);
if (node->nodeType() != Node::ELEMENT_NODE && node->nodeType() != Node::DOCUMENT_NODE)
node = node->parentNode();
m_nodeToFocus = node;
+ if (!m_nodeToFocus)
+ return;
+
focusNode();
}
@@ -983,7 +986,7 @@
ASSERT(m_nodeToFocus);
RefPtr<Node> node = m_nodeToFocus.get();
- m_nodeToFocus = 0;
+ m_nodeToFocus = nullptr;
Frame* frame = node->document().frame();
if (!frame)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes