Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 #ifndef SourceLocation_h | 5 #ifndef SourceLocation_h |
| 6 #define SourceLocation_h | 6 #define SourceLocation_h |
| 7 | 7 |
| 8 #include "core/CoreExport.h" | 8 #include "core/CoreExport.h" |
| 9 #include "platform/CrossThreadCopier.h" | |
| 10 #include "platform/v8_inspector/public/V8StackTrace.h" | 9 #include "platform/v8_inspector/public/V8StackTrace.h" |
| 10 #include "wtf/CrossThreadCopier.h" | |
| 11 #include "wtf/Forward.h" | 11 #include "wtf/Forward.h" |
| 12 #include "wtf/text/WTFString.h" | 12 #include "wtf/text/WTFString.h" |
| 13 #include <memory> | 13 #include <memory> |
| 14 | 14 |
| 15 namespace blink { | 15 namespace blink { |
| 16 | 16 |
| 17 class ExecutionContext; | 17 class ExecutionContext; |
| 18 class TracedValue; | 18 class TracedValue; |
| 19 class V8StackTrace; | 19 class V8StackTrace; |
| 20 | 20 |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 61 SourceLocation(const String& url, unsigned lineNumber, unsigned columnNumber , std::unique_ptr<V8StackTrace>, int scriptId); | 61 SourceLocation(const String& url, unsigned lineNumber, unsigned columnNumber , std::unique_ptr<V8StackTrace>, int scriptId); |
| 62 static std::unique_ptr<SourceLocation> createFromNonEmptyV8StackTrace(std::u nique_ptr<V8StackTrace>, int scriptId); | 62 static std::unique_ptr<SourceLocation> createFromNonEmptyV8StackTrace(std::u nique_ptr<V8StackTrace>, int scriptId); |
| 63 | 63 |
| 64 String m_url; | 64 String m_url; |
| 65 unsigned m_lineNumber; | 65 unsigned m_lineNumber; |
| 66 unsigned m_columnNumber; | 66 unsigned m_columnNumber; |
| 67 std::unique_ptr<V8StackTrace> m_stackTrace; | 67 std::unique_ptr<V8StackTrace> m_stackTrace; |
| 68 int m_scriptId; | 68 int m_scriptId; |
| 69 }; | 69 }; |
| 70 | 70 |
| 71 } // namespace blink | |
| 72 | |
| 73 namespace WTF { | |
| 74 | |
| 71 template <> | 75 template <> |
| 72 struct CrossThreadCopier<std::unique_ptr<SourceLocation>> { | 76 struct CrossThreadCopier<std::unique_ptr<blink::SourceLocation>> { |
| 73 using Type = std::unique_ptr<SourceLocation>; | 77 using Type = std::unique_ptr<blink::SourceLocation>; |
| 74 static Type copy(std::unique_ptr<SourceLocation> location) | 78 static Type copy(std::unique_ptr<blink::SourceLocation> location) |
| 75 { | 79 { |
| 76 return location ? location->isolatedCopy() : nullptr; | 80 return location ? location->isolatedCopy() : nullptr; |
| 77 } | 81 } |
| 78 }; | 82 }; |
| 79 | 83 |
| 80 } // namespace blink | 84 } // namespace blink |
|
Yuta Kitamura
2016/07/07 07:45:58
nit: This comment is false now
| |
| 81 | 85 |
| 82 #endif // SourceLocation_h | 86 #endif // SourceLocation_h |
| OLD | NEW |