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

Side by Side 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2007-2009 Google Inc. All rights reserved. 2 * Copyright (C) 2007-2009 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 25 matching lines...) Expand all
36 #include "ExceptionCode.h" 36 #include "ExceptionCode.h"
37 #include "Node.h" 37 #include "Node.h"
38 #include "TouchList.h" 38 #include "TouchList.h"
39 #include "XPathNSResolver.h" 39 #include "XPathNSResolver.h"
40 #include "XPathResult.h" 40 #include "XPathResult.h"
41 41
42 #include "V8Binding.h" 42 #include "V8Binding.h"
43 #include "V8CanvasRenderingContext2D.h" 43 #include "V8CanvasRenderingContext2D.h"
44 #include "V8CustomXPathNSResolver.h" 44 #include "V8CustomXPathNSResolver.h"
45 #include "V8DOMImplementation.h" 45 #include "V8DOMImplementation.h"
46 #include "V8DOMWrapper.h"
46 #include "V8HTMLDocument.h" 47 #include "V8HTMLDocument.h"
47 #include "V8IsolatedContext.h" 48 #include "V8IsolatedContext.h"
48 #include "V8Node.h" 49 #include "V8Node.h"
49 #include "V8Proxy.h" 50 #include "V8Proxy.h"
50 #include "V8Touch.h" 51 #include "V8Touch.h"
51 #include "V8TouchList.h" 52 #include "V8TouchList.h"
52 #if ENABLE(WEBGL) 53 #if ENABLE(WEBGL)
53 #include "V8WebGLRenderingContext.h" 54 #include "V8WebGLRenderingContext.h"
54 #endif 55 #endif
55 #include "V8XPathNSResolver.h" 56 #include "V8XPathNSResolver.h"
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 } 136 }
136 return wrapper; 137 return wrapper;
137 } 138 }
138 139
139 #if ENABLE(TOUCH_EVENTS) 140 #if ENABLE(TOUCH_EVENTS)
140 v8::Handle<v8::Value> V8Document::createTouchListCallback(const v8::Arguments& a rgs) 141 v8::Handle<v8::Value> V8Document::createTouchListCallback(const v8::Arguments& a rgs)
141 { 142 {
142 RefPtr<TouchList> touchList = TouchList::create(); 143 RefPtr<TouchList> touchList = TouchList::create();
143 144
144 for (int i = 0; i < args.Length(); i++) { 145 for (int i = 0; i < args.Length(); i++) {
145 if (!args[i]->IsObject()) 146 Touch* touch = V8DOMWrapper::isWrapperOfType(args[i], &V8Touch::info) ? V8Touch::toNative(args[i]->ToObject()) : 0;
146 return v8::Undefined(); 147 touchList->append(touch);
147 touchList->append(V8Touch::toNative(args[i]->ToObject()));
148 } 148 }
149 149
150 return toV8(touchList.release(), args.GetIsolate()); 150 return toV8(touchList.release(), args.GetIsolate());
151 } 151 }
152 #endif 152 #endif
153 153
154 } // namespace WebCore 154 } // namespace WebCore
OLDNEW
« 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