Initialize ContextMenuController::m_page
authoraroben <aroben@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 17 Jul 2007 21:17:00 +0000 (21:17 +0000)
committeraroben <aroben@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 17 Jul 2007 21:17:00 +0000 (21:17 +0000)
Somehow this variable had never been initialized before.

Reviewed by Tim.

* page/ContextMenuController.cpp:
(WebCore::ContextMenuController::ContextMenuController):
* page/ContextMenuController.h:
* page/Page.cpp:
(WebCore::Page::Page):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@24379 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebCore/ChangeLog
WebCore/page/ContextMenuController.cpp
WebCore/page/ContextMenuController.h
WebCore/page/Page.cpp

index 89ef18093d8b94bf6fd4add4c8fc8ab315b81d4f..7309ea982b19810eebefbce2f340b01998a609f1 100644 (file)
@@ -1,3 +1,17 @@
+2007-07-17  Adam Roben  <aroben@apple.com>
+
+        Initialize ContextMenuController::m_page
+
+        Somehow this variable had never been initialized before.
+
+        Reviewed by Tim.
+
+        * page/ContextMenuController.cpp:
+        (WebCore::ContextMenuController::ContextMenuController):
+        * page/ContextMenuController.h:
+        * page/Page.cpp:
+        (WebCore::Page::Page):
+
 2007-07-17  Adam Roben  <aroben@apple.com>
 
         Add Settings::developerExtrasEnabled
index 273a71e6e68812f0beae208d69033be68a477ffc..c494f440c65a9131572f071732275b9a6c939114 100644 (file)
@@ -58,10 +58,13 @@ namespace WebCore {
 
 using namespace EventNames;
 
-ContextMenuController::ContextMenuController(ContextMenuClient* client)
-    : m_client(client)
+ContextMenuController::ContextMenuController(Page* page, ContextMenuClient* client)
+    : m_page(page)
+    , m_client(client)
     , m_contextMenu(0)
 {
+    ASSERT_ARG(page, page);
+    ASSERT_ARG(client, client);
 }
 
 ContextMenuController::~ContextMenuController()
index cf70b00238412b738a69ed65ada700b48db6943e..cb7e6eec4da60644e3baecb41cef903e47de3d43 100644 (file)
@@ -39,7 +39,7 @@ namespace WebCore {
 
     class ContextMenuController : Noncopyable {
     public:
-        ContextMenuController(ContextMenuClient*);
+        ContextMenuController(Page*, ContextMenuClient*);
         ~ContextMenuController();
 
         ContextMenuClient* client() { return m_client; }
index f0a8ba1725984e8f32aab81b5d5f7963cfce4dae..9d866d64373beae9ab256ec6514abce4f5091665 100644 (file)
@@ -72,7 +72,7 @@ Page::Page(ChromeClient* chromeClient, ContextMenuClient* contextMenuClient, Edi
     , m_dragCaretController(new SelectionController(0, true))
     , m_dragController(new DragController(this, dragClient))
     , m_focusController(new FocusController(this))
-    , m_contextMenuController(new ContextMenuController(contextMenuClient))
+    , m_contextMenuController(new ContextMenuController(this, contextMenuClient))
     , m_settings(new Settings(this))
     , m_progress(new ProgressTracker)
     , m_backForwardList(new BackForwardList(this))