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

Side by Side Diff: third_party/WebKit/Source/core/workers/DedicatedWorkerGlobalScope.cpp

Issue 1893983002: Simplify handling of Transferable objects while (de)serializing. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove Transferable.cpp, not needed after all. Created 4 years, 8 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) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google 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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 59
60 DedicatedWorkerGlobalScope::~DedicatedWorkerGlobalScope() 60 DedicatedWorkerGlobalScope::~DedicatedWorkerGlobalScope()
61 { 61 {
62 } 62 }
63 63
64 const AtomicString& DedicatedWorkerGlobalScope::interfaceName() const 64 const AtomicString& DedicatedWorkerGlobalScope::interfaceName() const
65 { 65 {
66 return EventTargetNames::DedicatedWorkerGlobalScope; 66 return EventTargetNames::DedicatedWorkerGlobalScope;
67 } 67 }
68 68
69 void DedicatedWorkerGlobalScope::postMessage(ExecutionContext* context, PassRefP tr<SerializedScriptValue> message, const MessagePortArray* ports, ExceptionState & exceptionState) 69 void DedicatedWorkerGlobalScope::postMessage(ExecutionContext* context, PassRefP tr<SerializedScriptValue> message, const MessagePortArray& ports, ExceptionState & exceptionState)
70 { 70 {
71 // Disentangle the port in preparation for sending it to the remote context. 71 // Disentangle the port in preparation for sending it to the remote context.
72 OwnPtr<MessagePortChannelArray> channels = MessagePort::disentanglePorts(con text, ports, exceptionState); 72 OwnPtr<MessagePortChannelArray> channels = MessagePort::disentanglePorts(con text, ports, exceptionState);
73 if (exceptionState.hadException()) 73 if (exceptionState.hadException())
74 return; 74 return;
75 thread()->workerObjectProxy().postMessageToWorkerObject(message, channels.re lease()); 75 thread()->workerObjectProxy().postMessageToWorkerObject(message, channels.re lease());
76 } 76 }
77 77
78 DedicatedWorkerThread* DedicatedWorkerGlobalScope::thread() const 78 DedicatedWorkerThread* DedicatedWorkerGlobalScope::thread() const
79 { 79 {
(...skipping 21 matching lines...) Expand all
101 { 101 {
102 thread()->workerObjectProxy().postTaskToMainExecutionContext(createCrossThre adTask(&countDeprecationOnDocument, feature)); 102 thread()->workerObjectProxy().postTaskToMainExecutionContext(createCrossThre adTask(&countDeprecationOnDocument, feature));
103 } 103 }
104 104
105 DEFINE_TRACE(DedicatedWorkerGlobalScope) 105 DEFINE_TRACE(DedicatedWorkerGlobalScope)
106 { 106 {
107 WorkerGlobalScope::trace(visitor); 107 WorkerGlobalScope::trace(visitor);
108 } 108 }
109 109
110 } // namespace blink 110 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698