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 @@ ...@@ -39,6 +39,9 @@
namespace blink { namespace blink {
const V8PrivateProperty::SymbolKey kSymbolKeyPort1;
const V8PrivateProperty::SymbolKey kSymbolKeyPort2;
void V8MessageChannel::ConstructorCustom( void V8MessageChannel::ConstructorCustom(
const v8::FunctionCallbackInfo<v8::Value>& info) { const v8::FunctionCallbackInfo<v8::Value>& info) {
v8::Isolate* isolate = info.GetIsolate(); v8::Isolate* isolate = info.GetIsolate();
...@@ -51,10 +54,10 @@ void V8MessageChannel::ConstructorCustom( ...@@ -51,10 +54,10 @@ void V8MessageChannel::ConstructorCustom(
// Create references from the MessageChannel wrapper to the two // Create references from the MessageChannel wrapper to the two
// MessagePort wrappers to make sure that the MessagePort wrappers // MessagePort wrappers to make sure that the MessagePort wrappers
// stay alive as long as the MessageChannel wrapper is around. // stay alive as long as the MessageChannel wrapper is around.
V8PrivateProperty::GetMessageChannelPort1(isolate).Set( V8PrivateProperty::GetSymbol(isolate, kSymbolKeyPort1)
wrapper, ToV8(channel->port1(), wrapper, isolate)); .Set(wrapper, ToV8(channel->port1(), wrapper, isolate));
V8PrivateProperty::GetMessageChannelPort2(isolate).Set( V8PrivateProperty::GetSymbol(isolate, kSymbolKeyPort2)
wrapper, ToV8(channel->port2(), wrapper, isolate)); .Set(wrapper, ToV8(channel->port2(), wrapper, isolate));
V8SetReturnValue(info, V8DOMWrapper::AssociateObjectWithWrapper( V8SetReturnValue(info, V8DOMWrapper::AssociateObjectWithWrapper(
isolate, channel, GetWrapperTypeInfo(), wrapper)); isolate, channel, GetWrapperTypeInfo(), wrapper));
......
...@@ -31,8 +31,6 @@ class ScriptWrappable; ...@@ -31,8 +31,6 @@ class ScriptWrappable;
X(DOMException, Error) \ X(DOMException, Error) \
X(Global, Event) \ X(Global, Event) \
X(IDBCursor, Request) \ X(IDBCursor, Request) \
X(MessageChannel, Port1) \
X(MessageChannel, Port2) \
X(MessageEvent, CachedData) \ X(MessageEvent, CachedData) \
X(NamedConstructor, Initialized) \ X(NamedConstructor, Initialized) \
X(PopStateEvent, State) \ 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