Commit 3258f8e4 authored by Dave Tapuska's avatar Dave Tapuska Committed by Commit Bot

Fix history crash with null DocumentLoader

Its possible that the frame doesn't have a document loader anymore.
Check document loader like other paths do in the History object.

BUG=1000206

Change-Id: Idc1eda15c194e26ff818855fc1ac5e595ae693a6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1791421Reviewed-by: default avatarKentaro Hara <haraken@chromium.org>
Commit-Queue: Dave Tapuska <dtapuska@chromium.org>
Cr-Commit-Position: refs/heads/master@{#695151}
parent 7bb9fdbc
...@@ -89,7 +89,7 @@ SerializedScriptValue* History::state(ExceptionState& exception_state) { ...@@ -89,7 +89,7 @@ SerializedScriptValue* History::state(ExceptionState& exception_state) {
} }
SerializedScriptValue* History::StateInternal() const { SerializedScriptValue* History::StateInternal() const {
if (!GetFrame()) if (!GetFrame() || !GetFrame()->Loader().GetDocumentLoader())
return nullptr; return nullptr;
if (HistoryItem* history_item = if (HistoryItem* history_item =
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment