// Copyright 2016 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. #ifndef V8_INSPECTOR_V8_CONSOLE_H_ #define V8_INSPECTOR_V8_CONSOLE_H_ #include <map> #include "include/v8-array-buffer.h" #include "include/v8-external.h" #include "include/v8-local-handle.h" #include "src/base/macros.h" #include "src/debug/interface-types.h" namespace v8 { class ObjectTemplate; class Set; } // namespace v8 namespace v8_inspector { class InspectedContext; class TaskInfo; class V8InspectorImpl; // Console API // https://console.spec.whatwg.org/#console-namespace class V8Console : public v8::debug::ConsoleDelegate { … }; /** * Each JS task object created via `console.createTask` has a corresponding * `TaskInfo` object on the C++ side (in a 1:1 relationship). * * The `TaskInfo` holds on weakly to the JS task object. * The JS task objects uses a private symbol to store a pointer to the * `TaskInfo` object (via v8::External). * * The `TaskInfo` objects holds all the necessary information we need to * properly cancel the corresponding async task then the JS task object * gets GC'ed. */ class TaskInfo { … }; } // namespace v8_inspector #endif // V8_INSPECTOR_V8_CONSOLE_H_