Chromium Code Reviews| Index: Source/bindings/core/v8/ScriptSourceCode.h |
| diff --git a/Source/bindings/core/v8/ScriptSourceCode.h b/Source/bindings/core/v8/ScriptSourceCode.h |
| index 8cd98fb185be29c814c3ef005bdff0e81a58ad77..035fa34590d31caa4543839ffd3df29fc143f934 100644 |
| --- a/Source/bindings/core/v8/ScriptSourceCode.h |
| +++ b/Source/bindings/core/v8/ScriptSourceCode.h |
| @@ -31,6 +31,7 @@ |
| #ifndef ScriptSourceCode_h |
| #define ScriptSourceCode_h |
| +#include "bindings/core/v8/V8ScriptStreamer.h" |
| #include "core/fetch/ResourcePtr.h" |
| #include "core/fetch/ScriptResource.h" |
| #include "platform/weborigin/KURL.h" |
| @@ -61,6 +62,14 @@ public: |
| { |
| } |
| + ScriptSourceCode(PassRefPtr<V8ScriptStreamer> streamer, ScriptResource* cs) |
| + : m_source(cs->script()) |
| + , m_resource(cs) |
| + , m_streamer(streamer) |
| + , m_startPosition(TextPosition::minimumPosition()) |
| + { |
| + } |
| + |
| bool isEmpty() const { return m_source.isEmpty(); } |
| const String& source() const { return m_source; } |
| @@ -77,9 +86,12 @@ public: |
| int startLine() const { return m_startPosition.m_line.oneBasedInt(); } |
| const TextPosition& startPosition() const { return m_startPosition; } |
| + V8ScriptStreamer* streamer() const { return m_streamer.get(); } |
| + |
| private: |
| String m_source; |
| ResourcePtr<ScriptResource> m_resource; |
| + RefPtr<V8ScriptStreamer> m_streamer; |
|
haraken
2014/08/17 16:05:25
In my understanding, V8ScriptStreamer is owned by
marja
2014/08/20 11:45:54
I don't think we can get away without RefPtrs; the
haraken
2014/08/20 15:00:18
Makes sense, thanks for the clarification!
|
| mutable KURL m_url; |
| TextPosition m_startPosition; |
| }; |