Compare the client rather than the handle as the handle may not be set yet.
Bug: 2256744
Change-Id: I45baf86d56192c8752cb34f33795d2fa015ebe26
diff --git a/WebCore/platform/network/android/ResourceHandleAndroid.cpp b/WebCore/platform/network/android/ResourceHandleAndroid.cpp
index c4332d0..1154b47 100644
--- a/WebCore/platform/network/android/ResourceHandleAndroid.cpp
+++ b/WebCore/platform/network/android/ResourceHandleAndroid.cpp
@@ -52,7 +52,8 @@
{
DocumentLoader* docLoader = frame->loader()->activeDocumentLoader();
MainResourceLoader* mainLoader = docLoader->mainResourceLoader();
- bool isMainResource = mainLoader && (mainLoader->handle() == this);
+ bool isMainResource =
+ static_cast<void*>(mainLoader) == static_cast<void*>(client());
PassRefPtr<ResourceLoaderAndroid> loader = ResourceLoaderAndroid::start(this, d->m_request, frame->loader()->client(), isMainResource, false);