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 e7ae62ddf9882adf06e1dcd63fae61d02e942954..b7e0798ee74e48547262e11f366c68214d2e0e6c 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(PassRefPtrWillBeRawPtr<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(); } |
// 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(); } |
+ bool isNull() const { return !m_source; } |
- const String& source() const { return m_source; } |
+ RefPtrWillBeRawPtr<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; |
+ RefPtrWillBeMember<CompressableString> m_source; |
haraken
2015/10/22 16:03:31
I don't think it makes sense to put CompressableSt
hajimehoshi
2015/10/26 09:34:02
Done.
|
ResourcePtr<ScriptResource> m_resource; |
RefPtrWillBeMember<ScriptStreamer> m_streamer; |
mutable KURL m_url; |