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

Side by Side Diff: third_party/WebKit/Source/platform/v8_inspector/InspectedContext.cpp

Issue 1873533002: [DevTools] Force context creation when runtime is enabled. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: more tests Created 4 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 unified diff | Download patch
OLDNEW
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698