| Index: third_party/WebKit/Source/bindings/core/v8/SourceLocation.h
|
| diff --git a/third_party/WebKit/Source/bindings/core/v8/SourceLocation.h b/third_party/WebKit/Source/bindings/core/v8/SourceLocation.h
|
| index 74cd28273101fc225ffce3a551613ee831454063..ea41a9f2c581d0d97fde24f51fca8a5eff61451b 100644
|
| --- a/third_party/WebKit/Source/bindings/core/v8/SourceLocation.h
|
| +++ b/third_party/WebKit/Source/bindings/core/v8/SourceLocation.h
|
| @@ -6,6 +6,7 @@
|
| #define SourceLocation_h
|
|
|
| #include "core/CoreExport.h"
|
| +#include "platform/CrossThreadCopier.h"
|
| #include "platform/v8_inspector/public/V8StackTrace.h"
|
| #include "wtf/Forward.h"
|
| #include "wtf/PassOwnPtr.h"
|
| @@ -38,6 +39,7 @@ public:
|
| int scriptId() const { return m_scriptId; }
|
| void toTracedValue(TracedValue*, const char* name) const;
|
| PassOwnPtr<SourceLocation> clone() const;
|
| + PassOwnPtr<SourceLocation> isolatedCopy() const; // Safe to pass between threads.
|
|
|
| private:
|
| SourceLocation(const String& url, unsigned lineNumber, unsigned columnNumber, std::unique_ptr<V8StackTrace>, int scriptId);
|
| @@ -50,6 +52,15 @@ private:
|
| int m_scriptId;
|
| };
|
|
|
| +template <>
|
| +struct CrossThreadCopier<PassOwnPtr<SourceLocation>> {
|
| + using Type = PassOwnPtr<SourceLocation>;
|
| + static Type copy(PassOwnPtr<SourceLocation> location)
|
| + {
|
| + return location ? location->isolatedCopy() : nullptr;
|
| + }
|
| +};
|
| +
|
| } // namespace blink
|
|
|
| #endif // SourceLocation_h
|
|
|