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

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

Issue 18548003: Rename ExceptionCode constants to use the names in the spec (2/3) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 5 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/AbstractWorker.cpp ('k') | Source/core/workers/WorkerGlobalScope.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) 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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 worker->suspendIfNeeded(); 66 worker->suspendIfNeeded();
67 67
68 KURL scriptURL = worker->resolveURL(url, ec); 68 KURL scriptURL = worker->resolveURL(url, ec);
69 if (scriptURL.isEmpty()) 69 if (scriptURL.isEmpty())
70 return 0; 70 return 0;
71 71
72 // We don't currently support nested workers, so workers can only be created from documents. 72 // We don't currently support nested workers, so workers can only be created from documents.
73 ASSERT_WITH_SECURITY_IMPLICATION(context->isDocument()); 73 ASSERT_WITH_SECURITY_IMPLICATION(context->isDocument());
74 Document* document = toDocument(context); 74 Document* document = toDocument(context);
75 if (!document->securityOrigin()->canAccessSharedWorkers(document->topOrigin( ))) { 75 if (!document->securityOrigin()->canAccessSharedWorkers(document->topOrigin( ))) {
76 ec = SECURITY_ERR; 76 ec = SecurityError;
77 return 0; 77 return 0;
78 } 78 }
79 79
80 SharedWorkerRepository::connect(worker.get(), remotePort.release(), scriptUR L, name, ec); 80 SharedWorkerRepository::connect(worker.get(), remotePort.release(), scriptUR L, name, ec);
81 81
82 return worker.release(); 82 return worker.release();
83 } 83 }
84 84
85 SharedWorker::~SharedWorker() 85 SharedWorker::~SharedWorker()
86 { 86 {
87 } 87 }
88 88
89 const AtomicString& SharedWorker::interfaceName() const 89 const AtomicString& SharedWorker::interfaceName() const
90 { 90 {
91 return eventNames().interfaceForSharedWorker; 91 return eventNames().interfaceForSharedWorker;
92 } 92 }
93 93
94 } // namespace WebCore 94 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/workers/AbstractWorker.cpp ('k') | Source/core/workers/WorkerGlobalScope.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698