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

Unified Diff: Source/bindings/tests/results/V8TestInterfaceAudioBuffer.cpp

Issue 131183002: IDL compiler: AudioBuffer interfaces (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 11 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/bindings/tests/results/V8TestInterfaceAudioBuffer.cpp
diff --git a/Source/bindings/tests/results/V8TestInterfacePython3.cpp b/Source/bindings/tests/results/V8TestInterfaceAudioBuffer.cpp
similarity index 70%
copy from Source/bindings/tests/results/V8TestInterfacePython3.cpp
copy to Source/bindings/tests/results/V8TestInterfaceAudioBuffer.cpp
index 53bd1df5275230aeff6b0fee4e9485a83ac7e8c8..8dd3ea219dedfd34ecc1193ae7f87a9cbee6d989 100644
--- a/Source/bindings/tests/results/V8TestInterfacePython3.cpp
+++ b/Source/bindings/tests/results/V8TestInterfaceAudioBuffer.cpp
@@ -31,7 +31,7 @@
// This file has been auto-generated by code_generator_v8.pm. DO NOT MODIFY!
#include "config.h"
-#include "V8TestInterfacePython3.h"
+#include "V8TestInterfaceAudioBuffer.h"
#include "RuntimeEnabledFeatures.h"
#include "bindings/v8/ExceptionState.h"
@@ -39,14 +39,15 @@
#include "bindings/v8/V8ObjectConstructor.h"
#include "core/dom/ContextFeatures.h"
#include "core/dom/Document.h"
+#include "modules/webaudio/AudioBuffer.h"
#include "platform/TraceEvent.h"
namespace WebCore {
-static void initializeScriptWrappableForInterface(TestInterfacePython3* object)
+static void initializeScriptWrappableForInterface(TestInterfaceAudioBuffer* object)
{
if (ScriptWrappable::wrapperCanBeStoredInObject(object))
- ScriptWrappable::setTypeInfoInObject(object, &V8TestInterfacePython3::wrapperTypeInfo);
+ ScriptWrappable::setTypeInfoInObject(object, &V8TestInterfaceAudioBuffer::wrapperTypeInfo);
else
ASSERT_NOT_REACHED();
}
@@ -57,26 +58,26 @@ static void initializeScriptWrappableForInterface(TestInterfacePython3* object)
// the local declaration does not pick up the surrounding namespace. Therefore, we provide this function
// in the global namespace.
// (More info on the MSVC bug here: http://connect.microsoft.com/VisualStudio/feedback/details/664619/the-namespace-of-local-function-declarations-in-c)
-void webCoreInitializeScriptWrappableForInterface(WebCore::TestInterfacePython3* object)
+void webCoreInitializeScriptWrappableForInterface(WebCore::TestInterfaceAudioBuffer* object)
{
WebCore::initializeScriptWrappableForInterface(object);
}
namespace WebCore {
-const WrapperTypeInfo V8TestInterfacePython3::wrapperTypeInfo = { gin::kEmbedderBlink, V8TestInterfacePython3::domTemplate, V8TestInterfacePython3::derefObject, 0, 0, V8TestInterfacePython3::visitDOMWrapper, V8TestInterfacePython3::installPerContextEnabledMethods, 0, WrapperTypeObjectPrototype };
+const WrapperTypeInfo V8TestInterfaceAudioBuffer::wrapperTypeInfo = { gin::kEmbedderBlink, V8TestInterfaceAudioBuffer::domTemplate, V8TestInterfaceAudioBuffer::derefObject, 0, 0, 0, V8TestInterfaceAudioBuffer::installPerContextEnabledMethods, &V8AudioBuffer::wrapperTypeInfo, WrapperTypeObjectPrototype };
-namespace TestInterfacePython3V8Internal {
+namespace TestInterfaceAudioBufferV8Internal {
template <typename T> void V8_USE(T) { }
-} // namespace TestInterfacePython3V8Internal
+} // namespace TestInterfaceAudioBufferV8Internal
-static void configureV8TestInterfacePython3Template(v8::Handle<v8::FunctionTemplate> functionTemplate, v8::Isolate* isolate, WrapperWorldType currentWorldType)
+static void configureV8TestInterfaceAudioBufferTemplate(v8::Handle<v8::FunctionTemplate> functionTemplate, v8::Isolate* isolate, WrapperWorldType currentWorldType)
{
functionTemplate->ReadOnlyPrototype();
v8::Local<v8::Signature> defaultSignature;
- defaultSignature = V8DOMConfiguration::installDOMClassTemplate(functionTemplate, "TestInterfacePython3", v8::Local<v8::FunctionTemplate>(), V8TestInterfacePython3::internalFieldCount,
+ defaultSignature = V8DOMConfiguration::installDOMClassTemplate(functionTemplate, "TestInterfaceAudioBuffer", V8AudioBuffer::domTemplate(isolate, currentWorldType), V8TestInterfaceAudioBuffer::internalFieldCount,
0, 0,
0, 0,
0, 0,
@@ -88,7 +89,7 @@ static void configureV8TestInterfacePython3Template(v8::Handle<v8::FunctionTempl
functionTemplate->Set(v8AtomicString(isolate, "toString"), V8PerIsolateData::current()->toStringTemplate());
}
-v8::Handle<v8::FunctionTemplate> V8TestInterfacePython3::domTemplate(v8::Isolate* isolate, WrapperWorldType currentWorldType)
+v8::Handle<v8::FunctionTemplate> V8TestInterfaceAudioBuffer::domTemplate(v8::Isolate* isolate, WrapperWorldType currentWorldType)
{
V8PerIsolateData* data = V8PerIsolateData::from(isolate);
V8PerIsolateData::TemplateMap::iterator result = data->templateMap(currentWorldType).find(&wrapperTypeInfo);
@@ -98,27 +99,27 @@ v8::Handle<v8::FunctionTemplate> V8TestInterfacePython3::domTemplate(v8::Isolate
TRACE_EVENT_SCOPED_SAMPLING_STATE("Blink", "BuildDOMTemplate");
v8::EscapableHandleScope handleScope(isolate);
v8::Local<v8::FunctionTemplate> templ = v8::FunctionTemplate::New(isolate, V8ObjectConstructor::isValidConstructorMode);
- configureV8TestInterfacePython3Template(templ, isolate, currentWorldType);
+ configureV8TestInterfaceAudioBufferTemplate(templ, isolate, currentWorldType);
data->templateMap(currentWorldType).add(&wrapperTypeInfo, UnsafePersistent<v8::FunctionTemplate>(isolate, templ));
return handleScope.Escape(templ);
}
-bool V8TestInterfacePython3::hasInstance(v8::Handle<v8::Value> jsValue, v8::Isolate* isolate, WrapperWorldType currentWorldType)
+bool V8TestInterfaceAudioBuffer::hasInstance(v8::Handle<v8::Value> jsValue, v8::Isolate* isolate, WrapperWorldType currentWorldType)
{
return V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, jsValue, currentWorldType);
}
-bool V8TestInterfacePython3::hasInstanceInAnyWorld(v8::Handle<v8::Value> jsValue, v8::Isolate* isolate)
+bool V8TestInterfaceAudioBuffer::hasInstanceInAnyWorld(v8::Handle<v8::Value> jsValue, v8::Isolate* isolate)
{
return V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, jsValue, MainWorld)
|| V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, jsValue, IsolatedWorld)
|| V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, jsValue, WorkerWorld);
}
-v8::Handle<v8::Object> V8TestInterfacePython3::createWrapper(PassRefPtr<TestInterfacePython3> impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate)
+v8::Handle<v8::Object> V8TestInterfaceAudioBuffer::createWrapper(PassRefPtr<TestInterfaceAudioBuffer> impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate)
{
ASSERT(impl);
- ASSERT(!DOMDataStore::containsWrapper<V8TestInterfacePython3>(impl.get(), isolate));
+ ASSERT(!DOMDataStore::containsWrapper<V8TestInterfaceAudioBuffer>(impl.get(), isolate));
if (ScriptWrappable::wrapperCanBeStoredInObject(impl.get())) {
const WrapperTypeInfo* actualInfo = ScriptWrappable::getTypeInfoFromObject(impl.get());
// Might be a XXXConstructor::wrapperTypeInfo instead of an XXX::wrapperTypeInfo. These will both have
@@ -130,18 +131,22 @@ v8::Handle<v8::Object> V8TestInterfacePython3::createWrapper(PassRefPtr<TestInte
if (UNLIKELY(wrapper.IsEmpty()))
return wrapper;
+ for (unsigned i = 0, n = impl->numberOfChannels(); i < n; i++) {
+ Float32Array* channelData = impl->getChannelData(i);
+ channelData->buffer()->setDeallocationObserver(V8ArrayBufferDeallocationObserver::instanceTemplate());
+ }
installPerContextEnabledProperties(wrapper, impl.get(), isolate);
- V8DOMWrapper::associateObjectWithWrapper<V8TestInterfacePython3>(impl, &wrapperTypeInfo, wrapper, isolate, WrapperConfiguration::Dependent);
+ V8DOMWrapper::associateObjectWithWrapper<V8TestInterfaceAudioBuffer>(impl, &wrapperTypeInfo, wrapper, isolate, WrapperConfiguration::Independent);
return wrapper;
}
-void V8TestInterfacePython3::derefObject(void* object)
+void V8TestInterfaceAudioBuffer::derefObject(void* object)
{
fromInternalPointer(object)->deref();
}
template<>
-v8::Handle<v8::Value> toV8NoInline(TestInterfacePython3* impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate)
+v8::Handle<v8::Value> toV8NoInline(TestInterfaceAudioBuffer* impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate)
{
return toV8(impl, creationContext, isolate);
}

Powered by Google App Engine
This is Rietveld 408576698