Crash under WebCore::cachedDocumentWrapper()
authorcdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 5 Dec 2018 20:58:55 +0000 (20:58 +0000)
committercdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 5 Dec 2018 20:58:55 +0000 (20:58 +0000)
commit8ab672138c68ad540b7d5c229d3d2f5376d8c0d5
treefeb481453a24aac5b4f8dfb1b98beaeb94ad1bcf
parent02f7f7769304d632117e24e57acfbfeaefc26f90
Crash under WebCore::cachedDocumentWrapper()
https://bugs.webkit.org/show_bug.cgi?id=192421
<rdar://problem/37114163>

Reviewed by Alex Christensen.

Fix potential null defererence of the value returned by toJSDOMWindow(). For example,
if the window is frameless, it would return null.

* bindings/js/JSDocumentCustom.cpp:
(WebCore::cachedDocumentWrapper):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@238905 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/bindings/js/JSDocumentCustom.cpp