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 24 matching lines...) Expand all Loading... |
35 #include "bindings/v8/ScriptState.h" | 35 #include "bindings/v8/ScriptState.h" |
36 #include "core/inspector/InjectedScript.h" | 36 #include "core/inspector/InjectedScript.h" |
37 #include "core/inspector/InstrumentingAgents.h" | 37 #include "core/inspector/InstrumentingAgents.h" |
38 #include "core/inspector/WorkerDebuggerAgent.h" | 38 #include "core/inspector/WorkerDebuggerAgent.h" |
39 #include "core/workers/WorkerContext.h" | 39 #include "core/workers/WorkerContext.h" |
40 #include "core/workers/WorkerRunLoop.h" | 40 #include "core/workers/WorkerRunLoop.h" |
41 #include "core/workers/WorkerThread.h" | 41 #include "core/workers/WorkerThread.h" |
42 | 42 |
43 namespace WebCore { | 43 namespace WebCore { |
44 | 44 |
45 WorkerRuntimeAgent::WorkerRuntimeAgent(InstrumentingAgents* instrumentingAgents,
InspectorCompositeState* state, InjectedScriptManager* injectedScriptManager, S
criptDebugServer* scriptDebugServer, WorkerContext* workerContext) | 45 WorkerRuntimeAgent::WorkerRuntimeAgent(InstrumentingAgents* instrumentingAgents,
InspectorState* state, InjectedScriptManager* injectedScriptManager, ScriptDebu
gServer* scriptDebugServer, WorkerContext* workerContext) |
46 : InspectorRuntimeAgent(instrumentingAgents, state, injectedScriptManager, s
criptDebugServer) | 46 : InspectorRuntimeAgent(instrumentingAgents, state, injectedScriptManager, s
criptDebugServer) |
47 , m_workerContext(workerContext) | 47 , m_workerContext(workerContext) |
48 , m_paused(false) | 48 , m_paused(false) |
49 { | 49 { |
50 m_instrumentingAgents->setWorkerRuntimeAgent(this); | 50 m_instrumentingAgents->setWorkerRuntimeAgent(this); |
51 } | 51 } |
52 | 52 |
53 WorkerRuntimeAgent::~WorkerRuntimeAgent() | 53 WorkerRuntimeAgent::~WorkerRuntimeAgent() |
54 { | 54 { |
55 m_instrumentingAgents->setWorkerRuntimeAgent(0); | 55 m_instrumentingAgents->setWorkerRuntimeAgent(0); |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 | 87 |
88 m_paused = true; | 88 m_paused = true; |
89 MessageQueueWaitResult result; | 89 MessageQueueWaitResult result; |
90 do { | 90 do { |
91 result = context->thread()->runLoop().runInMode(context, WorkerDebuggerA
gent::debuggerTaskMode); | 91 result = context->thread()->runLoop().runInMode(context, WorkerDebuggerA
gent::debuggerTaskMode); |
92 // Keep waiting until execution is resumed. | 92 // Keep waiting until execution is resumed. |
93 } while (result == MessageQueueMessageReceived && m_paused); | 93 } while (result == MessageQueueMessageReceived && m_paused); |
94 } | 94 } |
95 | 95 |
96 } // namespace WebCore | 96 } // namespace WebCore |
OLD | NEW |