[Win] JavaScript crash in getHostCallReturnValue.
https://bugs.webkit.org/show_bug.cgi?id=124040

Patch by peavo@outlook.com <peavo@outlook.com> on 2013-11-08
Reviewed by Geoffrey Garen.

* jit/JITOperations.cpp: Update MSVC assembler code in getHostCallReturnValue according to gcc x86 version.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158922 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Mac] Crash at com.apple.WebCore: WebCore::MediaPlayerPrivateAVFoundationObjC::tracksDidChange + 26
https://bugs.webkit.org/show_bug.cgi?id=124031

Reviewed by Eric Carlson.

WTF::bind() causes errors when given a bare id pointer as a parameter,
when that parameter is casted to a specific NS type pointer (in this
case, a NSArray*) in order to pass it as a parameter to the bound
function.

Instead of passing around bare id pointers, wrap them in RetainPtr<>
objects before passing them to WTF::bind().

* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::seekableTimeRangesDidChange):
(WebCore::MediaPlayerPrivateAVFoundationObjC::loadedTimeRangesDidChange):
(WebCore::MediaPlayerPrivateAVFoundationObjC::tracksDidChange):
(-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158923 268f45cc-cd09-0410-ab3c-d52691b4dbfc
REGRESSION(r158883): Fix crashes for MIPS architecture.
https://bugs.webkit.org/show_bug.cgi?id=124044

Patch by Julien Brianceau <jbriance@cisco.com> on 2013-11-08
Reviewed by Michael Saboff.

* jit/JITOperations.cpp: Frame pointer register is fp instead of s0 since r158883 for MIPS.
* jit/ThunkGenerators.cpp: Save and restore the new frame pointer register.
(JSC::returnFromJavaScript):
(JSC::callToJavaScript):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158925 268f45cc-cd09-0410-ab3c-d52691b4dbfc
REGRESSION(r158883): Fix crashes for ARM architecture.
https://bugs.webkit.org/show_bug.cgi?id=124038

Patch by Julien Brianceau <jbriance@cisco.com> on 2013-11-08
Reviewed by Michael Saboff.

* jit/GPRInfo.h: Remove r11 from the temporary register set, use a free register for
nonPreservedNonReturnGPR and remove obsolete declaration of bucketCounterRegister.
(JSC::GPRInfo::toRegister):
(JSC::GPRInfo::toIndex):
* jit/JITOperations.cpp: Frame pointer register is r11 for ARM_TRADITIONAL and
r7 for ARM_THUMB2 instead of r5 since r158883.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158926 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Encode and decode NSURLRequests using NSCoder
https://bugs.webkit.org/show_bug.cgi?id=124051

Reviewed by Sam Weinig.

* Shared/mac/WebCoreArgumentCodersMac.mm:
(CoreIPC::archiveAndEncodeObject):
(CoreIPC::decodeAndUnarchiveObject):
(CoreIPC::::encodePlatformData):
(CoreIPC::::decodePlatformData):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158927 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[MSE] Bring SourceBuffer.append up to the most recent spec.
https://bugs.webkit.org/show_bug.cgi?id=123377

Reviewed by Eric Carlson.

Source/WebCore:

Test: media/media-source/media-source-append-failed.html

Bring the MediaSource append() implementation up to the current spec.

* Modules/mediasource/SourceBuffer.cpp:
(WebCore::SourceBuffer::appendBufferInternal):
(WebCore::SourceBuffer::appendBufferTimerFired):
* platform/graphics/SourceBufferPrivate.h:
* platform/mock/mediasource/MockSourceBufferPrivate.cpp:
(WebCore::MockSourceBufferPrivate::append):
(WebCore::MockSourceBufferPrivate::evictCodedFrames):
(WebCore::MockSourceBufferPrivate::isFull):
* platform/mock/mediasource/MockSourceBufferPrivate.h:

LayoutTests:

* media/media-source/media-source-append-failed-expected.txt: Added.
* media/media-source/media-source-append-failed.html: Added.
* media/media-source/mock-media-source.js:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158928 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Map.forEach crashes on deleted values
https://bugs.webkit.org/show_bug.cgi?id=124017

Reviewed by Ryosuke Niwa.

Source/JavaScriptCore:

MapData iterator did not consider the case of the first entries
being holes.  To fix this I've refactored iteration so that we
can perform an initialisation increment on construction, whle
retaining the useful assertion in MapData::const_iterator::operator++

* runtime/MapData.h:
(JSC::MapData::const_iterator::operator++):
(JSC::MapData::const_iterator::internalIncrement):
(JSC::MapData::const_iterator::const_iterator):

LayoutTests:

Test case

* js/map-iterate-first-entry-is-a-hole-expected.txt: Added.
* js/map-iterate-first-entry-is-a-hole.html: Added.
* js/script-tests/map-iterate-first-entry-is-a-hole.js: Added.
(set map0):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158929 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add WKRemoteObjectRegistry to WKConnection
https://bugs.webkit.org/show_bug.cgi?id=124054

Reviewed by Sam Weinig.

* UIProcess/API/mac/WKConnection.h:
* UIProcess/API/mac/WKConnection.mm:
(-[WKConnection delegate]):
(-[WKConnection setDelegate:]):
(-[WKConnection remoteObjectRegistry]):
(didReceiveMessage):

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