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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 } | 50 } |
51 | 51 |
52 void AbstractWorker::contextDestroyed() | 52 void AbstractWorker::contextDestroyed() |
53 { | 53 { |
54 ActiveDOMObject::contextDestroyed(); | 54 ActiveDOMObject::contextDestroyed(); |
55 } | 55 } |
56 | 56 |
57 KURL AbstractWorker::resolveURL(const String& url, ExceptionCode& ec) | 57 KURL AbstractWorker::resolveURL(const String& url, ExceptionCode& ec) |
58 { | 58 { |
59 if (url.isEmpty()) { | 59 if (url.isEmpty()) { |
60 ec = SYNTAX_ERR; | 60 ec = SyntaxError; |
61 return KURL(); | 61 return KURL(); |
62 } | 62 } |
63 | 63 |
64 // FIXME: This should use the dynamic global scope (bug #27887) | 64 // FIXME: This should use the dynamic global scope (bug #27887) |
65 KURL scriptURL = scriptExecutionContext()->completeURL(url); | 65 KURL scriptURL = scriptExecutionContext()->completeURL(url); |
66 if (!scriptURL.isValid()) { | 66 if (!scriptURL.isValid()) { |
67 ec = SYNTAX_ERR; | 67 ec = SyntaxError; |
68 return KURL(); | 68 return KURL(); |
69 } | 69 } |
70 | 70 |
71 if (!scriptExecutionContext()->securityOrigin()->canRequest(scriptURL)) { | 71 if (!scriptExecutionContext()->securityOrigin()->canRequest(scriptURL)) { |
72 ec = SECURITY_ERR; | 72 ec = SecurityError; |
73 return KURL(); | 73 return KURL(); |
74 } | 74 } |
75 | 75 |
76 if (scriptExecutionContext()->contentSecurityPolicy() && !scriptExecutionCon
text()->contentSecurityPolicy()->allowScriptFromSource(scriptURL)) { | 76 if (scriptExecutionContext()->contentSecurityPolicy() && !scriptExecutionCon
text()->contentSecurityPolicy()->allowScriptFromSource(scriptURL)) { |
77 ec = SECURITY_ERR; | 77 ec = SecurityError; |
78 return KURL(); | 78 return KURL(); |
79 } | 79 } |
80 | 80 |
81 return scriptURL; | 81 return scriptURL; |
82 } | 82 } |
83 | 83 |
84 EventTargetData* AbstractWorker::eventTargetData() | 84 EventTargetData* AbstractWorker::eventTargetData() |
85 { | 85 { |
86 return &m_eventTargetData; | 86 return &m_eventTargetData; |
87 } | 87 } |
88 | 88 |
89 EventTargetData* AbstractWorker::ensureEventTargetData() | 89 EventTargetData* AbstractWorker::ensureEventTargetData() |
90 { | 90 { |
91 return &m_eventTargetData; | 91 return &m_eventTargetData; |
92 } | 92 } |
93 | 93 |
94 } // namespace WebCore | 94 } // namespace WebCore |
OLD | NEW |