Changeset 101301 in webkit
- Timestamp:
- Nov 28, 2011, 4:21:09 PM (15 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 11 edited
-
ChangeLog (modified) (1 diff)
-
bindings/scripts/CodeGeneratorV8.pm (modified) (1 diff)
-
bindings/scripts/test/CPP/WebDOMFloat64Array.cpp (modified) (2 diffs)
-
bindings/scripts/test/CPP/WebDOMFloat64Array.h (modified) (2 diffs)
-
bindings/scripts/test/GObject/WebKitDOMFloat64Array.cpp (modified) (3 diffs)
-
bindings/scripts/test/GObject/WebKitDOMFloat64Array.h (modified) (1 diff)
-
bindings/scripts/test/JS/JSFloat64Array.cpp (modified) (2 diffs)
-
bindings/scripts/test/ObjC/DOMFloat64Array.h (modified) (1 diff)
-
bindings/scripts/test/ObjC/DOMFloat64Array.mm (modified) (3 diffs)
-
bindings/scripts/test/TestTypedArray.idl (modified) (1 diff)
-
bindings/scripts/test/V8/V8Float64Array.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r101300 r101301 1 2011-11-28 Oliver Hunt <oliver@apple.com> 2 3 Fix V8 bindings codegen and add yet more tests for the typed 4 array bindings. 5 6 * bindings/scripts/CodeGeneratorV8.pm: 7 (AddIncludesForType): 8 * bindings/scripts/test/CPP/WebDOMFloat64Array.cpp: 9 (WebDOMFloat64Array::foo): 10 * bindings/scripts/test/CPP/WebDOMFloat64Array.h: 11 * bindings/scripts/test/GObject/WebKitDOMFloat64Array.cpp: 12 (webkit_dom_float64array_foo): 13 * bindings/scripts/test/GObject/WebKitDOMFloat64Array.h: 14 * bindings/scripts/test/JS/JSFloat64Array.cpp: 15 (WebCore::jsFloat64ArrayPrototypeFunctionFoo): 16 * bindings/scripts/test/ObjC/DOMFloat64Array.h: 17 * bindings/scripts/test/ObjC/DOMFloat64Array.mm: 18 (-[DOMFloat64Array foo:]): 19 * bindings/scripts/test/TestTypedArray.idl: 20 * bindings/scripts/test/V8/V8Float64Array.cpp: 21 (WebCore::Float64ArrayInternal::fooCallback): 22 1 23 2011-11-28 Dana Jansens <danakj@chromium.org> 2 24 -
trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm
r101295 r101301 157 157 if (IsTypedArrayType($type)) { 158 158 AddToImplIncludes("wtf/${type}.h"); 159 return;160 159 } 161 160 if (!$codeGenerator->IsPrimitiveType($type) and !$codeGenerator->IsStringType($type) and !$codeGenerator->AvoidInclusionOfType($type) and $type ne "Date") { -
trunk/Source/WebCore/bindings/scripts/test/CPP/WebDOMFloat64Array.cpp
r101295 r101301 24 24 #include "Float32Array.h" 25 25 #include "Float64Array.h" 26 #include "Int32Array.h" 26 27 #include "WebDOMFloat32Array.h" 28 #include "WebDOMInt32Array.h" 27 29 #include "WebExceptionHandler.h" 28 30 #include <wtf/GetPtr.h> … … 44 46 } 45 47 46 voidWebDOMFloat64Array::foo(const WebDOMFloat32Array& array)48 WebDOMInt32Array WebDOMFloat64Array::foo(const WebDOMFloat32Array& array) 47 49 { 48 50 if (!impl()) 49 return ;51 return WebDOMInt32Array(); 50 52 51 impl()->foo(toWebCore(array));53 return toWebKit(WTF::getPtr(impl()->foo(toWebCore(array)))); 52 54 } 53 55 -
trunk/Source/WebCore/bindings/scripts/test/CPP/WebDOMFloat64Array.h
r101295 r101301 32 32 33 33 class WebDOMFloat32Array; 34 class WebDOMInt32Array; 34 35 35 36 class WebDOMFloat64Array : public WebDOMArrayBufferView { … … 39 40 virtual ~WebDOMFloat64Array() { } 40 41 41 voidfoo(const WebDOMFloat32Array& array);42 WebDOMInt32Array foo(const WebDOMFloat32Array& array); 42 43 43 44 WTF::Float64Array* impl() const; -
trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMFloat64Array.cpp
r101295 r101301 27 27 #include "ExceptionCode.h" 28 28 #include "Float64Array.h" 29 #include "Int32Array.h" 29 30 #include "JSMainThreadExecState.h" 30 31 #include "WebKitDOMBinding.h" … … 34 35 #include "webkit/WebKitDOMFloat64Array.h" 35 36 #include "webkit/WebKitDOMFloat64ArrayPrivate.h" 37 #include "webkit/WebKitDOMInt32Array.h" 38 #include "webkit/WebKitDOMInt32ArrayPrivate.h" 36 39 #include "webkitdefines.h" 37 40 #include "webkitglobalsprivate.h" … … 52 55 } // namespace WebKit // 53 56 54 void 57 WebKitDOMInt32Array* 55 58 webkit_dom_float64array_foo(WebKitDOMFloat64Array* self, WebKitDOMFloat32Array* array) 56 59 { 57 g_return_ if_fail(self);60 g_return_val_if_fail(self, 0); 58 61 WebCore::JSMainThreadNullState state; 59 62 WebCore::Float64Array * item = WebKit::core(self); 60 g_return_ if_fail(array);63 g_return_val_if_fail(array, 0); 61 64 WebCore::Float32Array * converted_array = NULL; 62 65 if (array != NULL) { 63 66 converted_array = WebKit::core(array); 64 g_return_ if_fail(converted_array);67 g_return_val_if_fail(converted_array, 0); 65 68 } 66 item->foo(converted_array); 69 PassRefPtr<WebCore::Int32Array> g_res = WTF::getPtr(item->foo(converted_array)); 70 WebKitDOMInt32Array* res = WebKit::kit(g_res.get()); 71 return res; 67 72 } 68 73 -
trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMFloat64Array.h
r101295 r101301 52 52 * @array: A #WebKitDOMFloat32Array 53 53 * 54 * Returns: 54 * Returns: (transfer none): 55 55 * 56 56 **/ 57 WEBKIT_API void57 WEBKIT_API WebKitDOMInt32Array* 58 58 webkit_dom_float64array_foo(WebKitDOMFloat64Array* self, WebKitDOMFloat32Array* array); 59 59 -
trunk/Source/WebCore/bindings/scripts/test/JS/JSFloat64Array.cpp
r101295 r101301 25 25 #include "JSDOMBinding.h" 26 26 #include "JSFloat32Array.h" 27 #include "JSInt32Array.h" 27 28 #include <runtime/Error.h> 28 29 #include <runtime/PropertyNameArray.h> 29 30 #include <wtf/Float64Array.h> 30 31 #include <wtf/GetPtr.h> 32 #include <wtf/Int32Array.h> 31 33 32 34 using namespace JSC; … … 263 265 if (exec->hadException()) 264 266 return JSValue::encode(jsUndefined()); 265 imp->foo(array); 266 return JSValue::encode(jsUndefined()); 267 268 JSC::JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->foo(array))); 269 return JSValue::encode(result); 267 270 } 268 271 -
trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMFloat64Array.h
r101295 r101301 30 30 31 31 @class DOMFloat32Array; 32 @class DOMInt32Array; 32 33 33 34 @interface DOMFloat64Array : DOMArrayBufferView 34 - ( void)foo:(DOMFloat32Array *)array;35 - (DOMInt32Array *)foo:(DOMFloat32Array *)array; 35 36 @end 36 37 -
trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMFloat64Array.mm
r101295 r101301 36 36 #import "DOMFloat32ArrayInternal.h" 37 37 #import "DOMFloat64ArrayInternal.h" 38 #import "DOMInt32ArrayInternal.h" 38 39 #import "DOMNodeInternal.h" 39 40 #import "DOMStyleSheetInternal.h" … … 41 42 #import "Float32Array.h" 42 43 #import "Float64Array.h" 44 #import "Int32Array.h" 43 45 #import "JSMainThreadExecState.h" 44 46 #import "ThreadCheck.h" … … 50 52 @implementation DOMFloat64Array 51 53 52 - ( void)foo:(DOMFloat32Array *)array54 - (DOMInt32Array *)foo:(DOMFloat32Array *)array 53 55 { 54 56 WebCore::JSMainThreadNullState state; 55 IMPL->foo(core(array));57 return kit(WTF::getPtr(IMPL->foo(core(array)))); 56 58 } 57 59 -
trunk/Source/WebCore/bindings/scripts/test/TestTypedArray.idl
r101295 r101301 35 35 DontCheckEnums 36 36 ] Float64Array : ArrayBufferView { 37 voidfoo(in Float32Array array);37 Int32Array foo(in Float32Array array); 38 38 }; 39 39 } -
trunk/Source/WebCore/bindings/scripts/test/V8/V8Float64Array.cpp
r101295 r101301 30 30 #include "V8DOMWrapper.h" 31 31 #include "V8Float32Array.h" 32 #include "V8Int32Array.h" 32 33 #include "V8IsolatedContext.h" 33 34 #include "V8Proxy.h" 34 35 #include <wtf/Float32Array.h> 35 36 #include <wtf/Float64Array.h> 37 #include <wtf/GetPtr.h> 38 #include <wtf/Int32Array.h> 39 #include <wtf/RefCounted.h> 40 #include <wtf/RefPtr.h> 36 41 #include <wtf/UnusedParam.h> 37 42 … … 51 56 Float64Array* imp = V8Float64Array::toNative(args.Holder()); 52 57 EXCEPTION_BLOCK(Float32Array*, array, V8Float32Array::HasInstance(MAYBE_MISSING_PARAMETER(args, 0, MissingIsUndefined)) ? V8Float32Array::toNative(v8::Handle<v8::Object>::Cast(MAYBE_MISSING_PARAMETER(args, 0, MissingIsUndefined))) : 0); 53 imp->foo(array); 54 return v8::Handle<v8::Value>(); 58 return toV8(imp->foo(array)); 55 59 } 56 60
Note:
See TracChangeset
for help on using the changeset viewer.