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

Unified Diff: Source/core/fetch/ScriptResource.cpp

Issue 26538007: [devtools] Remove trailing fragment identifier from script urls (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: reupload Created 7 years, 2 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 side-by-side diff with in-line comments
Download patch
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());
« Source/bindings/v8/ScriptSourceCode.h ('K') | « Source/core/fetch/ScriptResource.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698