Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(219)

Side by Side Diff: Source/core/workers/Worker.cpp

Issue 540283003: bindings: Retires ScriptWrappable::init, etc. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Addressed a review comment. Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/workers/SharedWorkerGlobalScope.cpp ('k') | Source/core/workers/WorkerConsole.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 29 matching lines...) Expand all
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(0)
49 { 49 {
50 ScriptWrappable::init(this);
51 } 50 }
52 51
53 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)
54 { 53 {
55 ASSERT(isMainThread()); 54 ASSERT(isMainThread());
56 Document* document = toDocument(context); 55 Document* document = toDocument(context);
57 UseCounter::count(context, UseCounter::WorkerStart); 56 UseCounter::count(context, UseCounter::WorkerStart);
58 if (!document->page()) { 57 if (!document->page()) {
59 exceptionState.throwDOMException(InvalidAccessError, "The context provid ed is invalid."); 58 exceptionState.throwDOMException(InvalidAccessError, "The context provid ed is invalid.");
60 return nullptr; 59 return nullptr;
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 } 135 }
137 m_scriptLoader = nullptr; 136 m_scriptLoader = nullptr;
138 } 137 }
139 138
140 void Worker::trace(Visitor* visitor) 139 void Worker::trace(Visitor* visitor)
141 { 140 {
142 AbstractWorker::trace(visitor); 141 AbstractWorker::trace(visitor);
143 } 142 }
144 143
145 } // namespace blink 144 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/workers/SharedWorkerGlobalScope.cpp ('k') | Source/core/workers/WorkerConsole.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698