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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 , m_eventQueue(WorkerEventQueue::create(this)) | 79 , m_eventQueue(WorkerEventQueue::create(this)) |
80 , m_workerClients(workerClients) | 80 , m_workerClients(workerClients) |
81 , m_timeOrigin(timeOrigin) | 81 , m_timeOrigin(timeOrigin) |
82 , m_messageStorage(ConsoleMessageStorage::create()) | 82 , m_messageStorage(ConsoleMessageStorage::create()) |
83 , m_workerExceptionUniqueIdentifier(0) | 83 , m_workerExceptionUniqueIdentifier(0) |
84 { | 84 { |
85 setSecurityOrigin(SecurityOrigin::create(url)); | 85 setSecurityOrigin(SecurityOrigin::create(url)); |
86 if (starterOrigin) | 86 if (starterOrigin) |
87 securityOrigin()->transferPrivilegesFrom(*starterOrigin); | 87 securityOrigin()->transferPrivilegesFrom(*starterOrigin); |
88 | 88 |
89 m_workerClients->reattachThread(); | 89 if (m_workerClients) |
| 90 m_workerClients->reattachThread(); |
| 91 |
90 m_thread->setWorkerInspectorController(m_workerInspectorController.get()); | 92 m_thread->setWorkerInspectorController(m_workerInspectorController.get()); |
91 } | 93 } |
92 | 94 |
93 WorkerGlobalScope::~WorkerGlobalScope() | 95 WorkerGlobalScope::~WorkerGlobalScope() |
94 { | 96 { |
95 ASSERT(!m_script); | 97 ASSERT(!m_script); |
96 ASSERT(!m_workerInspectorController); | 98 ASSERT(!m_workerInspectorController); |
97 } | 99 } |
98 | 100 |
99 void WorkerGlobalScope::applyContentSecurityPolicyFromVector(const Vector<CSPHea
derAndType>& headers) | 101 void WorkerGlobalScope::applyContentSecurityPolicyFromVector(const Vector<CSPHea
derAndType>& headers) |
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
394 visitor->trace(m_timers); | 396 visitor->trace(m_timers); |
395 visitor->trace(m_messageStorage); | 397 visitor->trace(m_messageStorage); |
396 visitor->trace(m_pendingMessages); | 398 visitor->trace(m_pendingMessages); |
397 HeapSupplementable<WorkerGlobalScope>::trace(visitor); | 399 HeapSupplementable<WorkerGlobalScope>::trace(visitor); |
398 #endif | 400 #endif |
399 ExecutionContext::trace(visitor); | 401 ExecutionContext::trace(visitor); |
400 EventTargetWithInlineData::trace(visitor); | 402 EventTargetWithInlineData::trace(visitor); |
401 } | 403 } |
402 | 404 |
403 } // namespace blink | 405 } // namespace blink |
OLD | NEW |