Index: third_party/WebKit/Source/bindings/core/v8/SourceLocation.cpp |
diff --git a/third_party/WebKit/Source/bindings/core/v8/SourceLocation.cpp b/third_party/WebKit/Source/bindings/core/v8/SourceLocation.cpp |
index f7e4197f4b94008753555589c481ea87de5ecacc..c806cf2a0ab609b14bf1862d1a30a82c0134ecea 100644 |
--- a/third_party/WebKit/Source/bindings/core/v8/SourceLocation.cpp |
+++ b/third_party/WebKit/Source/bindings/core/v8/SourceLocation.cpp |
@@ -41,8 +41,10 @@ std::unique_ptr<V8StackTrace> captureStackTrace() |
PassOwnPtr<SourceLocation> SourceLocation::capture(const String& url, unsigned lineNumber, unsigned columnNumber) |
{ |
std::unique_ptr<V8StackTrace> stackTrace = captureStackTrace(); |
- if (stackTrace && !stackTrace->isEmpty()) |
- return SourceLocation::create(stackTrace->topSourceURL(), stackTrace->topLineNumber(), stackTrace->topColumnNumber(), std::move(stackTrace), 0); |
+ if (stackTrace && !stackTrace->isEmpty()) { |
+ const V8StackTrace* stackTracePtr = stackTrace.get(); |
Yuki
2016/05/26 06:55:50
I'm a bit uneasy to use a raw pointer here.
co
kinaba
2016/05/26 07:14:19
Makes sense. Done.
|
+ return SourceLocation::create(stackTracePtr->topSourceURL(), stackTracePtr->topLineNumber(), stackTracePtr->topColumnNumber(), std::move(stackTrace), 0); |
+ } |
return SourceLocation::create(url, lineNumber, columnNumber, std::move(stackTrace)); |
} |
@@ -50,8 +52,10 @@ PassOwnPtr<SourceLocation> SourceLocation::capture(const String& url, unsigned l |
PassOwnPtr<SourceLocation> SourceLocation::capture(ExecutionContext* executionContext) |
{ |
std::unique_ptr<V8StackTrace> stackTrace = captureStackTrace(); |
- if (stackTrace && !stackTrace->isEmpty()) |
- return SourceLocation::create(stackTrace->topSourceURL(), stackTrace->topLineNumber(), stackTrace->topColumnNumber(), std::move(stackTrace), 0); |
+ if (stackTrace && !stackTrace->isEmpty()) { |
+ const V8StackTrace* stackTracePtr = stackTrace.get(); |
+ return SourceLocation::create(stackTracePtr->topSourceURL(), stackTracePtr->topLineNumber(), stackTracePtr->topColumnNumber(), std::move(stackTrace), 0); |
+ } |
Document* document = executionContext && executionContext->isDocument() ? toDocument(executionContext) : nullptr; |
if (document) { |