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

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

Issue 13687007: Remove PLATFORM(BLACKBERRY) support. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 8 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
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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 worker->suspendIfNeeded(); 67 worker->suspendIfNeeded();
68 68
69 KURL scriptURL = worker->resolveURL(url, ec); 69 KURL scriptURL = worker->resolveURL(url, ec);
70 if (scriptURL.isEmpty()) 70 if (scriptURL.isEmpty())
71 return 0; 71 return 0;
72 72
73 // The worker context does not exist while loading, so we must ensure that t he worker object is not collected, nor are its event listeners. 73 // The worker context does not exist while loading, so we must ensure that t he worker object is not collected, nor are its event listeners.
74 worker->setPendingActivity(worker.get()); 74 worker->setPendingActivity(worker.get());
75 75
76 worker->m_scriptLoader = WorkerScriptLoader::create(); 76 worker->m_scriptLoader = WorkerScriptLoader::create();
77 #if PLATFORM(BLACKBERRY)
78 worker->m_scriptLoader->setTargetType(ResourceRequest::TargetIsWorker);
79 #endif
80 worker->m_scriptLoader->loadAsynchronously(context, scriptURL, DenyCrossOrig inRequests, worker.get()); 77 worker->m_scriptLoader->loadAsynchronously(context, scriptURL, DenyCrossOrig inRequests, worker.get());
81 78
82 return worker.release(); 79 return worker.release();
83 } 80 }
84 81
85 Worker::~Worker() 82 Worker::~Worker()
86 { 83 {
87 ASSERT(isMainThread()); 84 ASSERT(isMainThread());
88 ASSERT(scriptExecutionContext()); // The context is protected by worker cont ext proxy, so it cannot be destroyed while a Worker exists. 85 ASSERT(scriptExecutionContext()); // The context is protected by worker cont ext proxy, so it cannot be destroyed while a Worker exists.
89 m_contextProxy->workerObjectDestroyed(); 86 m_contextProxy->workerObjectDestroyed();
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 InspectorInstrumentation::scriptImported(scriptExecutionContext(), m_scr iptLoader->identifier(), m_scriptLoader->script()); 146 InspectorInstrumentation::scriptImported(scriptExecutionContext(), m_scr iptLoader->identifier(), m_scriptLoader->script());
150 } 147 }
151 m_scriptLoader = nullptr; 148 m_scriptLoader = nullptr;
152 149
153 unsetPendingActivity(this); 150 unsetPendingActivity(this);
154 } 151 }
155 152
156 } // namespace WebCore 153 } // namespace WebCore
157 154
158 #endif // ENABLE(WORKERS) 155 #endif // ENABLE(WORKERS)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698