Chromium Code Reviews| Index: third_party/WebKit/Source/bindings/core/v8/ScriptSourceCode.h |
| diff --git a/third_party/WebKit/Source/bindings/core/v8/ScriptSourceCode.h b/third_party/WebKit/Source/bindings/core/v8/ScriptSourceCode.h |
| index 44efea1f2a4c887210736bf6c106e31482b6188a..0a7503f77ee1e9d10b4cda4af4ccc5edab3f4046 100644 |
| --- a/third_party/WebKit/Source/bindings/core/v8/ScriptSourceCode.h |
| +++ b/third_party/WebKit/Source/bindings/core/v8/ScriptSourceCode.h |
| @@ -53,18 +53,19 @@ public: |
| // Not sure if that matters. |
| explicit ScriptSourceCode(ScriptResource*); |
| ScriptSourceCode(const String&, const KURL& = KURL(), const TextPosition& startPosition = TextPosition::minimumPosition()); |
| + ScriptSourceCode(const CompressableString&, const KURL& = KURL(), const TextPosition& startPosition = TextPosition::minimumPosition()); |
| ScriptSourceCode(PassRefPtrWillBeRawPtr<ScriptStreamer>, ScriptResource*); |
| ~ScriptSourceCode(); |
| DECLARE_TRACE(); |
| - bool isEmpty() const { return m_source.isEmpty(); } |
| + bool isEmpty() const { return isNull() || m_source.isEmpty(); } |
|
haraken
2015/11/24 11:15:41
Do we need this change? I think that isEmpty shoul
hajimehoshi
2015/11/26 10:49:12
Done.
|
| // The null value represents a missing script, created by the nullary |
| // constructor, and differs from the empty script. |
| bool isNull() const { return m_source.isNull(); } |
| - const String& source() const { return m_source; } |
| + const CompressableString& source() const { return m_source; } |
| ScriptResource* resource() const { return m_resource.get(); } |
| const KURL& url() const; |
| int startLine() const { return m_startPosition.m_line.oneBasedInt(); } |
| @@ -76,7 +77,7 @@ public: |
| private: |
| void treatNullSourceAsEmpty(); |
| - String m_source; |
| + CompressableString m_source; |
|
haraken
2015/11/24 11:15:41
Just to confirm: Both ScriptSourceCode and ScriptR
hajimehoshi
2015/11/26 10:49:12
Right. The copy constructor of CompressableString
|
| ResourcePtr<ScriptResource> m_resource; |
| RefPtrWillBeMember<ScriptStreamer> m_streamer; |
| mutable KURL m_url; |