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

Unified Diff: test/inspector/inspector-test.cc

Issue 2816043006: [inspector] avoid cloning of async call chains (Closed)
Patch Set: lines and columns in stack string should be 1-based Created 3 years, 8 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 | « test/inspector/inspector-impl.cc ('k') | test/inspector/protocol-test.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/inspector/inspector-test.cc
diff --git a/test/inspector/inspector-test.cc b/test/inspector/inspector-test.cc
index c988bcf371a5fe4a26bd6844b532f4968e6ffa78..f3badacacc23adb9db14d739399730d1cd149a21 100644
--- a/test/inspector/inspector-test.cc
+++ b/test/inspector/inspector-test.cc
@@ -61,6 +61,7 @@ class UtilsExtension : public v8::Extension {
"native function schedulePauseOnNextStatement();"
"native function cancelPauseOnNextStatement();"
"native function reconnect();"
+ "native function setLogConsoleApiMessageCalls();"
"native function createContextGroup();") {}
virtual v8::Local<v8::FunctionTemplate> GetNativeFunctionTemplate(
v8::Isolate* isolate, v8::Local<v8::String> name) {
@@ -136,6 +137,14 @@ class UtilsExtension : public v8::Extension {
.ToLocalChecked())
.FromJust()) {
return v8::FunctionTemplate::New(isolate, UtilsExtension::Reconnect);
+ } else if (name->Equals(context,
+ v8::String::NewFromUtf8(
+ isolate, "setLogConsoleApiMessageCalls",
+ v8::NewStringType::kNormal)
+ .ToLocalChecked())
+ .FromJust()) {
+ return v8::FunctionTemplate::New(
+ isolate, UtilsExtension::SetLogConsoleApiMessageCalls);
} else if (name->Equals(context, v8::String::NewFromUtf8(
isolate, "createContextGroup",
v8::NewStringType::kNormal)
@@ -318,6 +327,16 @@ class UtilsExtension : public v8::Extension {
ready_semaphore.Wait();
}
+ static void SetLogConsoleApiMessageCalls(
+ const v8::FunctionCallbackInfo<v8::Value>& args) {
+ if (args.Length() != 1 || !args[0]->IsBoolean()) {
+ fprintf(stderr, "Internal error: setLogConsoleApiMessageCalls(bool).");
+ Exit();
+ }
+ inspector_client_->setLogConsoleApiMessageCalls(
+ args[0].As<v8::Boolean>()->Value());
+ }
+
static void CreateContextGroup(
const v8::FunctionCallbackInfo<v8::Value>& args) {
if (args.Length() != 0) {
« no previous file with comments | « test/inspector/inspector-impl.cc ('k') | test/inspector/protocol-test.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698