Chromium Code Reviews| Index: Source/core/fetch/ScriptResource.cpp |
| diff --git a/Source/core/fetch/ScriptResource.cpp b/Source/core/fetch/ScriptResource.cpp |
| index 52bfa54b375880b382d9cfad66910ab34b146d9b..1632b02b3873a05017fac5fb6a0585f8a032d0df 100644 |
| --- a/Source/core/fetch/ScriptResource.cpp |
| +++ b/Source/core/fetch/ScriptResource.cpp |
| @@ -84,6 +84,15 @@ const String& ScriptResource::script() |
| return m_script.string(); |
| } |
| +const KURL& ScriptResource::scriptURL() |
| +{ |
| + if (!response().url().isEmpty() && m_url.isEmpty()) { |
| + m_url = response().url(); |
| + m_url.removeFragmentIdentifier(); |
| + } |
| + return m_url; |
|
abarth-chromium
2013/10/17 01:06:55
Why do we need to store this data? Is it really t
johnjbarton
2013/10/17 02:30:11
I believe we need to store this data so the const
abarth-chromium
2013/10/17 02:39:05
We can return a KURL rather than a const KURL&
|
| +} |
| + |
| bool ScriptResource::mimeTypeAllowedByNosniff() const |
| { |
| return parseContentTypeOptionsHeader(m_response.httpHeaderField("X-Content-Type-Options")) != ContentTypeOptionsNosniff || MIMETypeRegistry::isSupportedJavaScriptMIMEType(mimeType()); |