Index: Source/bindings/v8/custom/V8MessageEventCustom.cpp |
diff --git a/Source/bindings/v8/custom/V8MessageEventCustom.cpp b/Source/bindings/v8/custom/V8MessageEventCustom.cpp |
index feb82dd2029c125ea496f298ace34a77b4759988..e034d1ba184e83244f02de8d939e1cbd97f60566 100644 |
--- a/Source/bindings/v8/custom/V8MessageEventCustom.cpp |
+++ b/Source/bindings/v8/custom/V8MessageEventCustom.cpp |
@@ -58,9 +58,10 @@ v8::Handle<v8::Value> V8MessageEvent::dataAttrGetterCustom(v8::Local<v8::String> |
} |
case MessageEvent::DataTypeSerializedScriptValue: |
- if (RefPtr<SerializedScriptValue> serializedValue = event->dataAsSerializedScriptValue()) |
- result = serializedValue->deserialize(info.GetIsolate(), event->ports()); |
- else |
+ if (RefPtr<SerializedScriptValue> serializedValue = event->dataAsSerializedScriptValue()) { |
+ MessagePortArray ports = event->ports(); |
+ result = serializedValue->deserialize(info.GetIsolate(), &ports); |
+ } else |
result = v8Null(info.GetIsolate()); |
break; |
@@ -86,23 +87,6 @@ v8::Handle<v8::Value> V8MessageEvent::dataAttrGetterCustom(v8::Local<v8::String> |
return result; |
} |
-v8::Handle<v8::Value> V8MessageEvent::portsAttrGetterCustom(v8::Local<v8::String> name, const v8::AccessorInfo& info) |
-{ |
- MessageEvent* event = V8MessageEvent::toNative(info.Holder()); |
- |
- MessagePortArray* ports = event->ports(); |
- if (!ports) |
- return v8::Array::New(0); |
- |
- MessagePortArray portsCopy(*ports); |
- |
- v8::Local<v8::Array> portArray = v8::Array::New(portsCopy.size()); |
- for (size_t i = 0; i < portsCopy.size(); ++i) |
- portArray->Set(v8Integer(i, info.GetIsolate()), toV8Fast(portsCopy[i].get(), info, event)); |
- |
- return portArray; |
-} |
- |
v8::Handle<v8::Value> V8MessageEvent::initMessageEventMethodCustom(const v8::Arguments& args) |
{ |
MessageEvent* event = V8MessageEvent::toNative(args.Holder()); |