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

Side by Side Diff: Source/core/inspector/PageRuntimeAgent.cpp

Issue 336553003: Change Page::m_mainFrame to be a Frame. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased Created 6 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/inspector/PageDebuggerAgent.cpp ('k') | Source/core/loader/FrameLoader.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 if (!m_enabled) 98 if (!m_enabled)
99 return; 99 return;
100 ASSERT(m_frontend); 100 ASSERT(m_frontend);
101 String frameId = m_pageAgent->frameId(frame); 101 String frameId = m_pageAgent->frameId(frame);
102 addExecutionContextToFrontend(scriptState, false, origin->toRawString(), fra meId); 102 addExecutionContextToFrontend(scriptState, false, origin->toRawString(), fra meId);
103 } 103 }
104 104
105 InjectedScript PageRuntimeAgent::injectedScriptForEval(ErrorString* errorString, const int* executionContextId) 105 InjectedScript PageRuntimeAgent::injectedScriptForEval(ErrorString* errorString, const int* executionContextId)
106 { 106 {
107 if (!executionContextId) { 107 if (!executionContextId) {
108 ScriptState* scriptState = ScriptState::forMainWorld(m_inspectedPage->ma inFrame()); 108 ScriptState* scriptState = ScriptState::forMainWorld(m_inspectedPage->de precatedLocalMainFrame());
109 InjectedScript result = injectedScriptManager()->injectedScriptFor(scrip tState); 109 InjectedScript result = injectedScriptManager()->injectedScriptFor(scrip tState);
110 if (result.isEmpty()) 110 if (result.isEmpty())
111 *errorString = "Internal error: main world execution context not fou nd."; 111 *errorString = "Internal error: main world execution context not fou nd.";
112 return result; 112 return result;
113 } 113 }
114 InjectedScript injectedScript = injectedScriptManager()->injectedScriptForId (*executionContextId); 114 InjectedScript injectedScript = injectedScriptManager()->injectedScriptForId (*executionContextId);
115 if (injectedScript.isEmpty()) 115 if (injectedScript.isEmpty())
116 *errorString = "Execution context with given id not found."; 116 *errorString = "Execution context with given id not found.";
117 return injectedScript; 117 return injectedScript;
118 } 118 }
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 if (scriptState->contextIsEmpty() || window == scriptState->domWindow()) { 157 if (scriptState->contextIsEmpty() || window == scriptState->domWindow()) {
158 scriptStatesToRemove.append(scriptState); 158 scriptStatesToRemove.append(scriptState);
159 m_frontend->executionContextDestroyed(it->value); 159 m_frontend->executionContextDestroyed(it->value);
160 } 160 }
161 } 161 }
162 m_scriptStateToId.removeAll(scriptStatesToRemove); 162 m_scriptStateToId.removeAll(scriptStatesToRemove);
163 } 163 }
164 164
165 } // namespace WebCore 165 } // namespace WebCore
166 166
OLDNEW
« no previous file with comments | « Source/core/inspector/PageDebuggerAgent.cpp ('k') | Source/core/loader/FrameLoader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698