| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium 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 "platform/v8_inspector/InspectedContext.h" | 5 #include "platform/v8_inspector/InspectedContext.h" |
| 6 | 6 |
| 7 #include "platform/v8_inspector/InjectedScript.h" | 7 #include "platform/v8_inspector/InjectedScript.h" |
| 8 #include "platform/v8_inspector/V8DebuggerImpl.h" | 8 #include "platform/v8_inspector/V8DebuggerImpl.h" |
| 9 #include "platform/v8_inspector/public/V8ContextInfo.h" | 9 #include "platform/v8_inspector/public/V8ContextInfo.h" |
| 10 #include "platform/v8_inspector/public/V8DebuggerClient.h" | 10 #include "platform/v8_inspector/public/V8DebuggerClient.h" |
| 11 | 11 |
| 12 namespace blink { | 12 namespace blink { |
| 13 | 13 |
| 14 void InspectedContext::weakCallback(const v8::WeakCallbackInfo<InspectedContext>
& data) | 14 void InspectedContext::weakCallback(const v8::WeakCallbackInfo<InspectedContext>
& data) |
| 15 { | 15 { |
| 16 data.GetParameter()->m_debugger->discardInspectedContext(data.GetParameter()
->m_contextGroupId, data.GetParameter()->m_contextId); | 16 data.GetParameter()->m_debugger->discardInspectedContext(data.GetParameter()
->m_contextGroupId, data.GetParameter()->m_contextId); |
| 17 } | 17 } |
| 18 | 18 |
| 19 InspectedContext::InspectedContext(V8DebuggerImpl* debugger, const V8ContextInfo
& info, int contextId) | 19 InspectedContext::InspectedContext(V8DebuggerImpl* debugger, const V8ContextInfo
& info, int contextId) |
| 20 : m_debugger(debugger) | 20 : m_debugger(debugger) |
| 21 , m_context(info.context->GetIsolate(), info.context) | 21 , m_context(info.context->GetIsolate(), info.context) |
| 22 , m_contextId(contextId) | 22 , m_contextId(contextId) |
| 23 , m_contextGroupId(info.contextGroupId) | 23 , m_contextGroupId(info.contextGroupId) |
| 24 , m_isMainInGroup(info.isMainInGroup) | |
| 25 , m_isDefault(info.isDefault) | 24 , m_isDefault(info.isDefault) |
| 26 , m_origin(info.origin) | 25 , m_origin(info.origin) |
| 27 , m_humanReadableName(info.humanReadableName) | 26 , m_humanReadableName(info.humanReadableName) |
| 28 , m_frameId(info.frameId) | 27 , m_frameId(info.frameId) |
| 29 , m_reported(false) | 28 , m_reported(false) |
| 30 { | 29 { |
| 31 m_context.SetWeak(this, &InspectedContext::weakCallback, v8::WeakCallbackTyp
e::kParameter); | 30 m_context.SetWeak(this, &InspectedContext::weakCallback, v8::WeakCallbackTyp
e::kParameter); |
| 32 } | 31 } |
| 33 | 32 |
| 34 InspectedContext::~InspectedContext() | 33 InspectedContext::~InspectedContext() |
| (...skipping 20 matching lines...) Expand all Loading... |
| 55 return; | 54 return; |
| 56 m_injectedScript = InjectedScript::create(this, injectedScriptHost); | 55 m_injectedScript = InjectedScript::create(this, injectedScriptHost); |
| 57 } | 56 } |
| 58 | 57 |
| 59 void InspectedContext::discardInjectedScript() | 58 void InspectedContext::discardInjectedScript() |
| 60 { | 59 { |
| 61 m_injectedScript.clear(); | 60 m_injectedScript.clear(); |
| 62 } | 61 } |
| 63 | 62 |
| 64 } // namespace blink | 63 } // namespace blink |
| OLD | NEW |