Chromium Code Reviews| 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(); } |