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

Side by Side Diff: Source/core/dom/MessagePort.cpp

Issue 177073004: Oilpan: move core/workers to oilpan's heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 10 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
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 25 matching lines...) Expand all
36 #include "core/events/MessageEvent.h" 36 #include "core/events/MessageEvent.h"
37 #include "core/events/ThreadLocalEventNames.h" 37 #include "core/events/ThreadLocalEventNames.h"
38 #include "core/frame/DOMWindow.h" 38 #include "core/frame/DOMWindow.h"
39 #include "core/workers/WorkerGlobalScope.h" 39 #include "core/workers/WorkerGlobalScope.h"
40 #include "public/platform/WebString.h" 40 #include "public/platform/WebString.h"
41 #include "wtf/Functional.h" 41 #include "wtf/Functional.h"
42 #include "wtf/text/AtomicString.h" 42 #include "wtf/text/AtomicString.h"
43 43
44 namespace WebCore { 44 namespace WebCore {
45 45
46 PassRefPtr<MessagePort> MessagePort::create(ExecutionContext& executionContext) 46 DEFINE_GC_INFO(MessagePort);
47
48 PassRefPtrWillBeRawPtr<MessagePort> MessagePort::create(ExecutionContext& execut ionContext)
47 { 49 {
48 RefPtr<MessagePort> port = adoptRef(new MessagePort(executionContext)); 50 RefPtrWillBeRawPtr<MessagePort> port = adoptRefCountedWillBeRefCountedGarbag eCollected(new MessagePort(executionContext));
49 port->suspendIfNeeded(); 51 port->suspendIfNeeded();
50 return port.release(); 52 return port.release();
51 } 53 }
52 54
53 MessagePort::MessagePort(ExecutionContext& executionContext) 55 MessagePort::MessagePort(ExecutionContext& executionContext)
54 : ActiveDOMObject(&executionContext) 56 : ActiveDOMObject(&executionContext)
55 , m_started(false) 57 , m_started(false)
56 , m_closed(false) 58 , m_closed(false)
57 , m_weakFactory(this) 59 , m_weakFactory(this)
58 { 60 {
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 OwnPtr<MessagePortArray> portArray = adoptPtr(new MessagePortArray(channels- >size())); 235 OwnPtr<MessagePortArray> portArray = adoptPtr(new MessagePortArray(channels- >size()));
234 for (unsigned int i = 0; i < channels->size(); ++i) { 236 for (unsigned int i = 0; i < channels->size(); ++i) {
235 RefPtr<MessagePort> port = MessagePort::create(context); 237 RefPtr<MessagePort> port = MessagePort::create(context);
236 port->entangle((*channels)[i].release()); 238 port->entangle((*channels)[i].release());
237 (*portArray)[i] = port.release(); 239 (*portArray)[i] = port.release();
238 } 240 }
239 return portArray.release(); 241 return portArray.release();
240 } 242 }
241 243
242 } // namespace WebCore 244 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698