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

Side by Side Diff: third_party/WebKit/Source/core/workers/AbstractWorker.cpp

Issue 2387983002: Worker: Reflow comments in worker components (Closed)
Patch Set: manually tweak Created 4 years, 2 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * 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 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 ExceptionState& exceptionState, 47 ExceptionState& exceptionState,
48 WebURLRequest::RequestContext requestContext) { 48 WebURLRequest::RequestContext requestContext) {
49 // FIXME: This should use the dynamic global scope (bug #27887) 49 // FIXME: This should use the dynamic global scope (bug #27887)
50 KURL scriptURL = getExecutionContext()->completeURL(url); 50 KURL scriptURL = getExecutionContext()->completeURL(url);
51 if (!scriptURL.isValid()) { 51 if (!scriptURL.isValid()) {
52 exceptionState.throwDOMException(SyntaxError, 52 exceptionState.throwDOMException(SyntaxError,
53 "'" + url + "' is not a valid URL."); 53 "'" + url + "' is not a valid URL.");
54 return KURL(); 54 return KURL();
55 } 55 }
56 56
57 // We can safely expose the URL in the following exceptions, as these checks h appen synchronously before redirection. JavaScript receives no new information. 57 // We can safely expose the URL in the following exceptions, as these checks
58 // happen synchronously before redirection. JavaScript receives no new
59 // information.
58 if (!getExecutionContext()->getSecurityOrigin()->canRequestNoSuborigin( 60 if (!getExecutionContext()->getSecurityOrigin()->canRequestNoSuborigin(
59 scriptURL)) { 61 scriptURL)) {
60 exceptionState.throwSecurityError( 62 exceptionState.throwSecurityError(
61 "Script at '" + scriptURL.elidedString() + 63 "Script at '" + scriptURL.elidedString() +
62 "' cannot be accessed from origin '" + 64 "' cannot be accessed from origin '" +
63 getExecutionContext()->getSecurityOrigin()->toString() + "'."); 65 getExecutionContext()->getSecurityOrigin()->toString() + "'.");
64 return KURL(); 66 return KURL();
65 } 67 }
66 68
67 if (getExecutionContext()->contentSecurityPolicy() && 69 if (getExecutionContext()->contentSecurityPolicy() &&
(...skipping 11 matching lines...) Expand all
79 81
80 return scriptURL; 82 return scriptURL;
81 } 83 }
82 84
83 DEFINE_TRACE(AbstractWorker) { 85 DEFINE_TRACE(AbstractWorker) {
84 EventTargetWithInlineData::trace(visitor); 86 EventTargetWithInlineData::trace(visitor);
85 ActiveDOMObject::trace(visitor); 87 ActiveDOMObject::trace(visitor);
86 } 88 }
87 89
88 } // namespace blink 90 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/workers/AbstractWorker.h ('k') | third_party/WebKit/Source/core/workers/InProcessWorkerBase.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698