| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2008, 2010 Apple Inc. All Rights Reserved. | 2 * Copyright (C) 2008, 2010 Apple Inc. All Rights Reserved. |
| 3 * Copyright (C) 2009 Google Inc. All Rights Reserved. | 3 * Copyright (C) 2009 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 27 matching lines...) Expand all Loading... |
| 38 #include "core/workers/WorkerGlobalScopeProxy.h" | 38 #include "core/workers/WorkerGlobalScopeProxy.h" |
| 39 #include "core/workers/WorkerGlobalScopeProxyProvider.h" | 39 #include "core/workers/WorkerGlobalScopeProxyProvider.h" |
| 40 #include "core/workers/WorkerScriptLoader.h" | 40 #include "core/workers/WorkerScriptLoader.h" |
| 41 #include "core/workers/WorkerThread.h" | 41 #include "core/workers/WorkerThread.h" |
| 42 #include "wtf/MainThread.h" | 42 #include "wtf/MainThread.h" |
| 43 | 43 |
| 44 namespace blink { | 44 namespace blink { |
| 45 | 45 |
| 46 inline Worker::Worker(ExecutionContext* context) | 46 inline Worker::Worker(ExecutionContext* context) |
| 47 : AbstractWorker(context) | 47 : AbstractWorker(context) |
| 48 , m_contextProxy(0) | 48 , m_contextProxy(nullptr) |
| 49 { | 49 { |
| 50 } | 50 } |
| 51 | 51 |
| 52 PassRefPtrWillBeRawPtr<Worker> Worker::create(ExecutionContext* context, const S
tring& url, ExceptionState& exceptionState) | 52 PassRefPtrWillBeRawPtr<Worker> Worker::create(ExecutionContext* context, const S
tring& url, ExceptionState& exceptionState) |
| 53 { | 53 { |
| 54 ASSERT(isMainThread()); | 54 ASSERT(isMainThread()); |
| 55 Document* document = toDocument(context); | 55 Document* document = toDocument(context); |
| 56 UseCounter::count(context, UseCounter::WorkerStart); | 56 UseCounter::count(context, UseCounter::WorkerStart); |
| 57 if (!document->page()) { | 57 if (!document->page()) { |
| 58 exceptionState.throwDOMException(InvalidAccessError, "The context provid
ed is invalid."); | 58 exceptionState.throwDOMException(InvalidAccessError, "The context provid
ed is invalid."); |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 } | 135 } |
| 136 m_scriptLoader = nullptr; | 136 m_scriptLoader = nullptr; |
| 137 } | 137 } |
| 138 | 138 |
| 139 void Worker::trace(Visitor* visitor) | 139 void Worker::trace(Visitor* visitor) |
| 140 { | 140 { |
| 141 AbstractWorker::trace(visitor); | 141 AbstractWorker::trace(visitor); |
| 142 } | 142 } |
| 143 | 143 |
| 144 } // namespace blink | 144 } // namespace blink |
| OLD | NEW |