Skip to content

Commit

Permalink
Revert "Fix crash on exit (Issues ariya#136, ariya#148 and ariya#149)"
Browse files Browse the repository at this point in the history
This reverts commit 5acaa6b.

Conflicts:

	src/phantom.cpp
	src/phantom.h

removed m_page deletion.

http://code.google.com/p/phantomjs/issues/detail?id=719
  • Loading branch information
Shawn Krisman authored and n1k0 committed Sep 24, 2012
1 parent 433d589 commit ae40ff8
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 10 deletions.
8 changes: 0 additions & 8 deletions src/phantom.cpp
Expand Up @@ -93,7 +93,6 @@ void Phantom::init()
CookieJar::instance(m_config.cookiesFile());

m_page = new WebPage(this, QUrl::fromLocalFile(m_config.scriptFile()));
m_pages.append(m_page);

QString proxyType = m_config.proxyType();
if (proxyType != "none") {
Expand Down Expand Up @@ -265,10 +264,6 @@ void Phantom::setCookiesEnabled(const bool value)
QObject *Phantom::createWebPage()
{
WebPage *page = new WebPage(this);

// Store pointer to the page for later cleanup
m_pages.append(page);
// Apply default settings to the page
page->applySettings(m_defaultPageSettings);

// Show web-inspector if in debug mode
Expand Down Expand Up @@ -407,9 +402,6 @@ void Phantom::doExit(int code)
emit aboutToExit(code);
m_terminated = true;
m_returnValue = code;
qDeleteAll(m_pages);
m_pages.clear();
m_page = 0;
QApplication::instance()->exit(code);
}

Expand Down
1 change: 0 additions & 1 deletion src/phantom.h
Expand Up @@ -182,7 +182,6 @@ private slots:
QVariantMap m_defaultPageSettings;
FileSystem *m_filesystem;
System *m_system;
QList<QPointer<WebPage> > m_pages;
QList<QPointer<WebServer> > m_servers;
Config m_config;

Expand Down
1 change: 0 additions & 1 deletion src/webpage.cpp
Expand Up @@ -189,7 +189,6 @@ public slots:
newPage = new WebPage(m_webPage);
} else {
newPage = new WebPage(Phantom::instance());
Phantom::instance()->m_pages.append(newPage);
}

// Apply default settings
Expand Down

0 comments on commit ae40ff8

Please sign in to comment.