summaryrefslogtreecommitdiffstats
path: root/WebCore/loader/HistoryController.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/loader/HistoryController.cpp')
-rw-r--r--WebCore/loader/HistoryController.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/WebCore/loader/HistoryController.cpp b/WebCore/loader/HistoryController.cpp
index e3d3b6b..c4e9e5a 100644
--- a/WebCore/loader/HistoryController.cpp
+++ b/WebCore/loader/HistoryController.cpp
@@ -644,6 +644,9 @@ void HistoryController::updateBackForwardListClippedAtTarget(bool doClip)
void HistoryController::pushState(PassRefPtr<SerializedScriptValue> stateObject, const String& title, const String& urlString)
{
+ if (!m_currentItem)
+ return;
+
Page* page = m_frame->page();
ASSERT(page);
@@ -665,12 +668,8 @@ void HistoryController::pushState(PassRefPtr<SerializedScriptValue> stateObject,
void HistoryController::replaceState(PassRefPtr<SerializedScriptValue> stateObject, const String& title, const String& urlString)
{
- // FIXME: We should always have m_currentItem here!!
- // https://bugs.webkit.org/show_bug.cgi?id=36464
- if (!m_currentItem) {
- ASSERT_NOT_REACHED();
+ if (!m_currentItem)
return;
- }
if (!urlString.isEmpty())
m_currentItem->setURLString(urlString);