OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |