Crash when "willSendRequest" causes the ResourceLoader to be cancelled.
<rdar://problem/13531679> and https://bugs.webkit.org/show_bug.cgi?id=113616

Reviewed by Alexey Proskuryakov.

These callbacks to the WebCore ResourceLoader can cause the WebResourceLoader to be destroyed.
A RefPtr<> protector fixes that.

Additionally we can invalidate the WebResourceLoader to avoid unnecessary callbacks to the NetworkProcess.

* WebProcess/Network/WebResourceLoadScheduler.cpp:
(WebKit::WebResourceLoadScheduler::remove): Call detachFromCoreLoader() on a removed WebResourceLoader.

* WebProcess/Network/WebResourceLoader.cpp:
(WebKit::WebResourceLoader::detachFromCoreLoader): Clear out the ResourceLoader pointer.
(WebKit::WebResourceLoader::willSendRequest): Protect this, and don't message back to the NetworkProcess if its not needed.
(WebKit::WebResourceLoader::canAuthenticateAgainstProtectionSpace): Ditto
(WebKit::WebResourceLoader::didReceiveResource): Paranoid hardening - Protect this before delivering the data to the WebCore
  ResourceLoader, and null check it before delivering the "didFinishLoader" call.
* WebProcess/Network/WebResourceLoader.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147257 268f45cc-cd09-0410-ab3c-d52691b4dbfc
        Expose FeatureObserver data to WebKit clients
        https://bugs.webkit.org/show_bug.cgi?id=113613

        Reviewed by Sam Weinig.

        FeatureObserver used to depend on chromium-only HistogramSupport, which is not
        really usable on Mac at least.

        Instead of adding parallel feature reporting machinery, I'm adding a way to
        generically relay the data from FeatureObserver to port code.

        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::loadWithDocumentLoader):
        (WebCore::FrameLoader::commitProvisionalLoad):
        (WebCore::FrameLoader::reportMemoryUsage):
        * loader/FrameLoader.h:
        (WebCore::FrameLoader::previousURL):
        Exposed m_previousURL, renaming it to follow WebKit style.

        * page/FeatureObserver.cpp:
        (WebCore::FeatureObserver::~FeatureObserver):
        (WebCore::FeatureObserver::updateMeasurements):
        * page/FeatureObserver.h:
        (WebCore::FeatureObserver::accumulatedFeatureBits):
        Exposed the data to clients, and made reporting through HistogramSupport
        chromium only for clarity.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147260 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore: Flexitems no longer default min-width to min-content
https://bugs.webkit.org/show_bug.cgi?id=111790

Reviewed by Tony Chang.

* css/CSSParser.cpp:
(WebCore::CSSParser::parseValue):
Disallow auto as a valid min-size value.

* css/html.css:
(input::-webkit-datetime-edit):
(input[type="range"]::-webkit-slider-container, input[type="range"]::-webkit-media-slider-container):
(input[type="range"]::-webkit-slider-runnable-track):
Remove now unnecessary min-width: 0's.

* css/mediaControlsChromium.css:
(audio::-webkit-media-controls-enclosure, video::-webkit-media-controls-enclosure):
(video::-webkit-media-controls-enclosure):
Set a flex-shrink: 0 to avoid shrinking these items below the designated height.

* rendering/RenderBox.cpp:
(WebCore::RenderBox::constrainLogicalHeightByMinMax):
(WebCore::RenderBox::constrainContentBoxLogicalHeightByMinMax):
(WebCore::RenderBox::computeLogicalWidthInRegionUsing):
(WebCore::RenderBox::computeLogicalHeight):
(WebCore::RenderBox::computeLogicalHeightUsing):
(WebCore::RenderBox::computeContentLogicalHeight):
(WebCore::RenderBox::computeContentAndScrollbarLogicalHeightUsing):
(WebCore::RenderBox::computeReplacedLogicalWidth):
(WebCore::RenderBox::computeReplacedLogicalWidthRespectingMinMaxWidth):
(WebCore::RenderBox::computeReplacedLogicalWidthUsing):
(WebCore::RenderBox::computeReplacedLogicalHeight):
(WebCore::RenderBox::computeReplacedLogicalHeightRespectingMinMaxHeight):
(WebCore::RenderBox::computeReplacedLogicalHeightUsing):
(WebCore::RenderBox::availableLogicalHeightUsing):
(WebCore::RenderBox::computePositionedLogicalWidth):
(WebCore::RenderBox::computePositionedLogicalWidthUsing):
(WebCore::RenderBox::computePositionedLogicalHeight):
(WebCore::RenderBox::computePositionedLogicalHeightUsing):
Remove all the unneeded SizeType arguments now that we don't need to
specially handle MinSize in all these functions.

* rendering/RenderBox.h:
* rendering/RenderButton.cpp:
(WebCore::RenderButton::styleWillChange):
(WebCore::RenderButton::setupInnerStyle):
No longer need to explicitly set min-width:0.

* rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::computeMainAxisExtentForChild):
(WebCore::RenderFlexibleBox::computeMainAxisPreferredSizes):
(WebCore::RenderFlexibleBox::adjustChildSizeForMinAndMax):
Remove the code for specially handling auto.

* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::computeUsedBreadthOfSpecifiedLength):
* rendering/RenderRegion.cpp:
(WebCore::RenderRegion::maxPageLogicalHeight):
* rendering/RenderReplaced.cpp:
(WebCore::RenderReplaced::computeReplacedLogicalWidth):
(WebCore::RenderReplaced::computeReplacedLogicalHeight):
Remove all the now unneeded SizeType arguments.

* rendering/style/RenderStyle.h:
Change the default min-size back to 0.

Source/WebKit2: Crash when "willSendRequest" causes the ResourceLoader to be cancelled.
<rdar://problem/13531679> and https://bugs.webkit.org/show_bug.cgi?id=113616

Patch by Brady Eidson <beidson@apple.com> on 2013-03-29
Reviewed by Alexey Proskuryakov.

These callbacks to the WebCore ResourceLoader can cause the WebResourceLoader to be destroyed.
A RefPtr<> protector fixes that.

Additionally we can invalidate the WebResourceLoader to avoid unnecessary callbacks to the NetworkProcess.

* WebProcess/Network/WebResourceLoadScheduler.cpp:
(WebKit::WebResourceLoadScheduler::remove): Call detachFromCoreLoader() on a removed WebResourceLoader.

* WebProcess/Network/WebResourceLoader.cpp:
(WebKit::WebResourceLoader::detachFromCoreLoader): Clear out the ResourceLoader pointer.
(WebKit::WebResourceLoader::willSendRequest): Protect this, and don't message back to the NetworkProcess if its not needed.
(WebKit::WebResourceLoader::canAuthenticateAgainstProtectionSpace): Ditto
(WebKit::WebResourceLoader::didReceiveResource): Paranoid hardening - Protect this before delivering the data to the WebCore
  ResourceLoader, and null check it before delivering the "didFinishLoader" call.
* WebProcess/Network/WebResourceLoader.h:

LayoutTests: Flexitems no longer default min-width to min-content
https://bugs.webkit.org/show_bug.cgi?id=111790

Reviewed by Tony Chang.

* css3/flexbox/content-height-with-scrollbars.html:
* css3/flexbox/cross-axis-scrollbar.html:
Set flex:none to avoid flex-shrinking.

* css3/flexbox/flex-item-min-size-expected.txt: Removed.
* css3/flexbox/flex-item-min-size.html: Removed.
These tests are now redundant with tests in fast/css-intrinsic-dimensions.

* css3/flexbox/flexbox-baseline.html:
Set flex:none to avoid flex-shrinking.

* css3/flexbox/line-wrapping.html:
Auto-size the flex items so that the column flexboxes have an auto-height.

* css3/flexbox/preferred-widths.html:
Set flex:none to avoid flex-shrinking.

* fast/css/auto-min-size-expected.txt:
* fast/css/auto-min-size.html:
Update to no longer allow parsing auto as a valid value for min-width/min-height.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147261 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Let cached resources from file: schemes expire immediately
https://bugs.webkit.org/show_bug.cgi?id=113626

Reviewed by Brady Eidson

When a CachedResource was loaded from a file: URL, we would give it an
indefinite freshness lifetime. This means that we would continue to
serve a stale resource from the memory cache even if the file was
changed on disk. With the introduction of main resource caching, this
behavior broke at least one third-party WebKit app (see <rdar://problem/13313769>).

We should instead let file resources expire immediately. Modern
filesystems implement their own caching, so we should get good
performance for multiple reads of unmodified files without doing our
own caching.

* loader/cache/CachedResource.cpp:
(WebCore::CachedResource::freshnessLifetime): file: URLs should have a
0 freshness lifetime.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147263 268f45cc-cd09-0410-ab3c-d52691b4dbfc
When releasing a CGImage, we should also remove it from the subimage cache.
https://bugs.webkit.org/show_bug.cgi?id=102453

Patch by Yongjun Zhang <yongjun_zhang@apple.com> on 2013-03-29
Reviewed by Simon Fraser.

When we release an image(CGImageRef) from BitmapImage's cachedFrames, if the image was already
cached in subimage cache, it's ref count won't drop to 0 and the image won't be deleted.  Usually,
the subimage cache will clear the whole cache in a timer with 1 sec delay.  However, if WebCore has
to paint another subimage (not necessarily from the same CGImageRef) before this timer fires, we
will restart the timer and images inside the cache will stay longer than they should.

This patch does two things:
    - move SubimageCacheWithTimer and related helper struct into a separate file.
    - remove the image from subimage cache when we releasing the CGImageRef, this prevent subimage
cache holding the image after we released it.

No new tests, manually verified the CGImageRef is also removed from subimage cache
when we releasing the image from FrameData::clear.

* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* platform/graphics/cg/BitmapImageCG.cpp:
(WebCore::FrameData::clear): remove the image from subimage cache before we releasing it.
* platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore):
(WebCore::GraphicsContext::drawNativeImage):
* platform/graphics/cg/SubimageCacheWithTimer.cpp: Added.
(WebCore):
(SubimageRequest):
(WebCore::SubimageRequest::SubimageRequest):
(WebCore::SubimageCacheAdder::hash):
(SubimageCacheAdder):
(WebCore::SubimageCacheAdder::equal):
(WebCore::SubimageCacheAdder::translate):
(WebCore::SubimageCacheWithTimer::SubimageCacheWithTimer):
(WebCore::SubimageCacheWithTimer::invalidateCacheTimerFired):
(WebCore::SubimageCacheWithTimer::getSubimage):
(WebCore::SubimageCacheWithTimer::clearImage):
(WebCore::subimageCache):
* platform/graphics/cg/SubimageCacheWithTimer.h: Added.
(WebCore):
(SubimageCacheWithTimer): Added a data member m_images to record which image and its subimages are cached.
(SubimageCacheEntry):
(SubimageCacheEntryTraits):
(WebCore::SubimageCacheWithTimer::SubimageCacheEntryTraits::isEmptyValue):
(WebCore::SubimageCacheWithTimer::SubimageCacheEntryTraits::constructDeletedValue):
(WebCore::SubimageCacheWithTimer::SubimageCacheEntryTraits::isDeletedValue):
(WebCore::SubimageCacheWithTimer::SubimageCacheHash::hash):
(WebCore::SubimageCacheWithTimer::SubimageCacheHash::equal):
(SubimageCacheHash):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147265 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed. AppleWin VS2010 build fix.

* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147266 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r147263.
http://trac.webkit.org/changeset/147263
https://bugs.webkit.org/show_bug.cgi?id=113632

Breaks test fast/loader/display-image-unset-allows-cached-
image-load.html (Requested by mlam on #webkit).

Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2013-03-29

* loader/cache/CachedResource.cpp:
(WebCore::CachedResource::freshnessLifetime):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147267 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL] Unreviewed build fix after r147251
https://bugs.webkit.org/show_bug.cgi?id=113631

Unreviewed build fix.

Add NETWORK_PROCESS guard.

Patch by Seokju Kwon <seokju.kwon@gmail.com> on 2013-03-29

* UIProcess/WebResourceCacheManagerProxy.cpp:
(WebKit::WebResourceCacheManagerProxy::clearCacheForAllOrigins):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147268 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL] Remove resource-har-conversion.html from TestExpectation
https://bugs.webkit.org/show_bug.cgi?id=113586

Unreviewed, EFL gardening.

Patch by Seokju Kwon <seokju.kwon@gmail.com> on 2013-03-30

* platform/efl/TestExpectations: Rebaseline after r147219.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147274 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: Fonts refactoring
https://bugs.webkit.org/show_bug.cgi?id=113047

Patch by Alexei Filippov <alph@chromium.org> on 2013-03-30
Reviewed by Pavel Feldman.

Unify fonts usage across inspector.
Make inspector default font depend on platform.

Source/WebCore:

* inspector/front-end/breakpointsList.css:
* inspector/front-end/dataGrid.css:
(.data-grid):
(.data-grid table):
(.data-grid td):
(.data-grid th.sort-ascending > div::after):
(.data-grid th.sort-descending > div::after):
(.data-grid button):
* inspector/front-end/heapProfiler.css:
(.heap-snapshot-view .class-view-toolbar input.class-name-filter):
(.heap-snapshot-view .retainers-view-header):
* inspector/front-end/inspector.css:
(.toolbar-item):
(.toolbar-label):
(.console-message .bubble):
(.outline-disclosure > ol):
(.source-code):
(.scope-bar li):
(.sidebar-tree, .sidebar-tree .children):
(.sidebar-tree-section):
(li .status .bubble):
(.sidebar-tree-item.selected):
(.sidebar-tree-item .titles):
(.sidebar-tree-item .subtitle):
(.sidebar-tree-item.selected .subtitle):
(.source-frame-breakpoint-message):
(.soft-context-menu):
* inspector/front-end/inspectorCommon.css:
(body):
(.resources-divider-label):
* inspector/front-end/navigatorView.css:
(.navigator li):
(.navigator li.selected .selection):
(.navigator .base-navigator-tree-element-title):
* inspector/front-end/networkLogView.css:
(.network-log-grid.data-grid td):
(.network-log-grid.data-grid.small td):
(.network-log-grid.data-grid th):
(.network-log-grid.data-grid select):
(.network-graph-label):
(.network-timeline-grid .resources-divider-label):
(.network-log-grid.data-grid .network-summary-bar td):
* inspector/front-end/resourcesPanel.css:
(.resources.panel .sidebar li):
(.resources.panel .sidebar li.selected):
(.resources.panel .sidebar li.selected .selection):
* inspector/front-end/sidebarPane.css:
(.sidebar-pane > .body .info):
(.sidebar-pane-title):
(.sidebar-pane-toolbar):
(.sidebar-pane-subtitle):
* inspector/front-end/tabbedPane.css:
(.tabbed-pane-header-tab):
(.tabbed-pane-header-tab-close-button):
(select.tabbed-pane-header-tabs-drop-down-select):
* inspector/front-end/timelinePanel.css:
(.memory-counter-value):

Source/WebKit/chromium:

* src/js/devTools.css:
(body.platform-linux):
(body.platform-mac):
(body.platform-windows):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147275 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Layout Test inspector/console/console-css-warnings.html is failing on debug.
https://bugs.webkit.org/show_bug.cgi?id=113483

Patch by Sergey Ryazanov <serya@chromium.org> on 2013-03-30
Reviewed by Pavel Feldman.
Desable the test (duplicate a rule from TestExpectations to override "webkit.org/b/90488 [ Debug ] inspector [ Slow ]").

* inspector/console/console-css-warnings-expected.txt:
* platform/chromium/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147276 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed buildfix after r147260.

* WebProcess/qt/QtBuiltinBundlePage.cpp:
(WebKit::QtBuiltinBundlePage::QtBuiltinBundlePage):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147277 268f45cc-cd09-0410-ab3c-d52691b4dbfc
g_slist_reverse() may not be required in webKitWebAudioSrcLoop
https://bugs.webkit.org/show_bug.cgi?id=113568

Patch by Praveen R Jadhav <praveen.j@samsung.com> on 2013-03-30
Reviewed by Philippe Normand.

Decremental 'for' loop logic implemented to avoid using g_slist_reverse().

Original code            - 2.025230 micro seconds per loop
Original code + patch    - 1.964759 micro seconds per loop

This patch is covered by existing webaudio tests.

* platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp:
(webKitWebAudioSrcLoop):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147278 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] Should use GStreamer codec installation infrastructure
https://bugs.webkit.org/show_bug.cgi?id=34085

Reviewed by Martin Robinson.

Initial support for the GStreamer codec installer. The player will
handle missing-plugins messages and use the pbutils codec
installer facilities to install the missing GStreamer
plugins. Once the plugins are installed reset the pipeline state.

* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::mediaPlayerPrivatePluginInstallerResultFunction): This
method is used to notify the player that the missing plugins were installed.
(WebCore):
(WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer):
(WebCore::MediaPlayerPrivateGStreamer::handleMessage): Ignore
errors while installing plugins and handle the missing-plugin message.
(WebCore::MediaPlayerPrivateGStreamer::handlePluginInstallerResult):
This method is invoked after the installer finished its task.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
(MediaPlayerPrivateGStreamer):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147279 268f45cc-cd09-0410-ab3c-d52691b4dbfc
View-source iframes are dangerous (and not very useful).
https://bugs.webkit.org/show_bug.cgi?id=113345

Reviewed by Adam Barth.

Source/WebCore:

* html/HTMLFrameElementBase.cpp:
(WebCore::HTMLFrameElementBase::parseAttribute):
Conditionalize viewsource attribute on ENABLE(VIEWSOURCE_ATTRIBUTE).

Source/WebKit/chromium:

* features.gypi:
Disable VIEWSOURCE_ATTRIBUTE for chromium.

Source/WTF:

* wtf/FeatureDefines.h:
Default definition of ENABLE_VIEWSOURCE_ATTRIBUTE is enabled.

LayoutTests:

* platform/chromium/TestExpectations:
Update expectations now that chromium excludes iframe's viewsource attribute.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147280 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Cross-Origin copy&paste / drag&drop allowing XSS via srcdoc attribute.
https://bugs.webkit.org/show_bug.cgi?id=113443

Reviewed by Adam Barth.

Source/WebCore:

Tested by LayoutTests/editing/pasteboard/paste-noscript.html

* dom/Element.h:
(Element):
(WebCore::Element::isHTMLContentAttribute):
Adds an isHTMLContentAttribute() method to determine whether an attribute can contain
(potentially unsafe) HTML content. Currently, the iframe's srcdoc attribute is the only
such attribute, but clever folks might add more in the future.
Rename stripJavaScriptAttributes() method to stripScriptingAttributes(), to better reflect
the reality that scripting content may appear as above.
Adds missing consts and consolidate isJavaScriptAttribute() method.

* dom/Element.cpp:
(WebCore::Element::isJavaScriptURLAttribute):
(WebCore::Element::stripScriptingAttributes):
Consolidated methods.

* html/HTMLFrameElementBase.cpp:
(WebCore::HTMLFrameElementBase::isHTMLContentAttribute):
(WebCore):
* html/HTMLFrameElementBase.h:
(HTMLFrameElementBase):
Indicate that for frames, the srcdoc attribute contains HTML content.

* html/parser/HTMLConstructionSite.cpp:
(WebCore::setAttributes):
* xml/parser/XMLDocumentParserLibxml2.cpp:
(WebCore::setAttributes):
* xml/parser/XMLDocumentParserQt.cpp:
(WebCore::setAttributes):
Rename stripJavaScriptAttribute calls to match Element.h

LayoutTests:

* editing/pasteboard/paste-noscript-expected.txt:
* editing/pasteboard/paste-noscript.html:
Adds a test that an iframe's srcdoc attribute is not pasted.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147281 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Move Region into its own header
https://bugs.webkit.org/show_bug.cgi?id=113617

Reviewed by Geoffrey Garen.

BlockAllocator.h is getting a little crowded. We should move the Region class into its own
header, since it's pretty independent from the BlockAllocator.

* GNUmakefile.list.am:
* JavaScriptCore.gypi:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
* JavaScriptCore.xcodeproj/project.pbxproj:
* heap/BlockAllocator.h:
(JSC):
* heap/Region.h: Added.
(JSC):
(DeadBlock):
(JSC::DeadBlock::DeadBlock):
(Region):
(JSC::Region::blockSize):
(JSC::Region::isFull):
(JSC::Region::isEmpty):
(JSC::Region::isCustomSize):
(JSC::Region::create):
(JSC::Region::createCustomSize):
(JSC::Region::Region):
(JSC::Region::~Region):
(JSC::Region::reset):
(JSC::Region::allocate):
(JSC::Region::deallocate):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147282 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove unused include of RegularExpression.h
https://bugs.webkit.org/show_bug.cgi?id=113649

Reviewed by Dimitri Glazkov.

* Modules/filesystem/DOMFilePath.cpp:
    - This include isn't used.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147284 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Chromium] Remove unused includes of stdio.h
https://bugs.webkit.org/show_bug.cgi?id=113650

Reviewed by Dimitri Glazkov.

We shouldn't include stdio.h. These includes aren't used anyway.

* src/WebInputEvent.cpp:
* src/x11/WebScreenInfoFactory.cpp:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147285 268f45cc-cd09-0410-ab3c-d52691b4dbfc
NetworkProcess crashes in WebCoreResourceHandleAsOperationQueueDelegate callbacks.
<rdar://problem/13541868> and https://bugs.webkit.org/show_bug.cgi?id=113664

Reviewed by Dan Bernstein.

In the "two-part" callbacks that involve waiting on a semaphore for the async block to finish,
the delegate might have been destroyed by the time the wait completes.

A RetainPtr<> protector will fix that up nicely.

* platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm:
(-[WebCoreResourceHandleAsOperationQueueDelegate connection:willSendRequest:redirectResponse:]):
(-[WebCoreResourceHandleAsOperationQueueDelegate connectionShouldUseCredentialStorage:]):
(-[WebCoreResourceHandleAsOperationQueueDelegate connection:canAuthenticateAgainstProtectionSpace:]):
(-[WebCoreResourceHandleAsOperationQueueDelegate connection:willCacheResponse:]):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147287 268f45cc-cd09-0410-ab3c-d52691b4dbfc