OLD | NEW |
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 Loading... |
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, false)) { |
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 |
OLD | NEW |