| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
| 3 * Copyright (C) 2010 Apple Inc. All rights reserved. | 3 * Copyright (C) 2010 Apple 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 are | 6 * modification, are permitted provided that the following conditions are |
| 7 * met: | 7 * met: |
| 8 * | 8 * |
| 9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 #include "core/workers/SharedWorkerRepositoryClient.h" | 45 #include "core/workers/SharedWorkerRepositoryClient.h" |
| 46 #include "platform/weborigin/KURL.h" | 46 #include "platform/weborigin/KURL.h" |
| 47 #include "platform/weborigin/SecurityOrigin.h" | 47 #include "platform/weborigin/SecurityOrigin.h" |
| 48 | 48 |
| 49 namespace blink { | 49 namespace blink { |
| 50 | 50 |
| 51 inline SharedWorker::SharedWorker(ExecutionContext* context) | 51 inline SharedWorker::SharedWorker(ExecutionContext* context) |
| 52 : AbstractWorker(context) | 52 : AbstractWorker(context) |
| 53 , m_isBeingConnected(false) | 53 , m_isBeingConnected(false) |
| 54 { | 54 { |
| 55 ScriptWrappable::init(this); | |
| 56 } | 55 } |
| 57 | 56 |
| 58 PassRefPtrWillBeRawPtr<SharedWorker> SharedWorker::create(ExecutionContext* cont
ext, const String& url, const String& name, ExceptionState& exceptionState) | 57 PassRefPtrWillBeRawPtr<SharedWorker> SharedWorker::create(ExecutionContext* cont
ext, const String& url, const String& name, ExceptionState& exceptionState) |
| 59 { | 58 { |
| 60 ASSERT(isMainThread()); | 59 ASSERT(isMainThread()); |
| 61 ASSERT_WITH_SECURITY_IMPLICATION(context->isDocument()); | 60 ASSERT_WITH_SECURITY_IMPLICATION(context->isDocument()); |
| 62 | 61 |
| 63 UseCounter::count(context, UseCounter::SharedWorkerStart); | 62 UseCounter::count(context, UseCounter::SharedWorkerStart); |
| 64 | 63 |
| 65 RefPtrWillBeRawPtr<SharedWorker> worker = adoptRefWillBeNoop(new SharedWorke
r(context)); | 64 RefPtrWillBeRawPtr<SharedWorker> worker = adoptRefWillBeNoop(new SharedWorke
r(context)); |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 } | 102 } |
| 104 | 103 |
| 105 void SharedWorker::trace(Visitor* visitor) | 104 void SharedWorker::trace(Visitor* visitor) |
| 106 { | 105 { |
| 107 visitor->trace(m_port); | 106 visitor->trace(m_port); |
| 108 AbstractWorker::trace(visitor); | 107 AbstractWorker::trace(visitor); |
| 109 WillBeHeapSupplementable<SharedWorker>::trace(visitor); | 108 WillBeHeapSupplementable<SharedWorker>::trace(visitor); |
| 110 } | 109 } |
| 111 | 110 |
| 112 } // namespace blink | 111 } // namespace blink |
| OLD | NEW |