OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 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 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 if (!document.settings()) | 128 if (!document.settings()) |
129 return false; | 129 return false; |
130 | 130 |
131 if (!document.frame()) | 131 if (!document.frame()) |
132 return false; | 132 return false; |
133 | 133 |
134 // Only block synchronously loaded (parser blocking) scripts. | 134 // Only block synchronously loaded (parser blocking) scripts. |
135 if (defer != FetchRequest::NoDefer) | 135 if (defer != FetchRequest::NoDefer) |
136 return false; | 136 return false; |
137 | 137 |
138 PerformanceMonitor::documentWriteFetchScript(&document); | 138 InspectorInstrumentation::documentWriteFetchScript(&document); |
139 | 139 |
140 if (!request.url().protocolIsInHTTPFamily()) | 140 if (!request.url().protocolIsInHTTPFamily()) |
141 return false; | 141 return false; |
142 | 142 |
143 // Avoid blocking same origin scripts, as they may be used to render main | 143 // Avoid blocking same origin scripts, as they may be used to render main |
144 // page content, whereas cross-origin scripts inserted via document.write | 144 // page content, whereas cross-origin scripts inserted via document.write |
145 // are likely to be third party content. | 145 // are likely to be third party content. |
146 String requestHost = request.url().host(); | 146 String requestHost = request.url().host(); |
147 String documentHost = document.getSecurityOrigin()->domain(); | 147 String documentHost = document.getSecurityOrigin()->domain(); |
148 | 148 |
(...skipping 964 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1113 response); | 1113 response); |
1114 } | 1114 } |
1115 | 1115 |
1116 DEFINE_TRACE(FrameFetchContext) { | 1116 DEFINE_TRACE(FrameFetchContext) { |
1117 visitor->trace(m_document); | 1117 visitor->trace(m_document); |
1118 visitor->trace(m_documentLoader); | 1118 visitor->trace(m_documentLoader); |
1119 FetchContext::trace(visitor); | 1119 FetchContext::trace(visitor); |
1120 } | 1120 } |
1121 | 1121 |
1122 } // namespace blink | 1122 } // namespace blink |
OLD | NEW |