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

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

Issue 300393002: Merge DevTools Refactor CL to Blink36 (Closed) Base URL: svn://svn.chromium.org/blink/branches/dart/1985
Patch Set: PTAL 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
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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 61
62 void WorkerRuntimeAgent::enable(ErrorString* errorString) 62 void WorkerRuntimeAgent::enable(ErrorString* errorString)
63 { 63 {
64 if (m_enabled) 64 if (m_enabled)
65 return; 65 return;
66 66
67 InspectorRuntimeAgent::enable(errorString); 67 InspectorRuntimeAgent::enable(errorString);
68 addExecutionContextToFrontend(m_workerGlobalScope->script()->scriptState(), true, m_workerGlobalScope->url(), ""); 68 addExecutionContextToFrontend(m_workerGlobalScope->script()->scriptState(), true, m_workerGlobalScope->url(), "");
69 } 69 }
70 70
71 InjectedScript WorkerRuntimeAgent::injectedScriptForEval(ErrorString* error, con st int* executionContextId) 71 InjectedScript& WorkerRuntimeAgent::injectedScriptForEval(ErrorString* error, co nst int* executionContextId)
72 { 72 {
73 if (!executionContextId) 73 if (!executionContextId)
74 return injectedScriptManager()->injectedScriptFor(m_workerGlobalScope->s cript()->scriptState()); 74 return injectedScriptManager()->injectedScriptFor(m_workerGlobalScope->s cript()->scriptState());
75 75
76 InjectedScript injectedScript = injectedScriptManager()->injectedScriptForId (*executionContextId); 76 InjectedScript& injectedScript = injectedScriptManager()->injectedScriptForI d(*executionContextId);
77 if (injectedScript.isEmpty()) 77 if (injectedScript.isEmpty())
78 *error = "Execution context with given id not found."; 78 *error = "Execution context with given id not found.";
79 return injectedScript; 79 return injectedScript;
80 } 80 }
81 81
82 void WorkerRuntimeAgent::muteConsole() 82 void WorkerRuntimeAgent::muteConsole()
83 { 83 {
84 // We don't need to mute console for workers. 84 // We don't need to mute console for workers.
85 } 85 }
86 86
(...skipping 14 matching lines...) Expand all
101 101
102 m_paused = true; 102 m_paused = true;
103 MessageQueueWaitResult result; 103 MessageQueueWaitResult result;
104 do { 104 do {
105 result = context->thread()->runLoop().runDebuggerTask(); 105 result = context->thread()->runLoop().runDebuggerTask();
106 // Keep waiting until execution is resumed. 106 // Keep waiting until execution is resumed.
107 } while (result == MessageQueueMessageReceived && m_paused); 107 } while (result == MessageQueueMessageReceived && m_paused);
108 } 108 }
109 109
110 } // namespace WebCore 110 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/inspector/WorkerRuntimeAgent.h ('k') | Source/core/rendering/RenderLayerStackingNode.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698