Index: third_party/WebKit/Source/platform/v8_inspector/V8Console.h |
diff --git a/third_party/WebKit/Source/platform/v8_inspector/V8Console.h b/third_party/WebKit/Source/platform/v8_inspector/V8Console.h |
index 1080baa60a7c31b206c1d627f8d6c22c9d9d78e5..b539f4c0ad03edd43ad55106e0d57666b4408b4c 100644 |
--- a/third_party/WebKit/Source/platform/v8_inspector/V8Console.h |
+++ b/third_party/WebKit/Source/platform/v8_inspector/V8Console.h |
@@ -5,6 +5,7 @@ |
#ifndef V8Console_h |
#define V8Console_h |
+#include "platform/inspector_protocol/Allocator.h" |
#include <v8.h> |
namespace blink { |
@@ -16,8 +17,25 @@ class InspectedContext; |
class V8Console { |
public: |
static v8::Local<v8::Object> createConsole(InspectedContext*, bool hasMemoryAttribute); |
- static v8::Local<v8::Object> createCommandLineAPI(InspectedContext*); |
static void clearInspectedContextIfNeeded(v8::Local<v8::Context>, v8::Local<v8::Object> console); |
+ static v8::Local<v8::Object> createCommandLineAPI(InspectedContext*); |
+ |
+ class CommandLineAPIScope { |
+ PROTOCOL_DISALLOW_COPY(CommandLineAPIScope); |
+ public: |
+ CommandLineAPIScope(v8::Local<v8::Context>, v8::Local<v8::Object> commandLineAPI, v8::Local<v8::Object> global); |
+ ~CommandLineAPIScope(); |
+ |
+ private: |
+ static void accessorGetterCallback(v8::Local<v8::Name>, const v8::PropertyCallbackInfo<v8::Value>&); |
+ static void accessorSetterCallback(v8::Local<v8::Name>, v8::Local<v8::Value>, const v8::PropertyCallbackInfo<void>&); |
+ |
+ v8::Local<v8::Context> m_context; |
+ v8::Local<v8::Object> m_commandLineAPI; |
+ v8::Local<v8::Object> m_global; |
+ v8::Local<v8::Set> m_installedMethods; |
+ bool m_cleanup; |
+ }; |
private: |
static void debugCallback(const v8::FunctionCallbackInfo<v8::Value>&); |