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

Unified Diff: Source/WebKit/chromium/src/SharedWorkerRepository.cpp

Issue 17885002: Use toDocument instead of static_cast<Document*>. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: Source/WebKit/chromium/src/SharedWorkerRepository.cpp
diff --git a/Source/WebKit/chromium/src/SharedWorkerRepository.cpp b/Source/WebKit/chromium/src/SharedWorkerRepository.cpp
index 9d8a832381add59cc621fc5582cf5715db8473fb..5661ea0d6a5955303e5168309394d98e69329de3 100644
--- a/Source/WebKit/chromium/src/SharedWorkerRepository.cpp
+++ b/Source/WebKit/chromium/src/SharedWorkerRepository.cpp
@@ -227,7 +227,7 @@ void SharedWorkerRepository::connect(PassRefPtr<SharedWorker> worker, PassOwnPtr
// No nested workers (for now) - connect() should only be called from document context.
ASSERT(worker->scriptExecutionContext()->isDocument());
- Document* document = static_cast<Document*>(worker->scriptExecutionContext());
+ Document* document = toDocument(worker->scriptExecutionContext());
WebFrameImpl* webFrame = WebFrameImpl::fromFrame(document->frame());
OwnPtr<WebSharedWorker> webWorker;
webWorker = adoptPtr(webFrame->client()->createSharedWorker(webFrame, url, name, getId(document)));
« no previous file with comments | « Source/WebKit/chromium/src/LocalFileSystemChromium.cpp ('k') | Source/WebKit/chromium/src/StorageQuotaChromium.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698