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

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

Issue 14949017: Implementation of W3C compliant CSP script-src nonce. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 7 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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 if (!scriptURL.isValid()) { 70 if (!scriptURL.isValid()) {
71 ec = SYNTAX_ERR; 71 ec = SYNTAX_ERR;
72 return KURL(); 72 return KURL();
73 } 73 }
74 74
75 if (!scriptExecutionContext()->securityOrigin()->canRequest(scriptURL)) { 75 if (!scriptExecutionContext()->securityOrigin()->canRequest(scriptURL)) {
76 ec = SECURITY_ERR; 76 ec = SECURITY_ERR;
77 return KURL(); 77 return KURL();
78 } 78 }
79 79
80 if (scriptExecutionContext()->contentSecurityPolicy() && !scriptExecutionCon text()->contentSecurityPolicy()->allowScriptFromSource(scriptURL)) { 80 if (scriptExecutionContext()->contentSecurityPolicy() && !scriptExecutionCon text()->contentSecurityPolicy()->allowScriptFromSource(scriptURL, String())) {
81 ec = SECURITY_ERR; 81 ec = SECURITY_ERR;
82 return KURL(); 82 return KURL();
83 } 83 }
84 84
85 return scriptURL; 85 return scriptURL;
86 } 86 }
87 87
88 EventTargetData* AbstractWorker::eventTargetData() 88 EventTargetData* AbstractWorker::eventTargetData()
89 { 89 {
90 return &m_eventTargetData; 90 return &m_eventTargetData;
91 } 91 }
92 92
93 EventTargetData* AbstractWorker::ensureEventTargetData() 93 EventTargetData* AbstractWorker::ensureEventTargetData()
94 { 94 {
95 return &m_eventTargetData; 95 return &m_eventTargetData;
96 } 96 }
97 97
98 } // namespace WebCore 98 } // namespace WebCore
OLDNEW
« Source/core/page/DOMSecurityPolicy.cpp ('K') | « Source/core/page/DOMSecurityPolicy.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698