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

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

Issue 15862004: Remove custom code for MessageEvent.ports getter (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase patch Created 7 years, 7 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
« no previous file with comments | « Source/bindings/tests/idls/TestObject.idl ('k') | Source/bindings/v8/V8Binding.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/tests/results/V8TestObject.cpp
diff --git a/Source/bindings/tests/results/V8TestObject.cpp b/Source/bindings/tests/results/V8TestObject.cpp
index 70df0ede1db2d3b40a90d98bf58fc47e7a7971fc..c0cbf6350f5dc664d92aa755040c85021d1dea21 100644
--- a/Source/bindings/tests/results/V8TestObject.cpp
+++ b/Source/bindings/tests/results/V8TestObject.cpp
@@ -26,6 +26,7 @@
#include "V8DOMStringList.h"
#include "V8Document.h"
#include "V8Float32Array.h"
+#include "V8MessagePort.h"
#include "V8Node.h"
#include "V8SVGDocument.h"
#include "V8SVGPoint.h"
@@ -1451,6 +1452,30 @@ static void doubleArrayAttrSetterCallback(v8::Local<v8::String> name, v8::Local<
TestObjV8Internal::doubleArrayAttrSetter(name, value, info);
}
+static v8::Handle<v8::Value> messagePortArrayAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
+{
+ TestObj* imp = V8TestObject::toNative(info.Holder());
+ return v8Array(imp->messagePortArray(), info.GetIsolate());
+}
+
+static v8::Handle<v8::Value> messagePortArrayAttrGetterCallback(v8::Local<v8::String> name, const v8::AccessorInfo& info)
+{
+ return TestObjV8Internal::messagePortArrayAttrGetter(name, info);
+}
+
+static void messagePortArrayAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
+{
+ TestObj* imp = V8TestObject::toNative(info.Holder());
+ V8TRYCATCH_VOID(Vector<RefPtr<MessagePort> >, v, (toRefPtrNativeArray<MessagePort, V8MessagePort>(value, info.GetIsolate())));
+ imp->setMessagePortArray(v);
+ return;
+}
+
+static void messagePortArrayAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
+{
+ TestObjV8Internal::messagePortArrayAttrSetter(name, value, info);
+}
+
static v8::Handle<v8::Value> contentDocumentAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
@@ -4068,6 +4093,8 @@ static const V8DOMConfiguration::BatchedAttribute V8TestObjectAttrs[] = {
{"floatArray", TestObjV8Internal::floatArrayAttrGetterCallback, TestObjV8Internal::floatArrayAttrSetterCallback, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
// Attribute 'doubleArray' (Type: 'attribute' ExtAttr: '')
{"doubleArray", TestObjV8Internal::doubleArrayAttrGetterCallback, TestObjV8Internal::doubleArrayAttrSetterCallback, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
+ // Attribute 'messagePortArray' (Type: 'attribute' ExtAttr: '')
+ {"messagePortArray", TestObjV8Internal::messagePortArrayAttrGetterCallback, TestObjV8Internal::messagePortArrayAttrSetterCallback, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
// Attribute 'contentDocument' (Type: 'attribute' ExtAttr: 'CheckSecurityForNode')
{"contentDocument", TestObjV8Internal::contentDocumentAttrGetterCallback, 0, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
// Attribute 'mutablePoint' (Type: 'attribute' ExtAttr: '')
« no previous file with comments | « Source/bindings/tests/idls/TestObject.idl ('k') | Source/bindings/v8/V8Binding.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698