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 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
276 console_message->Source(), console_message->Level(), | 276 console_message->Source(), console_message->Level(), |
277 console_message->Message(), console_message->Location()); | 277 console_message->Message(), console_message->Location()); |
278 GetThread()->GetConsoleMessageStorage()->AddConsoleMessage(this, | 278 GetThread()->GetConsoleMessageStorage()->AddConsoleMessage(this, |
279 console_message); | 279 console_message); |
280 } | 280 } |
281 | 281 |
282 WorkerEventQueue* WorkerGlobalScope::GetEventQueue() const { | 282 WorkerEventQueue* WorkerGlobalScope::GetEventQueue() const { |
283 return event_queue_.Get(); | 283 return event_queue_.Get(); |
284 } | 284 } |
285 | 285 |
286 bool WorkerGlobalScope::IsSecureContext( | 286 bool WorkerGlobalScope::IsSecureContext(String& error_message) const { |
287 String& error_message, | |
288 const SecureContextCheck privilege_context_check) const { | |
289 // Until there are APIs that are available in workers and that | 287 // Until there are APIs that are available in workers and that |
290 // require a privileged context test that checks ancestors, just do | 288 // require a privileged context test that checks ancestors, just do |
291 // a simple check here. Once we have a need for a real | 289 // a simple check here. Once we have a need for a real |
292 // |isSecureContext| check here, we can check the responsible | 290 // |isSecureContext| check here, we can check the responsible |
293 // document for a privileged context at worker creation time, pass | 291 // document for a privileged context at worker creation time, pass |
294 // it in via WorkerThreadStartupData, and check it here. | 292 // it in via WorkerThreadStartupData, and check it here. |
295 if (GetSecurityOrigin()->IsPotentiallyTrustworthy()) | 293 if (GetSecurityOrigin()->IsPotentiallyTrustworthy()) |
296 return true; | 294 return true; |
297 error_message = GetSecurityOrigin()->IsPotentiallyTrustworthyErrorMessage(); | 295 error_message = GetSecurityOrigin()->IsPotentiallyTrustworthyErrorMessage(); |
298 return false; | 296 return false; |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
386 visitor->Trace(event_listeners_); | 384 visitor->Trace(event_listeners_); |
387 visitor->Trace(pending_error_events_); | 385 visitor->Trace(pending_error_events_); |
388 visitor->Trace(fetch_context_); | 386 visitor->Trace(fetch_context_); |
389 ExecutionContext::Trace(visitor); | 387 ExecutionContext::Trace(visitor); |
390 EventTargetWithInlineData::Trace(visitor); | 388 EventTargetWithInlineData::Trace(visitor); |
391 SecurityContext::Trace(visitor); | 389 SecurityContext::Trace(visitor); |
392 Supplementable<WorkerGlobalScope>::Trace(visitor); | 390 Supplementable<WorkerGlobalScope>::Trace(visitor); |
393 } | 391 } |
394 | 392 |
395 } // namespace blink | 393 } // namespace blink |
OLD | NEW |