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 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
263 console_message->Message(), console_message->Location()); | 263 console_message->Message(), console_message->Location()); |
264 GetThread()->GetConsoleMessageStorage()->AddConsoleMessage(this, | 264 GetThread()->GetConsoleMessageStorage()->AddConsoleMessage(this, |
265 console_message); | 265 console_message); |
266 } | 266 } |
267 | 267 |
268 WorkerEventQueue* WorkerGlobalScope::GetEventQueue() const { | 268 WorkerEventQueue* WorkerGlobalScope::GetEventQueue() const { |
269 return event_queue_.Get(); | 269 return event_queue_.Get(); |
270 } | 270 } |
271 | 271 |
272 CoreProbeSink* WorkerGlobalScope::GetProbeSink() { | 272 CoreProbeSink* WorkerGlobalScope::GetProbeSink() { |
| 273 if (IsClosing()) |
| 274 return nullptr; |
273 if (WorkerInspectorController* controller = | 275 if (WorkerInspectorController* controller = |
274 GetThread()->GetWorkerInspectorController()) | 276 GetThread()->GetWorkerInspectorController()) |
275 return controller->GetProbeSink(); | 277 return controller->GetProbeSink(); |
276 return nullptr; | 278 return nullptr; |
277 } | 279 } |
278 | 280 |
279 bool WorkerGlobalScope::IsSecureContext(String& error_message) const { | 281 bool WorkerGlobalScope::IsSecureContext(String& error_message) const { |
280 // Until there are APIs that are available in workers and that | 282 // Until there are APIs that are available in workers and that |
281 // require a privileged context test that checks ancestors, just do | 283 // require a privileged context test that checks ancestors, just do |
282 // a simple check here. Once we have a need for a real | 284 // a simple check here. Once we have a need for a real |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
360 visitor->Trace(timers_); | 362 visitor->Trace(timers_); |
361 visitor->Trace(event_listeners_); | 363 visitor->Trace(event_listeners_); |
362 visitor->Trace(pending_error_events_); | 364 visitor->Trace(pending_error_events_); |
363 EventTargetWithInlineData::Trace(visitor); | 365 EventTargetWithInlineData::Trace(visitor); |
364 SecurityContext::Trace(visitor); | 366 SecurityContext::Trace(visitor); |
365 WorkerOrWorkletGlobalScope::Trace(visitor); | 367 WorkerOrWorkletGlobalScope::Trace(visitor); |
366 Supplementable<WorkerGlobalScope>::Trace(visitor); | 368 Supplementable<WorkerGlobalScope>::Trace(visitor); |
367 } | 369 } |
368 | 370 |
369 } // namespace blink | 371 } // namespace blink |
OLD | NEW |