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 341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
352 return m_messageStorage.get(); | 352 return m_messageStorage.get(); |
353 } | 353 } |
354 | 354 |
355 void WorkerGlobalScope::exceptionHandled(int exceptionId, bool isHandled) | 355 void WorkerGlobalScope::exceptionHandled(int exceptionId, bool isHandled) |
356 { | 356 { |
357 RefPtrWillBeRawPtr<ConsoleMessage> consoleMessage = m_pendingMessages.take(e
xceptionId); | 357 RefPtrWillBeRawPtr<ConsoleMessage> consoleMessage = m_pendingMessages.take(e
xceptionId); |
358 if (!isHandled) | 358 if (!isHandled) |
359 addConsoleMessage(consoleMessage.release()); | 359 addConsoleMessage(consoleMessage.release()); |
360 } | 360 } |
361 | 361 |
362 bool WorkerGlobalScope::isPrivilegedContext(String& errorMessage, const Privileg
eContextCheck privilegeContextCheck) const | 362 bool WorkerGlobalScope::isSecureContext(String& errorMessage, const SecureContex
tCheck privilegeContextCheck) const |
363 { | 363 { |
364 // Until there are APIs that are available in workers and that | 364 // Until there are APIs that are available in workers and that |
365 // require a privileged context test that checks ancestors, just do | 365 // require a privileged context test that checks ancestors, just do |
366 // a simple check here. Once we have a need for a real | 366 // a simple check here. Once we have a need for a real |
367 // |isPrivilegedContext| check here, we can check the responsible | 367 // |isSecureContext| check here, we can check the responsible |
368 // document for a privileged context at worker creation time, pass | 368 // document for a privileged context at worker creation time, pass |
369 // it in via WorkerThreadStartupData, and check it here. | 369 // it in via WorkerThreadStartupData, and check it here. |
370 return securityOrigin()->isPotentiallyTrustworthy(errorMessage); | 370 return securityOrigin()->isPotentiallyTrustworthy(errorMessage); |
371 } | 371 } |
372 | 372 |
373 void WorkerGlobalScope::removeURLFromMemoryCache(const KURL& url) | 373 void WorkerGlobalScope::removeURLFromMemoryCache(const KURL& url) |
374 { | 374 { |
375 m_thread->workerLoaderProxy()->postTaskToLoader(createCrossThreadTask(&Worke
rGlobalScope::removeURLFromMemoryCacheInternal, url)); | 375 m_thread->workerLoaderProxy()->postTaskToLoader(createCrossThreadTask(&Worke
rGlobalScope::removeURLFromMemoryCacheInternal, url)); |
376 } | 376 } |
377 | 377 |
(...skipping 30 matching lines...) Expand all Loading... |
408 visitor->trace(m_messageStorage); | 408 visitor->trace(m_messageStorage); |
409 visitor->trace(m_pendingMessages); | 409 visitor->trace(m_pendingMessages); |
410 HeapSupplementable<WorkerGlobalScope>::trace(visitor); | 410 HeapSupplementable<WorkerGlobalScope>::trace(visitor); |
411 #endif | 411 #endif |
412 ExecutionContext::trace(visitor); | 412 ExecutionContext::trace(visitor); |
413 EventTargetWithInlineData::trace(visitor); | 413 EventTargetWithInlineData::trace(visitor); |
414 SecurityContext::trace(visitor); | 414 SecurityContext::trace(visitor); |
415 } | 415 } |
416 | 416 |
417 } // namespace blink | 417 } // namespace blink |
OLD | NEW |