Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(813)

Unified Diff: third_party/WebKit/Source/bindings/core/v8/SourceLocation.cpp

Issue 2687943004: Abstract out ThreadDebugger from V8PerIsolateData (Closed)
Patch Set: Fix style, add comment Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..57dc86d01f343da14a4803488f196ecb5d4131ed 100644
--- a/third_party/WebKit/Source/bindings/core/v8/SourceLocation.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/SourceLocation.cpp
@@ -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::from(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::from(isolate);
+ if (debugger)
+ stackTrace = debugger->v8Inspector()->createStackTrace(stack);
int scriptId = message->GetScriptOrigin().ScriptID()->Value();
if (!stack.IsEmpty() && stack->GetFrameCount() > 0) {

Powered by Google App Engine
This is Rietveld 408576698