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

Side by Side Diff: third_party/WebKit/Source/core/inspector/MainThreadDebugger.cpp

Issue 2811863002: Move ScriptState::GetExecutionContext (Part 4) (Closed)
Patch Set: Fix Document.cpp Created 3 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 /* 1 /*
2 * Copyright (c) 2011 Google Inc. All rights reserved. 2 * Copyright (c) 2011 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 String human_readable_name = world.IsIsolatedWorld() 154 String human_readable_name = world.IsIsolatedWorld()
155 ? world.IsolatedWorldHumanReadableName() 155 ? world.IsolatedWorldHumanReadableName()
156 : String(); 156 : String();
157 String origin_string = origin ? origin->ToRawString() : String(); 157 String origin_string = origin ? origin->ToRawString() : String();
158 v8_inspector::V8ContextInfo context_info( 158 v8_inspector::V8ContextInfo context_info(
159 script_state->GetContext(), ContextGroupId(frame), 159 script_state->GetContext(), ContextGroupId(frame),
160 ToV8InspectorStringView(human_readable_name)); 160 ToV8InspectorStringView(human_readable_name));
161 context_info.origin = ToV8InspectorStringView(origin_string); 161 context_info.origin = ToV8InspectorStringView(origin_string);
162 context_info.auxData = ToV8InspectorStringView(aux_data); 162 context_info.auxData = ToV8InspectorStringView(aux_data);
163 context_info.hasMemoryOnConsole = 163 context_info.hasMemoryOnConsole =
164 script_state->GetExecutionContext() && 164 ExecutionContext::From(script_state) &&
165 script_state->GetExecutionContext()->IsDocument(); 165 ExecutionContext::From(script_state)->IsDocument();
166 GetV8Inspector()->contextCreated(context_info); 166 GetV8Inspector()->contextCreated(context_info);
167 } 167 }
168 168
169 void MainThreadDebugger::ContextWillBeDestroyed(ScriptState* script_state) { 169 void MainThreadDebugger::ContextWillBeDestroyed(ScriptState* script_state) {
170 v8::HandleScope handles(script_state->GetIsolate()); 170 v8::HandleScope handles(script_state->GetIsolate());
171 GetV8Inspector()->contextDestroyed(script_state->GetContext()); 171 GetV8Inspector()->contextDestroyed(script_state->GetContext());
172 } 172 }
173 173
174 void MainThreadDebugger::ExceptionThrown(ExecutionContext* context, 174 void MainThreadDebugger::ExceptionThrown(ExecutionContext* context,
175 ErrorEvent* event) { 175 ErrorEvent* event) {
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after
465 context, nodes, index++, 465 context, nodes, index++,
466 ToV8(node, info.Holder(), info.GetIsolate())) 466 ToV8(node, info.Holder(), info.GetIsolate()))
467 .FromMaybe(false)) 467 .FromMaybe(false))
468 return; 468 return;
469 } 469 }
470 info.GetReturnValue().Set(nodes); 470 info.GetReturnValue().Set(nodes);
471 } 471 }
472 } 472 }
473 473
474 } // namespace blink 474 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698