| 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 845551af1b4745654c813e18a787d4c45dd4bcc1..4cd2682423e67f00430ebfc8760005a0a156dd18 100644
|
| --- a/third_party/WebKit/Source/bindings/core/v8/SourceLocation.cpp
|
| +++ b/third_party/WebKit/Source/bindings/core/v8/SourceLocation.cpp
|
| @@ -4,6 +4,7 @@
|
|
|
| #include "bindings/core/v8/SourceLocation.h"
|
|
|
| +#include <memory>
|
| #include "bindings/core/v8/V8BindingMacros.h"
|
| #include "bindings/core/v8/V8PerIsolateData.h"
|
| #include "core/dom/Document.h"
|
| @@ -15,7 +16,6 @@
|
| #include "platform/ScriptForbiddenScope.h"
|
| #include "platform/instrumentation/tracing/TracedValue.h"
|
| #include "wtf/PtrUtil.h"
|
| -#include <memory>
|
|
|
| namespace blink {
|
|
|
| @@ -23,11 +23,11 @@ namespace {
|
|
|
| std::unique_ptr<v8_inspector::V8StackTrace> captureStackTrace(bool full) {
|
| v8::Isolate* isolate = v8::Isolate::GetCurrent();
|
| - V8PerIsolateData* data = V8PerIsolateData::from(isolate);
|
| - if (!data->threadDebugger() || !isolate->InContext())
|
| + ThreadDebugger* debugger = ThreadDebugger::getThreadDebugger(isolate);
|
| + if (!debugger || !isolate->InContext())
|
| return nullptr;
|
| ScriptForbiddenScope::AllowUserAgentScript allowScripting;
|
| - return data->threadDebugger()->v8Inspector()->captureStackTrace(full);
|
| + return debugger->v8Inspector()->captureStackTrace(full);
|
| }
|
| }
|
|
|
| @@ -80,9 +80,9 @@ std::unique_ptr<SourceLocation> SourceLocation::fromMessage(
|
| ExecutionContext* executionContext) {
|
| v8::Local<v8::StackTrace> stack = message->GetStackTrace();
|
| std::unique_ptr<v8_inspector::V8StackTrace> stackTrace = nullptr;
|
| - V8PerIsolateData* data = V8PerIsolateData::from(isolate);
|
| - if (data && data->threadDebugger())
|
| - stackTrace = data->threadDebugger()->v8Inspector()->createStackTrace(stack);
|
| + ThreadDebugger* debugger = ThreadDebugger::getThreadDebugger(isolate);
|
| + if (debugger)
|
| + stackTrace = debugger->v8Inspector()->createStackTrace(stack);
|
|
|
| int scriptId = message->GetScriptOrigin().ScriptID()->Value();
|
| if (!stack.IsEmpty() && stack->GetFrameCount() > 0) {
|
|
|