OLD | NEW |
1 // Copyright 2016 the V8 project authors. All rights reserved. | 1 // Copyright 2016 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/inspector/V8Console.h" | 5 #include "src/inspector/V8Console.h" |
6 | 6 |
7 #include "src/base/macros.h" | 7 #include "src/base/macros.h" |
8 #include "src/inspector/InjectedScript.h" | 8 #include "src/inspector/InjectedScript.h" |
9 #include "src/inspector/InspectedContext.h" | 9 #include "src/inspector/InspectedContext.h" |
10 #include "src/inspector/StringUtil.h" | 10 #include "src/inspector/StringUtil.h" |
(...skipping 11 matching lines...) Expand all Loading... |
22 namespace v8_inspector { | 22 namespace v8_inspector { |
23 | 23 |
24 namespace { | 24 namespace { |
25 | 25 |
26 v8::Local<v8::Private> inspectedContextPrivateKey(v8::Isolate* isolate) { | 26 v8::Local<v8::Private> inspectedContextPrivateKey(v8::Isolate* isolate) { |
27 return v8::Private::ForApi( | 27 return v8::Private::ForApi( |
28 isolate, toV8StringInternalized(isolate, "V8Console#InspectedContext")); | 28 isolate, toV8StringInternalized(isolate, "V8Console#InspectedContext")); |
29 } | 29 } |
30 | 30 |
31 class ConsoleHelper { | 31 class ConsoleHelper { |
32 V8_INSPECTOR_DISALLOW_COPY(ConsoleHelper); | 32 DISALLOW_COPY_AND_ASSIGN(ConsoleHelper); |
33 | 33 |
34 public: | 34 public: |
35 ConsoleHelper(const v8::FunctionCallbackInfo<v8::Value>& info) | 35 ConsoleHelper(const v8::FunctionCallbackInfo<v8::Value>& info) |
36 : m_info(info), | 36 : m_info(info), |
37 m_isolate(info.GetIsolate()), | 37 m_isolate(info.GetIsolate()), |
38 m_context(info.GetIsolate()->GetCurrentContext()), | 38 m_context(info.GetIsolate()->GetCurrentContext()), |
39 m_inspectedContext(nullptr), | 39 m_inspectedContext(nullptr), |
40 m_inspectorClient(nullptr) {} | 40 m_inspectorClient(nullptr) {} |
41 | 41 |
42 v8::Local<v8::Object> ensureConsole() { | 42 v8::Local<v8::Object> ensureConsole() { |
(...skipping 865 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
908 ->GetOwnPropertyDescriptor( | 908 ->GetOwnPropertyDescriptor( |
909 m_context, v8::Local<v8::String>::Cast(name)) | 909 m_context, v8::Local<v8::String>::Cast(name)) |
910 .ToLocal(&descriptor); | 910 .ToLocal(&descriptor); |
911 DCHECK(success); | 911 DCHECK(success); |
912 USE(success); | 912 USE(success); |
913 } | 913 } |
914 } | 914 } |
915 } | 915 } |
916 | 916 |
917 } // namespace v8_inspector | 917 } // namespace v8_inspector |
OLD | NEW |