Make all v8 weak callbacks type safe
https://bugs.webkit.org/show_bug.cgi?id=111802

Reviewed by Adam Barth.

Make all v8 handle weak callbacks typesafe by adding a new class WeakHandleListner
that uses templates to generate the callback proxies that have the correct type
arguments. Now getting the arguments wrong will fail compilation.

No new tests, no change in behavior.

* bindings/v8/DOMDataStore.h:
(WebCore::::callback):
* bindings/v8/DOMWrapperMap.h:
(WebCore::DOMWrapperMap::DOMWrapperMap):
(WebCore::DOMWrapperMap::set):
(WebCore::DOMWrapperMap::reportMemoryUsage):
(DOMWrapperMap):
* bindings/v8/DOMWrapperWorld.cpp:
(WebCore::::callback):
(WebCore::DOMWrapperWorld::makeContextWeak):
* bindings/v8/ScriptState.cpp:
(WebCore::::callback):
(WebCore::ScriptState::ScriptState):
* bindings/v8/ScriptState.h:
(ScriptState):
* bindings/v8/ScriptWrappable.h:
(ScriptWrappable):
(WebCore::ScriptWrappable::setWrapper):
(WebCore::::callback):
* bindings/v8/V8AbstractEventListener.cpp:
(WebCore::::callback):
(WebCore::V8AbstractEventListener::setListenerObject):
* bindings/v8/V8AbstractEventListener.h:
(V8AbstractEventListener):
* bindings/v8/V8MutationCallback.cpp:
(WebCore::::callback):
(WebCore::V8MutationCallback::V8MutationCallback):
* bindings/v8/V8MutationCallback.h:
(V8MutationCallback):
* bindings/v8/V8NPObject.cpp:
(V8NPTemplateMap):
(WebCore::V8NPTemplateMap::set):
(WebCore::::callback):
(WebCore::staticNPObjectMap):
* bindings/v8/V8Utilities.h:
(WeakHandleListener):
(WebCore::WeakHandleListener::makeWeak):
(WebCore::WeakHandleListener::WeakHandleListener):
(WebCore::WeakHandleListener::invokeWeakCallback):
* bindings/v8/V8ValueCache.cpp:
(WebCore::::callback):
(WebCore::StringCache::v8ExternalStringSlow):
* bindings/v8/custom/V8InjectedScriptManager.cpp:
(WebCore::::callback):
(WebCore::createInjectedScriptHostV8Wrapper):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147391 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Simply GIFImageReader error handling
https://bugs.webkit.org/show_bug.cgi?id=113718

Reviewed by Adam Barth.

When GIFImageReader encounters a parsing error it should just return
without doing any more work. Current code saves a boolean before return,
this is not necessary.

Tested with existing unit tests.
Tested locally with ASAN build with 60k GIF images.

* platform/image-decoders/gif/GIFImageDecoder.cpp:
(WebCore::GIFImageDecoder::repetitionCount):
* platform/image-decoders/gif/GIFImageReader.cpp:
(GIFImageReader::decode):
* platform/image-decoders/gif/GIFImageReader.h:
(GIFImageReader::GIFImageReader):
(GIFImageReader):


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