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

Side by Side Diff: third_party/WebKit/Source/core/dom/MessageChannel.cpp

Issue 2043583002: Remove the use of OwnedPtrDeleter in WebMessagePortChannel. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/dom/MessagePort.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 23 matching lines...) Expand all
34 34
35 static void createChannel(MessagePort* port1, MessagePort* port2) 35 static void createChannel(MessagePort* port1, MessagePort* port2)
36 { 36 {
37 WebMessagePortChannel* channel1; 37 WebMessagePortChannel* channel1;
38 WebMessagePortChannel* channel2; 38 WebMessagePortChannel* channel2;
39 Platform::current()->createMessageChannel(&channel1, &channel2); 39 Platform::current()->createMessageChannel(&channel1, &channel2);
40 DCHECK(channel1); 40 DCHECK(channel1);
41 DCHECK(channel2); 41 DCHECK(channel2);
42 42
43 // Now entangle the proxies with the appropriate local ports. 43 // Now entangle the proxies with the appropriate local ports.
44 port1->entangle(adoptPtr(channel2)); 44 port1->entangle(WebMessagePortChannelUniquePtr(channel2));
45 port2->entangle(adoptPtr(channel1)); 45 port2->entangle(WebMessagePortChannelUniquePtr(channel1));
46 } 46 }
47 47
48 MessageChannel::MessageChannel(ExecutionContext* context) 48 MessageChannel::MessageChannel(ExecutionContext* context)
49 : m_port1(MessagePort::create(*context)) 49 : m_port1(MessagePort::create(*context))
50 , m_port2(MessagePort::create(*context)) 50 , m_port2(MessagePort::create(*context))
51 { 51 {
52 createChannel(m_port1.get(), m_port2.get()); 52 createChannel(m_port1.get(), m_port2.get());
53 } 53 }
54 54
55 DEFINE_TRACE(MessageChannel) 55 DEFINE_TRACE(MessageChannel)
56 { 56 {
57 visitor->trace(m_port1); 57 visitor->trace(m_port1);
58 visitor->trace(m_port2); 58 visitor->trace(m_port2);
59 } 59 }
60 60
61 } // namespace blink 61 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/dom/MessagePort.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698