OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "bindings/core/v8/ScriptSourceCode.h" | 5 #include "bindings/core/v8/ScriptSourceCode.h" |
6 | 6 |
7 namespace blink { | 7 namespace blink { |
8 | 8 |
9 ScriptSourceCode::ScriptSourceCode() | 9 ScriptSourceCode::ScriptSourceCode() |
10 : m_startPosition(TextPosition::minimumPosition()) | 10 : m_startPosition(TextPosition::minimumPosition()) |
(...skipping 16 matching lines...) Expand all Loading... |
27 } | 27 } |
28 | 28 |
29 ScriptSourceCode::ScriptSourceCode(ScriptResource* resource) | 29 ScriptSourceCode::ScriptSourceCode(ScriptResource* resource) |
30 : m_source(resource->script()) | 30 : m_source(resource->script()) |
31 , m_resource(resource) | 31 , m_resource(resource) |
32 , m_startPosition(TextPosition::minimumPosition()) | 32 , m_startPosition(TextPosition::minimumPosition()) |
33 { | 33 { |
34 treatNullSourceAsEmpty(); | 34 treatNullSourceAsEmpty(); |
35 } | 35 } |
36 | 36 |
37 ScriptSourceCode::ScriptSourceCode(RawPtr<ScriptStreamer> streamer, ScriptResour
ce* resource) | 37 ScriptSourceCode::ScriptSourceCode(ScriptStreamer* streamer, ScriptResource* res
ource) |
38 : m_source(resource->script()) | 38 : m_source(resource->script()) |
39 , m_resource(resource) | 39 , m_resource(resource) |
40 , m_streamer(streamer) | 40 , m_streamer(streamer) |
41 , m_startPosition(TextPosition::minimumPosition()) | 41 , m_startPosition(TextPosition::minimumPosition()) |
42 { | 42 { |
43 treatNullSourceAsEmpty(); | 43 treatNullSourceAsEmpty(); |
44 } | 44 } |
45 | 45 |
46 ScriptSourceCode::~ScriptSourceCode() | 46 ScriptSourceCode::~ScriptSourceCode() |
47 { | 47 { |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 // construct such a value. | 83 // construct such a value. |
84 // | 84 // |
85 // Should the other constructors be passed a null string, that is interprete
d as representing | 85 // Should the other constructors be passed a null string, that is interprete
d as representing |
86 // the empty script. Consequently, we need to disambiguate between such null
string occurrences. | 86 // the empty script. Consequently, we need to disambiguate between such null
string occurrences. |
87 // Do that by converting the latter case's null strings into empty ones. | 87 // Do that by converting the latter case's null strings into empty ones. |
88 if (m_source.isNull()) | 88 if (m_source.isNull()) |
89 m_source = CompressibleString(); | 89 m_source = CompressibleString(); |
90 } | 90 } |
91 | 91 |
92 } // namespace blink | 92 } // namespace blink |
OLD | NEW |