The culprit was that CachedResource:stopLoading() was using *this
after a call to checkNotify(), which isn't kosher. This patch
uses a CachedResourceHandle to keep the CachedResource alive.

Source/WebCore:

The test is a very close copy of the eponymous
link-and-subresource-test.html, only substituting invalid
resources for the valid ones in that test. The reproduction is
timing related, and happens much more consistantly with an invalid
resource for whatever reason.
Test: fast/dom/HTMLLinkElement/link-and-subresource-test-nonexistent.html

The test is a very close copy of the eponymous
link-and-subresource-test.html, only substituting invalid
resources for the valid ones in that test. The reproduction is
timing related, and happens much more consistantly with an invalid
resource for whatever reason.