| 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 21 matching lines...) Expand all Loading... |
| 32 #include "bindings/core/v8/SourceLocation.h" | 32 #include "bindings/core/v8/SourceLocation.h" |
| 33 #include "bindings/core/v8/V8AbstractEventListener.h" | 33 #include "bindings/core/v8/V8AbstractEventListener.h" |
| 34 #include "core/dom/ContextLifecycleNotifier.h" | 34 #include "core/dom/ContextLifecycleNotifier.h" |
| 35 #include "core/dom/ExceptionCode.h" | 35 #include "core/dom/ExceptionCode.h" |
| 36 #include "core/dom/SuspendableObject.h" | 36 #include "core/dom/SuspendableObject.h" |
| 37 #include "core/events/ErrorEvent.h" | 37 #include "core/events/ErrorEvent.h" |
| 38 #include "core/events/Event.h" | 38 #include "core/events/Event.h" |
| 39 #include "core/frame/DOMTimerCoordinator.h" | 39 #include "core/frame/DOMTimerCoordinator.h" |
| 40 #include "core/inspector/ConsoleMessage.h" | 40 #include "core/inspector/ConsoleMessage.h" |
| 41 #include "core/inspector/ConsoleMessageStorage.h" | 41 #include "core/inspector/ConsoleMessageStorage.h" |
| 42 #include "core/inspector/WorkerInspectorController.h" |
| 42 #include "core/inspector/WorkerThreadDebugger.h" | 43 #include "core/inspector/WorkerThreadDebugger.h" |
| 43 #include "core/loader/WorkerFetchContext.h" | 44 #include "core/loader/WorkerFetchContext.h" |
| 44 #include "core/loader/WorkerThreadableLoader.h" | 45 #include "core/loader/WorkerThreadableLoader.h" |
| 45 #include "core/probe/CoreProbes.h" | 46 #include "core/probe/CoreProbes.h" |
| 46 #include "core/workers/WorkerClients.h" | 47 #include "core/workers/WorkerClients.h" |
| 47 #include "core/workers/WorkerLoaderProxy.h" | 48 #include "core/workers/WorkerLoaderProxy.h" |
| 48 #include "core/workers/WorkerLocation.h" | 49 #include "core/workers/WorkerLocation.h" |
| 49 #include "core/workers/WorkerNavigator.h" | 50 #include "core/workers/WorkerNavigator.h" |
| 50 #include "core/workers/WorkerReportingProxy.h" | 51 #include "core/workers/WorkerReportingProxy.h" |
| 51 #include "core/workers/WorkerScriptLoader.h" | 52 #include "core/workers/WorkerScriptLoader.h" |
| (...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 276 console_message->Source(), console_message->Level(), | 277 console_message->Source(), console_message->Level(), |
| 277 console_message->Message(), console_message->Location()); | 278 console_message->Message(), console_message->Location()); |
| 278 GetThread()->GetConsoleMessageStorage()->AddConsoleMessage(this, | 279 GetThread()->GetConsoleMessageStorage()->AddConsoleMessage(this, |
| 279 console_message); | 280 console_message); |
| 280 } | 281 } |
| 281 | 282 |
| 282 WorkerEventQueue* WorkerGlobalScope::GetEventQueue() const { | 283 WorkerEventQueue* WorkerGlobalScope::GetEventQueue() const { |
| 283 return event_queue_.Get(); | 284 return event_queue_.Get(); |
| 284 } | 285 } |
| 285 | 286 |
| 287 CoreProbeSink* WorkerGlobalScope::GetProbeSink() { |
| 288 if (WorkerInspectorController* controller = |
| 289 GetThread()->GetWorkerInspectorController()) |
| 290 return controller->InstrumentingAgents(); |
| 291 return nullptr; |
| 292 } |
| 293 |
| 286 bool WorkerGlobalScope::IsSecureContext(String& error_message) const { | 294 bool WorkerGlobalScope::IsSecureContext(String& error_message) const { |
| 287 // Until there are APIs that are available in workers and that | 295 // Until there are APIs that are available in workers and that |
| 288 // require a privileged context test that checks ancestors, just do | 296 // require a privileged context test that checks ancestors, just do |
| 289 // a simple check here. Once we have a need for a real | 297 // a simple check here. Once we have a need for a real |
| 290 // |isSecureContext| check here, we can check the responsible | 298 // |isSecureContext| check here, we can check the responsible |
| 291 // document for a privileged context at worker creation time, pass | 299 // document for a privileged context at worker creation time, pass |
| 292 // it in via WorkerThreadStartupData, and check it here. | 300 // it in via WorkerThreadStartupData, and check it here. |
| 293 if (GetSecurityOrigin()->IsPotentiallyTrustworthy()) | 301 if (GetSecurityOrigin()->IsPotentiallyTrustworthy()) |
| 294 return true; | 302 return true; |
| 295 error_message = GetSecurityOrigin()->IsPotentiallyTrustworthyErrorMessage(); | 303 error_message = GetSecurityOrigin()->IsPotentiallyTrustworthyErrorMessage(); |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 384 visitor->Trace(event_listeners_); | 392 visitor->Trace(event_listeners_); |
| 385 visitor->Trace(pending_error_events_); | 393 visitor->Trace(pending_error_events_); |
| 386 visitor->Trace(fetch_context_); | 394 visitor->Trace(fetch_context_); |
| 387 ExecutionContext::Trace(visitor); | 395 ExecutionContext::Trace(visitor); |
| 388 EventTargetWithInlineData::Trace(visitor); | 396 EventTargetWithInlineData::Trace(visitor); |
| 389 SecurityContext::Trace(visitor); | 397 SecurityContext::Trace(visitor); |
| 390 Supplementable<WorkerGlobalScope>::Trace(visitor); | 398 Supplementable<WorkerGlobalScope>::Trace(visitor); |
| 391 } | 399 } |
| 392 | 400 |
| 393 } // namespace blink | 401 } // namespace blink |
| OLD | NEW |