OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. | 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. |
3 * Copyright (C) 2009, 2011 Google Inc. All Rights Reserved. | 3 * Copyright (C) 2009, 2011 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 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
257 bool WorkerGlobalScope::isContextThread() const | 257 bool WorkerGlobalScope::isContextThread() const |
258 { | 258 { |
259 return thread()->isCurrentThread(); | 259 return thread()->isCurrentThread(); |
260 } | 260 } |
261 | 261 |
262 bool WorkerGlobalScope::isJSExecutionForbidden() const | 262 bool WorkerGlobalScope::isJSExecutionForbidden() const |
263 { | 263 { |
264 return m_script->isExecutionForbidden(); | 264 return m_script->isExecutionForbidden(); |
265 } | 265 } |
266 | 266 |
267 EventTargetData* WorkerGlobalScope::eventTargetData() | |
268 { | |
269 return &m_eventTargetData; | |
270 } | |
271 | |
272 EventTargetData* WorkerGlobalScope::ensureEventTargetData() | |
273 { | |
274 return &m_eventTargetData; | |
275 } | |
276 | |
277 WorkerGlobalScope::Observer::Observer(WorkerGlobalScope* context) | 267 WorkerGlobalScope::Observer::Observer(WorkerGlobalScope* context) |
278 : m_context(context) | 268 : m_context(context) |
279 { | 269 { |
280 ASSERT(m_context && m_context->isContextThread()); | 270 ASSERT(m_context && m_context->isContextThread()); |
281 m_context->registerObserver(this); | 271 m_context->registerObserver(this); |
282 } | 272 } |
283 | 273 |
284 WorkerGlobalScope::Observer::~Observer() | 274 WorkerGlobalScope::Observer::~Observer() |
285 { | 275 { |
286 if (!m_context) | 276 if (!m_context) |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
325 { | 315 { |
326 return script()->idleNotification(); | 316 return script()->idleNotification(); |
327 } | 317 } |
328 | 318 |
329 WorkerEventQueue* WorkerGlobalScope::eventQueue() const | 319 WorkerEventQueue* WorkerGlobalScope::eventQueue() const |
330 { | 320 { |
331 return m_eventQueue.get(); | 321 return m_eventQueue.get(); |
332 } | 322 } |
333 | 323 |
334 } // namespace WebCore | 324 } // namespace WebCore |
OLD | NEW |