diff options
author | Ben Murdoch <benm@google.com> | 2012-05-30 16:07:49 +0100 |
---|---|---|
committer | Ben Murdoch <benm@google.com> | 2012-06-01 10:23:38 +0100 |
commit | 678de4acf72e6fd4c6fb9426d2c69445acc18135 (patch) | |
tree | 0b7232fd98dd338ec08ddc1825fecb399c7b75ea /Source/WebCore/bindings/v8 | |
parent | b5d3edac71ca2c54cbf9ce5bf42cc7727216ac09 (diff) | |
download | external_webkit-678de4acf72e6fd4c6fb9426d2c69445acc18135.zip external_webkit-678de4acf72e6fd4c6fb9426d2c69445acc18135.tar.gz external_webkit-678de4acf72e6fd4c6fb9426d2c69445acc18135.tar.bz2 |
Fix document.createTouchList crash.
Cherry pick of WebKit r119158.
Note the layout test is tweaked slighly from upstream to make it
happy in our older webkit snapshot.
See: http://trac.webkit.org/changeset/119158
Bug: 6578213
Change-Id: Id6cc23938b5139cf0416e3d4c6e7ba227b1b6a0c
Diffstat (limited to 'Source/WebCore/bindings/v8')
-rw-r--r-- | Source/WebCore/bindings/v8/custom/V8DocumentCustom.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Source/WebCore/bindings/v8/custom/V8DocumentCustom.cpp b/Source/WebCore/bindings/v8/custom/V8DocumentCustom.cpp index 7cad58e..d142a9f 100644 --- a/Source/WebCore/bindings/v8/custom/V8DocumentCustom.cpp +++ b/Source/WebCore/bindings/v8/custom/V8DocumentCustom.cpp @@ -43,6 +43,7 @@ #include "V8CanvasRenderingContext2D.h" #include "V8CustomXPathNSResolver.h" #include "V8DOMImplementation.h" +#include "V8DOMWrapper.h" #include "V8HTMLDocument.h" #include "V8IsolatedContext.h" #include "V8Node.h" @@ -144,9 +145,8 @@ v8::Handle<v8::Value> V8Document::createTouchListCallback(const v8::Arguments& a RefPtr<TouchList> touchList = TouchList::create(); for (int i = 0; i < args.Length(); i++) { - if (!args[i]->IsObject()) - return v8::Undefined(); - touchList->append(V8Touch::toNative(args[i]->ToObject())); + Touch* touch = V8DOMWrapper::isWrapperOfType(args[i], &V8Touch::info) ? V8Touch::toNative(args[i]->ToObject()) : 0; + touchList->append(touch); } return toV8(touchList.release()); |