From f18fd5372fb484e4dc13db72fa00d844dc2fc740 Mon Sep 17 00:00:00 2001 From: Ariya Hidayat Date: Tue, 25 Oct 2011 09:48:27 -0500 Subject: [PATCH] Fix regression of onInitialized. As suggested by Caio Marcelo de Oliveira Filho , there is no need to use queued connection for initialized() slot. http://code.google.com/p/phantomjs/issues/detail?id=264 --- python/pyphantomjs/webpage.py | 2 +- src/webpage.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/python/pyphantomjs/webpage.py b/python/pyphantomjs/webpage.py index 1200cf15..b768a006 100644 --- a/python/pyphantomjs/webpage.py +++ b/python/pyphantomjs/webpage.py @@ -95,7 +95,7 @@ class WebPage(QObject): self.m_mainFrame = self.m_webPage.mainFrame() self.m_webPage.mainFrame().setHtml(self.blankHtml) - self.m_mainFrame.javaScriptWindowObjectCleared.connect(self.initialized, Qt.QueuedConnection) + self.m_mainFrame.javaScriptWindowObjectCleared.connect(self.initialized) self.m_webPage.loadStarted.connect(self.loadStarted, Qt.QueuedConnection) self.m_webPage.loadFinished.connect(self.finish, Qt.QueuedConnection) diff --git a/src/webpage.cpp b/src/webpage.cpp index 734bddf9..b9cb8eb3 100644 --- a/src/webpage.cpp +++ b/src/webpage.cpp @@ -110,7 +110,7 @@ WebPage::WebPage(QObject *parent, const Config *config) m_mainFrame = m_webPage->mainFrame(); m_mainFrame->setHtml(BLANK_HTML); - connect(m_mainFrame, SIGNAL(javaScriptWindowObjectCleared()), SIGNAL(initialized()), Qt::QueuedConnection); + connect(m_mainFrame, SIGNAL(javaScriptWindowObjectCleared()), SIGNAL(initialized())); connect(m_webPage, SIGNAL(loadStarted()), SIGNAL(loadStarted()), Qt::QueuedConnection); connect(m_webPage, SIGNAL(loadFinished(bool)), SLOT(finish(bool)), Qt::QueuedConnection);