Commit fe4ac852 authored by Marina Sakai's avatar Marina Sakai Committed by Commit Bot

Remove macro-generated functions for private properties of MessageChannel

This CL removes macro-generated functions for private properties of MessageChannel by using the new API GetSymbol created in CL1877490.

Bug: 715418
Change-Id: I913997334d77807bedc5d2cc8022788c0daa80fd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1888616
Commit-Queue: Marina Sakai <marinasakai@google.com>
Reviewed-by: default avatarYuki Shiino <yukishiino@chromium.org>
Reviewed-by: default avatarHitoshi Yoshida <peria@chromium.org>
Cr-Commit-Position: refs/heads/master@{#711183}
parent 62279db1
......@@ -39,6 +39,9 @@
namespace blink {
const V8PrivateProperty::SymbolKey kSymbolKeyPort1;
const V8PrivateProperty::SymbolKey kSymbolKeyPort2;
void V8MessageChannel::ConstructorCustom(
const v8::FunctionCallbackInfo<v8::Value>& info) {
v8::Isolate* isolate = info.GetIsolate();
......@@ -51,10 +54,10 @@ void V8MessageChannel::ConstructorCustom(
// Create references from the MessageChannel wrapper to the two
// MessagePort wrappers to make sure that the MessagePort wrappers
// stay alive as long as the MessageChannel wrapper is around.
V8PrivateProperty::GetMessageChannelPort1(isolate).Set(
wrapper, ToV8(channel->port1(), wrapper, isolate));
V8PrivateProperty::GetMessageChannelPort2(isolate).Set(
wrapper, ToV8(channel->port2(), wrapper, isolate));
V8PrivateProperty::GetSymbol(isolate, kSymbolKeyPort1)
.Set(wrapper, ToV8(channel->port1(), wrapper, isolate));
V8PrivateProperty::GetSymbol(isolate, kSymbolKeyPort2)
.Set(wrapper, ToV8(channel->port2(), wrapper, isolate));
V8SetReturnValue(info, V8DOMWrapper::AssociateObjectWithWrapper(
isolate, channel, GetWrapperTypeInfo(), wrapper));
......
......@@ -31,8 +31,6 @@ class ScriptWrappable;
X(DOMException, Error) \
X(Global, Event) \
X(IDBCursor, Request) \
X(MessageChannel, Port1) \
X(MessageChannel, Port2) \
X(MessageEvent, CachedData) \
X(NamedConstructor, Initialized) \
X(PopStateEvent, State) \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment