Title: [125293] trunk/Source/WebCore
Revision
125293
Author
[email protected]
Date
2012-08-10 09:48:57 -0700 (Fri, 10 Aug 2012)

Log Message

Remove custom bindings from WaveShaperNode.
https://bugs.webkit.org/show_bug.cgi?id=93613

Patch by Vineet Chaudhary <[email protected]> on 2012-08-10
Reviewed by Kentaro Hara.

We should remove custom bindings as CodeGenerator uses UNUSED_PARAM macro.

TestObj.idl
No behavioural changes.
All tests under webaudio/* should behave same.

* GNUmakefile.list.am: Removed JSWaveShaperNodeCustom.cpp from builds.
* Modules/webaudio/WaveShaperNode.idl: Removed [JSCustomSetter].
* UseJSC.cmake: Removed JSWaveShaperNodeCustom.cpp from builds.
* WebCore.xcodeproj/project.pbxproj: Ditto.
* bindings/js/JSWaveShaperNodeCustom.cpp: Removed.
* bindings/scripts/CodeGeneratorCPP.pm:
(SkipAttribute): Skip TypedArray attribute.
* bindings/scripts/CodeGeneratorGObject.pm:
(SkipAttribute): Skip TypedArray attribute.
* bindings/scripts/CodeGeneratorObjC.pm:
(SkipAttribute): Skip TypedArray attribute.
* bindings/scripts/test/JS/JSTestObj.cpp: Bindings tests.
(WebCore::jsTestObjTypedArrayAttr):
(WebCore::setJSTestObjReflectedCustomURLAttr):
(WebCore::setJSTestObjTypedArrayAttr):
* bindings/scripts/test/JS/JSTestObj.h:
* bindings/scripts/test/TestObj.idl: Test.
* bindings/scripts/test/V8/V8TestObj.cpp: Bindings tests.
(WebCore::TestObjV8Internal::typedArrayAttrAttrGetter):
(TestObjV8Internal):
(WebCore::TestObjV8Internal::typedArrayAttrAttrSetter):

Modified Paths

Removed Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (125292 => 125293)


--- trunk/Source/WebCore/ChangeLog	2012-08-10 16:35:14 UTC (rev 125292)
+++ trunk/Source/WebCore/ChangeLog	2012-08-10 16:48:57 UTC (rev 125293)
@@ -1,3 +1,38 @@
+2012-08-10  Vineet Chaudhary  <[email protected]>
+
+        Remove custom bindings from WaveShaperNode.
+        https://bugs.webkit.org/show_bug.cgi?id=93613
+
+        Reviewed by Kentaro Hara.
+
+        We should remove custom bindings as CodeGenerator uses UNUSED_PARAM macro.
+
+        TestObj.idl
+        No behavioural changes.
+        All tests under webaudio/* should behave same.
+
+        * GNUmakefile.list.am: Removed JSWaveShaperNodeCustom.cpp from builds.
+        * Modules/webaudio/WaveShaperNode.idl: Removed [JSCustomSetter].
+        * UseJSC.cmake: Removed JSWaveShaperNodeCustom.cpp from builds.
+        * WebCore.xcodeproj/project.pbxproj: Ditto.
+        * bindings/js/JSWaveShaperNodeCustom.cpp: Removed.
+        * bindings/scripts/CodeGeneratorCPP.pm:
+        (SkipAttribute): Skip TypedArray attribute.
+        * bindings/scripts/CodeGeneratorGObject.pm:
+        (SkipAttribute): Skip TypedArray attribute.
+        * bindings/scripts/CodeGeneratorObjC.pm:
+        (SkipAttribute): Skip TypedArray attribute.
+        * bindings/scripts/test/JS/JSTestObj.cpp: Bindings tests.
+        (WebCore::jsTestObjTypedArrayAttr):
+        (WebCore::setJSTestObjReflectedCustomURLAttr):
+        (WebCore::setJSTestObjTypedArrayAttr):
+        * bindings/scripts/test/JS/JSTestObj.h:
+        * bindings/scripts/test/TestObj.idl: Test.
+        * bindings/scripts/test/V8/V8TestObj.cpp: Bindings tests.
+        (WebCore::TestObjV8Internal::typedArrayAttrAttrGetter):
+        (TestObjV8Internal):
+        (WebCore::TestObjV8Internal::typedArrayAttrAttrSetter):
+
 2012-08-10  Huang Dongsung  <[email protected]>
 
         REGRESSION (r123848): Heap-use-after-free in WebCore::CachedResource::didAddClient.

Modified: trunk/Source/WebCore/GNUmakefile.list.am (125292 => 125293)


--- trunk/Source/WebCore/GNUmakefile.list.am	2012-08-10 16:35:14 UTC (rev 125292)
+++ trunk/Source/WebCore/GNUmakefile.list.am	2012-08-10 16:48:57 UTC (rev 125293)
@@ -5776,7 +5776,6 @@
 	Source/WebCore/bindings/js/JSAudioContextCustom.cpp \
 	Source/WebCore/bindings/js/JSConvolverNodeCustom.cpp \
 	Source/WebCore/bindings/js/JSJavaScriptAudioNodeCustom.cpp \
-	Source/WebCore/bindings/js/JSWaveShaperNodeCustom.cpp \
 	Source/WebCore/platform/audio/AudioArray.h \
 	Source/WebCore/platform/audio/AudioBus.cpp \
 	Source/WebCore/platform/audio/AudioBus.h \

Modified: trunk/Source/WebCore/Modules/webaudio/WaveShaperNode.idl (125292 => 125293)


--- trunk/Source/WebCore/Modules/webaudio/WaveShaperNode.idl	2012-08-10 16:35:14 UTC (rev 125292)
+++ trunk/Source/WebCore/Modules/webaudio/WaveShaperNode.idl	2012-08-10 16:48:57 UTC (rev 125293)
@@ -27,6 +27,6 @@
         Conditional=WEB_AUDIO,
         JSGenerateToJSObject
     ] WaveShaperNode : AudioNode {
-        attribute [JSCustomSetter] Float32Array curve;
+        attribute Float32Array curve;
     };
 }

Modified: trunk/Source/WebCore/UseJSC.cmake (125292 => 125293)


--- trunk/Source/WebCore/UseJSC.cmake	2012-08-10 16:35:14 UTC (rev 125292)
+++ trunk/Source/WebCore/UseJSC.cmake	2012-08-10 16:48:57 UTC (rev 125293)
@@ -278,7 +278,6 @@
         bindings/js/JSAudioContextCustom.cpp
         bindings/js/JSConvolverNodeCustom.cpp
         bindings/js/JSJavaScriptAudioNodeCustom.cpp
-        bindings/js/JSWaveShaperNodeCustom.cpp
     )
 ENDIF ()
 

Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (125292 => 125293)


--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2012-08-10 16:35:14 UTC (rev 125292)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2012-08-10 16:48:57 UTC (rev 125293)
@@ -6439,7 +6439,6 @@
 		FD82D7F813D4C8BD004E4372 /* JSWaveShaperNode.h in Headers */ = {isa = PBXBuildFile; fileRef = FD82D7F613D4C8BD004E4372 /* JSWaveShaperNode.h */; };
 		FD8C46EB154608E700A5910C /* AudioScheduledSourceNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FD8C46E9154608E700A5910C /* AudioScheduledSourceNode.cpp */; };
 		FD8C46EC154608E700A5910C /* AudioScheduledSourceNode.h in Headers */ = {isa = PBXBuildFile; fileRef = FD8C46EA154608E700A5910C /* AudioScheduledSourceNode.h */; };
-		FD8E9BDF13D4CD2B0050DC72 /* JSWaveShaperNodeCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FD8E9BDE13D4CD2B0050DC72 /* JSWaveShaperNodeCustom.cpp */; };
 		FDA15E9D12B03EE1003A583A /* JSAudioBuffer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FDA15E8112B03EE1003A583A /* JSAudioBuffer.cpp */; };
 		FDA15E9E12B03EE1003A583A /* JSAudioBuffer.h in Headers */ = {isa = PBXBuildFile; fileRef = FDA15E8212B03EE1003A583A /* JSAudioBuffer.h */; };
 		FDA15E9F12B03EE1003A583A /* JSAudioBufferSourceNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FDA15E8312B03EE1003A583A /* JSAudioBufferSourceNode.cpp */; };
@@ -13834,7 +13833,6 @@
 		FD82D7F613D4C8BD004E4372 /* JSWaveShaperNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSWaveShaperNode.h; sourceTree = "<group>"; };
 		FD8C46E9154608E700A5910C /* AudioScheduledSourceNode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AudioScheduledSourceNode.cpp; sourceTree = "<group>"; };
 		FD8C46EA154608E700A5910C /* AudioScheduledSourceNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AudioScheduledSourceNode.h; sourceTree = "<group>"; };
-		FD8E9BDE13D4CD2B0050DC72 /* JSWaveShaperNodeCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSWaveShaperNodeCustom.cpp; sourceTree = "<group>"; };
 		FDA15E8112B03EE1003A583A /* JSAudioBuffer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSAudioBuffer.cpp; sourceTree = "<group>"; };
 		FDA15E8212B03EE1003A583A /* JSAudioBuffer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSAudioBuffer.h; sourceTree = "<group>"; };
 		FDA15E8312B03EE1003A583A /* JSAudioBufferSourceNode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSAudioBufferSourceNode.cpp; sourceTree = "<group>"; };
@@ -20327,7 +20325,6 @@
 				07846384145B1B8E00A58DF1 /* JSTrackCustom.h */,
 				07B5A30A14687B8400A81ECE /* JSTrackEventCustom.cpp */,
 				516BB7920CE91E6800512F79 /* JSTreeWalkerCustom.cpp */,
-				FD8E9BDE13D4CD2B0050DC72 /* JSWaveShaperNodeCustom.cpp */,
 				49EED14C1051971A00099FAB /* JSWebGLRenderingContextCustom.cpp */,
 				319E68861327C911004AC91A /* JSWebKitAnimationCustom.cpp */,
 				3194623113022F65004BB3F8 /* JSWebKitAnimationListCustom.cpp */,
@@ -27438,7 +27435,6 @@
 				7B1EA0CE1576C5B50060177D /* JSUndoManager.cpp in Sources */,
 				15C77094100D3CA8005BA267 /* JSValidityState.cpp in Sources */,
 				FD82D7F713D4C8BD004E4372 /* JSWaveShaperNode.cpp in Sources */,
-				FD8E9BDF13D4CD2B0050DC72 /* JSWaveShaperNodeCustom.cpp in Sources */,
 				FDEA6246152102FC00479DF0 /* JSWaveTable.cpp in Sources */,
 				A7D20F62107F406900A80392 /* JSWebGLActiveInfo.cpp in Sources */,
 				49C7B9931042D2D30009D447 /* JSWebGLBuffer.cpp in Sources */,

Deleted: trunk/Source/WebCore/bindings/js/JSWaveShaperNodeCustom.cpp (125292 => 125293)


--- trunk/Source/WebCore/bindings/js/JSWaveShaperNodeCustom.cpp	2012-08-10 16:35:14 UTC (rev 125292)
+++ trunk/Source/WebCore/bindings/js/JSWaveShaperNodeCustom.cpp	2012-08-10 16:48:57 UTC (rev 125293)
@@ -1,47 +0,0 @@
-/*
- * Copyright (C) 2011, Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1.  Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2.  Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-
-#if ENABLE(WEB_AUDIO)
-
-#include "WaveShaperNode.h"
-
-#include "JSFloat32Array.h"
-#include "JSWaveShaperNode.h"
-#include <wtf/Float32Array.h>
-
-using namespace JSC;
-
-namespace WebCore {
-
-void JSWaveShaperNode::setCurve(ExecState*, JSValue value)
-{
-    WaveShaperNode* imp = static_cast<WaveShaperNode*>(impl());
-    imp->setCurve(toFloat32Array(value));
-}
-
-} // namespace WebCore
-
-#endif // ENABLE(WEB_AUDIO)

Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorCPP.pm (125292 => 125293)


--- trunk/Source/WebCore/bindings/scripts/CodeGeneratorCPP.pm	2012-08-10 16:35:14 UTC (rev 125292)
+++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorCPP.pm	2012-08-10 16:48:57 UTC (rev 125293)
@@ -224,6 +224,8 @@
 
     return 1 if $attribute->signature->type =~ /Constructor$/;
 
+    return 1 if $codeGenerator->IsTypedArrayType($attribute->signature->type);
+
     if ($codeGenerator->GetArrayType($attribute->signature->type)) {
         return 1;
     }

Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorGObject.pm (125292 => 125293)


--- trunk/Source/WebCore/bindings/scripts/CodeGeneratorGObject.pm	2012-08-10 16:35:14 UTC (rev 125292)
+++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorGObject.pm	2012-08-10 16:48:57 UTC (rev 125293)
@@ -179,6 +179,8 @@
         return 1;
     }
 
+    return 1 if $codeGenerator->IsTypedArrayType($propType);
+
     $codeGenerator->AssertNotSequenceType($propType);
 
     if ($codeGenerator->GetArrayType($propType)) {

Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorObjC.pm (125292 => 125293)


--- trunk/Source/WebCore/bindings/scripts/CodeGeneratorObjC.pm	2012-08-10 16:35:14 UTC (rev 125292)
+++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorObjC.pm	2012-08-10 16:48:57 UTC (rev 125293)
@@ -469,6 +469,7 @@
 
     $codeGenerator->AssertNotSequenceType($attribute->signature->type);
     return 1 if $codeGenerator->GetArrayType($attribute->signature->type);
+    return 1 if $codeGenerator->IsTypedArrayType($attribute->signature->type);
 
     # This is for DynamicsCompressorNode.idl
     if ($attribute->signature->name eq "release") {

Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp (125292 => 125293)


--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp	2012-08-10 16:35:14 UTC (rev 125292)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp	2012-08-10 16:48:57 UTC (rev 125293)
@@ -32,6 +32,7 @@
 #include "JSDOMStringList.h"
 #include "JSDocument.h"
 #include "JSEventListener.h"
+#include "JSFloat32Array.h"
 #include "JSSVGDocument.h"
 #include "JSSVGPoint.h"
 #include "JSScriptProfile.h"
@@ -56,6 +57,7 @@
 #include <runtime/Error.h>
 #include <runtime/JSArray.h>
 #include <runtime/JSString.h>
+#include <wtf/Float32Array.h>
 #include <wtf/GetPtr.h>
 
 #if ENABLE(Condition1)
@@ -100,6 +102,7 @@
     { "reflectedCustomIntegralAttr", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjReflectedCustomIntegralAttr), (intptr_t)setJSTestObjReflectedCustomIntegralAttr, NoIntrinsic },
     { "reflectedCustomBooleanAttr", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjReflectedCustomBooleanAttr), (intptr_t)setJSTestObjReflectedCustomBooleanAttr, NoIntrinsic },
     { "reflectedCustomURLAttr", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjReflectedCustomURLAttr), (intptr_t)setJSTestObjReflectedCustomURLAttr, NoIntrinsic },
+    { "typedArrayAttr", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjTypedArrayAttr), (intptr_t)setJSTestObjTypedArrayAttr, NoIntrinsic },
     { "attrWithGetterException", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjAttrWithGetterException), (intptr_t)setJSTestObjAttrWithGetterException, NoIntrinsic },
     { "attrWithSetterException", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjAttrWithSetterException), (intptr_t)setJSTestObjAttrWithSetterException, NoIntrinsic },
     { "stringAttrWithGetterException", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjStringAttrWithGetterException), (intptr_t)setJSTestObjStringAttrWithGetterException, NoIntrinsic },
@@ -146,7 +149,7 @@
     { 0, 0, 0, 0, NoIntrinsic }
 };
 
-static const HashTable JSTestObjTable = { 140, 127, JSTestObjTableValues, 0 };
+static const HashTable JSTestObjTable = { 141, 127, JSTestObjTableValues, 0 };
 /* Hash table for constructor */
 
 static const HashTableValue JSTestObjConstructorTableValues[] =
@@ -620,6 +623,16 @@
 }
 
 
+JSValue jsTestObjTypedArrayAttr(ExecState* exec, JSValue slotBase, PropertyName)
+{
+    JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(slotBase));
+    UNUSED_PARAM(exec);
+    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl->typedArrayAttr()));
+    return result;
+}
+
+
 JSValue jsTestObjAttrWithGetterException(ExecState* exec, JSValue slotBase, PropertyName)
 {
     JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(slotBase));
@@ -1122,6 +1135,15 @@
 }
 
 
+void setJSTestObjTypedArrayAttr(ExecState* exec, JSObject* thisObject, JSValue value)
+{
+    UNUSED_PARAM(exec);
+    JSTestObj* castedThis = jsCast<JSTestObj*>(thisObject);
+    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    impl->setTypedArrayAttr(toFloat32Array(value));
+}
+
+
 void setJSTestObjAttrWithGetterException(ExecState* exec, JSObject* thisObject, JSValue value)
 {
     UNUSED_PARAM(exec);

Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.h (125292 => 125293)


--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.h	2012-08-10 16:35:14 UTC (rev 125292)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.h	2012-08-10 16:48:57 UTC (rev 125293)
@@ -261,6 +261,8 @@
 void setJSTestObjReflectedCustomBooleanAttr(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
 JSC::JSValue jsTestObjReflectedCustomURLAttr(JSC::ExecState*, JSC::JSValue, JSC::PropertyName);
 void setJSTestObjReflectedCustomURLAttr(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
+JSC::JSValue jsTestObjTypedArrayAttr(JSC::ExecState*, JSC::JSValue, JSC::PropertyName);
+void setJSTestObjTypedArrayAttr(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
 JSC::JSValue jsTestObjAttrWithGetterException(JSC::ExecState*, JSC::JSValue, JSC::PropertyName);
 void setJSTestObjAttrWithGetterException(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
 JSC::JSValue jsTestObjAttrWithSetterException(JSC::ExecState*, JSC::JSValue, JSC::PropertyName);

Modified: trunk/Source/WebCore/bindings/scripts/test/TestObj.idl (125292 => 125293)


--- trunk/Source/WebCore/bindings/scripts/test/TestObj.idl	2012-08-10 16:35:14 UTC (rev 125292)
+++ trunk/Source/WebCore/bindings/scripts/test/TestObj.idl	2012-08-10 16:48:57 UTC (rev 125293)
@@ -67,6 +67,9 @@
         attribute [Reflect=customContentBooleanAttr] boolean reflectedCustomBooleanAttr;
         attribute [Reflect=customContentURLAttr, URL] DOMString reflectedCustomURLAttr;
 
+        // TypedArray attribute
+        attribute Float32Array typedArrayAttr;
+
         // Methods
         void    voidMethod();
         void    voidMethodWithArgs(in long longArg, in DOMString strArg, in TestObj objArg);

Modified: trunk/Source/WebCore/bindings/scripts/test/V8/V8TestObj.cpp (125292 => 125293)


--- trunk/Source/WebCore/bindings/scripts/test/V8/V8TestObj.cpp	2012-08-10 16:35:14 UTC (rev 125292)
+++ trunk/Source/WebCore/bindings/scripts/test/V8/V8TestObj.cpp	2012-08-10 16:48:57 UTC (rev 125293)
@@ -41,6 +41,7 @@
 #include "V8DOMStringList.h"
 #include "V8DOMWrapper.h"
 #include "V8Document.h"
+#include "V8Float32Array.h"
 #include "V8IsolatedContext.h"
 #include "V8Proxy.h"
 #include "V8SVGDocument.h"
@@ -55,6 +56,7 @@
 #include "V8c.h"
 #include "V8d.h"
 #include "V8e.h"
+#include <wtf/Float32Array.h>
 #include <wtf/GetPtr.h>
 #include <wtf/RefCounted.h>
 #include <wtf/RefPtr.h>
@@ -416,6 +418,22 @@
     return;
 }
 
+static v8::Handle<v8::Value> typedArrayAttrAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
+{
+    INC_STATS("DOM.TestObj.typedArrayAttr._get");
+    TestObj* imp = V8TestObj::toNative(info.Holder());
+    return toV8(imp->typedArrayAttr(), info.GetIsolate());
+}
+
+static void typedArrayAttrAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
+{
+    INC_STATS("DOM.TestObj.typedArrayAttr._set");
+    TestObj* imp = V8TestObj::toNative(info.Holder());
+    Float32Array* v = V8Float32Array::HasInstance(value) ? V8Float32Array::toNative(v8::Handle<v8::Object>::Cast(value)) : 0;
+    imp->setTypedArrayAttr(WTF::getPtr(v));
+    return;
+}
+
 static v8::Handle<v8::Value> attrWithGetterExceptionAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 {
     INC_STATS("DOM.TestObj.attrWithGetterException._get");
@@ -1966,6 +1984,8 @@
     {"reflectedCustomBooleanAttr", TestObjV8Internal::reflectedCustomBooleanAttrAttrGetter, TestObjV8Internal::reflectedCustomBooleanAttrAttrSetter, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
     // Attribute 'reflectedCustomURLAttr' (Type: 'attribute' ExtAttr: 'URL Reflect')
     {"reflectedCustomURLAttr", TestObjV8Internal::reflectedCustomURLAttrAttrGetter, TestObjV8Internal::reflectedCustomURLAttrAttrSetter, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
+    // Attribute 'typedArrayAttr' (Type: 'attribute' ExtAttr: '')
+    {"typedArrayAttr", TestObjV8Internal::typedArrayAttrAttrGetter, TestObjV8Internal::typedArrayAttrAttrSetter, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
     // Attribute 'attrWithGetterException' (Type: 'attribute' ExtAttr: '')
     {"attrWithGetterException", TestObjV8Internal::attrWithGetterExceptionAttrGetter, TestObjV8Internal::attrWithGetterExceptionAttrSetter, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
     // Attribute 'attrWithSetterException' (Type: 'attribute' ExtAttr: '')
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to