Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
02602f7
deps: update V8 to 6.2.414.46
targos Jan 15, 2018
743012e
src: update NODE_MODULE_VERSION to 59
targos Jan 15, 2018
0252467
test: fix message test after V8 upgrade
targos Aug 28, 2017
e4dc16b
src: update ustack offset identifiers
geek Aug 28, 2017
fcd5860
src: fix rename of entry frame in v8abbr.h
geek Aug 29, 2017
3d3da4a
deps: cherry-pick 9b21865822243 from V8 upstream
addaleax Sep 8, 2017
7181fcd
deps: v8: fix potential segfault in profiler
ofrobots Sep 20, 2017
150e954
deps: backport 0f1dfae from V8 upstream
tebbi Oct 10, 2017
21bfde6
deps: cherry-pick 37a3a15c3 from V8 upstream
fhinkel Oct 18, 2017
d8de486
deps: cherry-pick 2c75616 from upstream V8
targos Oct 25, 2017
5a16d2e
deps: cherry-pick 676c413 from upstream V8
targos Oct 25, 2017
b56c82c
deps: cherry-pick e0d64dc from upstream V8
targos Oct 25, 2017
55d386c
deps: V8: backport b1cd96e from upstream
ofrobots Oct 18, 2017
dd8c994
deps: cherry-pick b8331cc030 from upstream V8
danbev Oct 30, 2017
3ad6a7d
deps: cherry-pick cc55747 from V8 upstream
fhinkel Nov 8, 2017
e2d41ed
deps: cherry-pick 1420e44db0 from upstream V8
TimothyGu Nov 27, 2017
259192f
deps: backport 3c8195d from V8 upstream
MylesBorins Nov 8, 2017
a10b18e
deps: V8: backport 14ac02c from upstream
ofrobots Dec 6, 2017
6e4a26d
deps: V8: cherry-pick ac0fe8ec from upstream
ofrobots Dec 15, 2017
c693140
deps: cherry-pick c3458a8 from upstream V8
targos Jan 11, 2018
d6e6253
deps: revert ABI breaking changes in V8 6.2
addaleax Oct 13, 2017
421626e
deps: revert ABI breaking changes in V8 6.1
addaleax Sep 14, 2017
c2f8d54
Revert "src: update NODE_MODULE_VERSION to 59"
MylesBorins Feb 7, 2018
40197d8
v8: make building addons with VS2013 work again
bnoordhuis Jan 29, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
deps: V8: backport b1cd96e from upstream
Original commit message:
  [inspector] added V8InspectorClient::maxAsyncCallStackDepthChanged

  R=dgozman@chromium.org

  Bug: none
  Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_chromium_rel_ng
  Change-Id: I0fa10978266feb3c3907ce1f3386ae7a34a33582
  Reviewed-on: https://chromium-review.googlesource.com/726490
  Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
  Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
  Cr-Commit-Position: refs/heads/master@{#48705}

PR-URL: #16308
Refs: v8/v8@b1cd96e
Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
  • Loading branch information
ofrobots authored and MylesBorins committed Feb 7, 2018
commit 55d386c81582a0baa1b92db2bd8b73b78e5bbc90
2 changes: 2 additions & 0 deletions deps/v8/include/v8-inspector.h
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,8 @@ class V8_EXPORT V8InspectorClient {
// TODO(dgozman): this was added to support service worker shadow page. We
// should not connect at all.
virtual bool canExecuteScripts(int contextGroupId) { return true; }

virtual void maxAsyncCallStackDepthChanged(int depth) {}
};

class V8_EXPORT V8Inspector {
Expand Down
2 changes: 2 additions & 0 deletions deps/v8/src/inspector/v8-debugger.cc
Original file line number Diff line number Diff line change
Expand Up @@ -726,6 +726,8 @@ void V8Debugger::setAsyncCallStackDepth(V8DebuggerAgentImpl* agent, int depth) {
if (m_maxAsyncCallStackDepth == maxAsyncCallStackDepth) return;
// TODO(dgozman): ideally, this should be per context group.
m_maxAsyncCallStackDepth = maxAsyncCallStackDepth;
m_inspector->client()->maxAsyncCallStackDepthChanged(
m_maxAsyncCallStackDepth);
if (!maxAsyncCallStackDepth) allAsyncTasksCanceled();
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Tests for max async call stack depth changed.
maxAsyncCallStackDepthChanged: 8
maxAsyncCallStackDepthChanged: 0
maxAsyncCallStackDepthChanged: 8
maxAsyncCallStackDepthChanged: 0
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// Copyright 2017 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

let {session, contextGroup, Protocol} =
InspectorTest.start('Tests for max async call stack depth changed.');

(async function test(){
utils.setLogMaxAsyncCallStackDepthChanged(true);
await Protocol.Debugger.enable();
await Protocol.Debugger.setAsyncCallStackDepth({maxDepth: 8});
await Protocol.Debugger.setAsyncCallStackDepth({maxDepth: 0});
await Protocol.Debugger.setAsyncCallStackDepth({maxDepth: 8});
await Protocol.Debugger.disable();
InspectorTest.completeTest();
})();
15 changes: 15 additions & 0 deletions deps/v8/test/inspector/inspector-test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,10 @@ class UtilsExtension : public IsolateData::SetupGlobalTask {
utils->Set(ToV8String(isolate, "setLogConsoleApiMessageCalls"),
v8::FunctionTemplate::New(
isolate, &UtilsExtension::SetLogConsoleApiMessageCalls));
utils->Set(
ToV8String(isolate, "setLogMaxAsyncCallStackDepthChanged"),
v8::FunctionTemplate::New(
isolate, &UtilsExtension::SetLogMaxAsyncCallStackDepthChanged));
utils->Set(ToV8String(isolate, "createContextGroup"),
v8::FunctionTemplate::New(isolate,
&UtilsExtension::CreateContextGroup));
Expand Down Expand Up @@ -486,6 +490,17 @@ class UtilsExtension : public IsolateData::SetupGlobalTask {
args[0].As<v8::Boolean>()->Value());
}

static void SetLogMaxAsyncCallStackDepthChanged(
const v8::FunctionCallbackInfo<v8::Value>& args) {
if (args.Length() != 1 || !args[0]->IsBoolean()) {
fprintf(stderr,
"Internal error: setLogMaxAsyncCallStackDepthChanged(bool).");
Exit();
}
backend_runner_->data()->SetLogMaxAsyncCallStackDepthChanged(
args[0].As<v8::Boolean>()->Value());
}

static void CreateContextGroup(
const v8::FunctionCallbackInfo<v8::Value>& args) {
if (args.Length() != 0) {
Expand Down
9 changes: 9 additions & 0 deletions deps/v8/test/inspector/isolate-data.cc
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,10 @@ void IsolateData::SetLogConsoleApiMessageCalls(bool log) {
log_console_api_message_calls_ = log;
}

void IsolateData::SetLogMaxAsyncCallStackDepthChanged(bool log) {
log_max_async_call_stack_depth_changed_ = log;
}

v8::MaybeLocal<v8::Value> IsolateData::memoryInfo(v8::Isolate* isolate,
v8::Local<v8::Context>) {
if (memory_info_.IsEmpty()) return v8::MaybeLocal<v8::Value>();
Expand All @@ -396,3 +400,8 @@ void IsolateData::consoleAPIMessage(int contextGroupId,
Print(isolate_, stack->toString()->string());
fprintf(stdout, "\n");
}

void IsolateData::maxAsyncCallStackDepthChanged(int depth) {
if (!log_max_async_call_stack_depth_changed_) return;
fprintf(stdout, "maxAsyncCallStackDepthChanged: %d\n", depth);
}
3 changes: 3 additions & 0 deletions deps/v8/test/inspector/isolate-data.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ class IsolateData : public v8_inspector::V8InspectorClient {
void SetCurrentTimeMS(double time);
void SetMemoryInfo(v8::Local<v8::Value> memory_info);
void SetLogConsoleApiMessageCalls(bool log);
void SetLogMaxAsyncCallStackDepthChanged(bool log);
void SetMaxAsyncTaskStacksForTest(int limit);
void DumpAsyncTaskStacksStateForTest();
void FireContextCreated(v8::Local<v8::Context> context, int context_group_id);
Expand Down Expand Up @@ -106,6 +107,7 @@ class IsolateData : public v8_inspector::V8InspectorClient {
unsigned lineNumber, unsigned columnNumber,
v8_inspector::V8StackTrace*) override;
bool isInspectableHeapObject(v8::Local<v8::Object>) override;
void maxAsyncCallStackDepthChanged(int depth) override;

TaskRunner* task_runner_;
SetupGlobalTasks setup_global_tasks_;
Expand All @@ -123,6 +125,7 @@ class IsolateData : public v8_inspector::V8InspectorClient {
bool current_time_set_ = false;
double current_time_ = 0.0;
bool log_console_api_message_calls_ = false;
bool log_max_async_call_stack_depth_changed_ = false;
v8::Global<v8::Private> not_inspectable_private_;

DISALLOW_COPY_AND_ASSIGN(IsolateData);
Expand Down