Index: Source/core/page/ContextMenuController.cpp |
diff --git a/Source/core/page/ContextMenuController.cpp b/Source/core/page/ContextMenuController.cpp |
index 77797e389c8306b5f1ba0f11f8e20172d5b23e60..226e2108b2f1ad91d4961e33ba9ec3ae57d3a8c8 100644 |
--- a/Source/core/page/ContextMenuController.cpp |
+++ b/Source/core/page/ContextMenuController.cpp |
@@ -72,7 +72,7 @@ void ContextMenuController::documentDetached(Document* document) |
{ |
if (Node* innerNode = m_hitTestResult.innerNode()) { |
// Invalidate the context menu info if its target document is detached. |
- if (innerNode->document() == document) |
+ if (&innerNode->document() == document) |
clearContextMenu(); |
} |
} |
@@ -110,7 +110,7 @@ PassOwnPtr<ContextMenu> ContextMenuController::createContextMenu(Event* event) |
MouseEvent* mouseEvent = toMouseEvent(event); |
HitTestResult result(mouseEvent->absoluteLocation()); |
- if (Frame* frame = event->target()->toNode()->document()->frame()) |
+ if (Frame* frame = event->target()->toNode()->document().frame()) |
result = frame->eventHandler()->hitTestResultAtPoint(mouseEvent->absoluteLocation(), HitTestRequest::ReadOnly | HitTestRequest::Active | HitTestRequest::DisallowShadowContent); |
if (!result.innerNonSharedNode()) |