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

Unified Diff: Source/bindings/v8/ScriptSourceCode.h

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
« no previous file with comments | « no previous file | Source/core/fetch/ScriptResource.h » ('j') | Source/core/fetch/ScriptResource.cpp » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/v8/ScriptSourceCode.h
diff --git a/Source/bindings/v8/ScriptSourceCode.h b/Source/bindings/v8/ScriptSourceCode.h
index 5bacd8bb1162a323f250daef755a467c489c116c..fe5c2991360aac94a917c59f2b8b8ca4562fc9a8 100644
--- a/Source/bindings/v8/ScriptSourceCode.h
+++ b/Source/bindings/v8/ScriptSourceCode.h
@@ -50,6 +50,8 @@ public:
, m_url(url)
, m_startPosition(startPosition)
{
+ if (!m_url.isEmpty())
+ m_url.removeFragmentIdentifier();
abarth-chromium 2013/10/17 01:06:55 Ah, much better.
}
// We lose the encoding information from ScriptResource.
@@ -60,6 +62,8 @@ public:
, m_url(cs->url())
, m_startPosition(TextPosition::minimumPosition())
{
+ if (!m_url.isEmpty())
+ m_url.removeFragmentIdentifier();
}
bool isEmpty() const { return m_source.isEmpty(); }
@@ -69,7 +73,7 @@ public:
const KURL& url() const
{
if (m_resource)
- return m_resource->response().url();
+ return m_resource->scriptURL();
return m_url;
abarth-chromium 2013/10/17 01:06:55 Why not store the data in m_url instead of in Scri
johnjbarton 2013/10/17 02:30:11 Maybe my C++ is rusty, but the method here is cons
abarth-chromium 2013/10/17 02:39:05 You can mark the m_url member as |mutable|.
}
int startLine() const { return m_startPosition.m_line.oneBasedInt(); }
« no previous file with comments | « no previous file | Source/core/fetch/ScriptResource.h » ('j') | Source/core/fetch/ScriptResource.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698