Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(320)

Unified Diff: Source/WebCore/bindings/v8/custom/V8DocumentCustom.cpp

Issue 10542126: Merge 119158 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1132/
Patch Set: Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/WebCore/bindings/v8/custom/V8DocumentCustom.cpp
===================================================================
--- Source/WebCore/bindings/v8/custom/V8DocumentCustom.cpp (revision 120101)
+++ Source/WebCore/bindings/v8/custom/V8DocumentCustom.cpp (working copy)
@@ -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"
@@ -142,9 +143,8 @@
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(), args.GetIsolate());
« no previous file with comments | « LayoutTests/fast/events/touch/script-tests/document-create-touch-list-crash.js ('k') | Source/WebCore/dom/Document.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698