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

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

Issue 1987153002: Account for empty stack trace with non-empty async chain in V8Initializer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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
« no previous file with comments | « third_party/WebKit/Source/bindings/core/v8/ScriptCallStack.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/bindings/core/v8/V8Initializer.cpp
diff --git a/third_party/WebKit/Source/bindings/core/v8/V8Initializer.cpp b/third_party/WebKit/Source/bindings/core/v8/V8Initializer.cpp
index a4eaf56de5c4324a1ebf7c04c5bd89829ab523db..2ff20cce431400eaa32a5f3d61a254c5a24661ff 100644
--- a/third_party/WebKit/Source/bindings/core/v8/V8Initializer.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/V8Initializer.cpp
@@ -98,11 +98,9 @@ static void reportFatalErrorInMainThread(const char* location, const char* messa
static PassRefPtr<ScriptCallStack> extractCallStack(v8::Isolate* isolate, v8::Local<v8::Message> message, int* const scriptId)
{
v8::Local<v8::StackTrace> stackTrace = message->GetStackTrace();
- RefPtr<ScriptCallStack> callStack = nullptr;
+ RefPtr<ScriptCallStack> callStack = ScriptCallStack::create(isolate, stackTrace);
*scriptId = message->GetScriptOrigin().ScriptID()->Value();
- // Currently stack trace is only collected when inspector is open.
if (!stackTrace.IsEmpty() && stackTrace->GetFrameCount() > 0) {
- callStack = ScriptCallStack::create(isolate, stackTrace);
int topScriptId = stackTrace->GetFrame(0)->GetScriptId();
if (topScriptId == *scriptId)
*scriptId = 0;
« no previous file with comments | « third_party/WebKit/Source/bindings/core/v8/ScriptCallStack.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698