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

Side by Side Diff: Source/core/workers/Worker.cpp

Issue 26890003: Remove ThreadLocalEventNames (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix build Created 7 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/workers/SharedWorkerGlobalScope.cpp ('k') | Source/core/xml/XMLHttpRequest.cpp » ('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, 2010 Apple Inc. All Rights Reserved. 2 * Copyright (C) 2008, 2010 Apple Inc. All Rights Reserved.
3 * Copyright (C) 2009 Google Inc. All Rights Reserved. 3 * Copyright (C) 2009 Google Inc. All Rights Reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 75
76 Worker::~Worker() 76 Worker::~Worker()
77 { 77 {
78 ASSERT(isMainThread()); 78 ASSERT(isMainThread());
79 ASSERT(executionContext()); // The context is protected by worker context pr oxy, so it cannot be destroyed while a Worker exists. 79 ASSERT(executionContext()); // The context is protected by worker context pr oxy, so it cannot be destroyed while a Worker exists.
80 m_contextProxy->workerObjectDestroyed(); 80 m_contextProxy->workerObjectDestroyed();
81 } 81 }
82 82
83 const AtomicString& Worker::interfaceName() const 83 const AtomicString& Worker::interfaceName() const
84 { 84 {
85 return eventNames().interfaceForWorker; 85 return EventTargetNames::Worker;
86 } 86 }
87 87
88 void Worker::postMessage(PassRefPtr<SerializedScriptValue> message, const Messag ePortArray* ports, ExceptionState& es) 88 void Worker::postMessage(PassRefPtr<SerializedScriptValue> message, const Messag ePortArray* ports, ExceptionState& es)
89 { 89 {
90 // Disentangle the port in preparation for sending it to the remote context. 90 // Disentangle the port in preparation for sending it to the remote context.
91 OwnPtr<MessagePortChannelArray> channels = MessagePort::disentanglePorts(por ts, es); 91 OwnPtr<MessagePortChannelArray> channels = MessagePort::disentanglePorts(por ts, es);
92 if (es.hadException()) 92 if (es.hadException())
93 return; 93 return;
94 m_contextProxy->postMessageToWorkerGlobalScope(message, channels.release()); 94 m_contextProxy->postMessageToWorkerGlobalScope(message, channels.release());
95 } 95 }
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 startMode = PauseWorkerGlobalScopeOnStart; 130 startMode = PauseWorkerGlobalScopeOnStart;
131 m_contextProxy->startWorkerGlobalScope(m_scriptLoader->url(), executionC ontext()->client()->userAgent(m_scriptLoader->url()), m_scriptLoader->script(), startMode); 131 m_contextProxy->startWorkerGlobalScope(m_scriptLoader->url(), executionC ontext()->client()->userAgent(m_scriptLoader->url()), m_scriptLoader->script(), startMode);
132 InspectorInstrumentation::scriptImported(executionContext(), m_scriptLoa der->identifier(), m_scriptLoader->script()); 132 InspectorInstrumentation::scriptImported(executionContext(), m_scriptLoa der->identifier(), m_scriptLoader->script());
133 } 133 }
134 m_scriptLoader = nullptr; 134 m_scriptLoader = nullptr;
135 135
136 unsetPendingActivity(this); 136 unsetPendingActivity(this);
137 } 137 }
138 138
139 } // namespace WebCore 139 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/workers/SharedWorkerGlobalScope.cpp ('k') | Source/core/xml/XMLHttpRequest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698