| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2010, Google Inc. All rights reserved. | 2 * Copyright (c) 2010, 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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 | 110 |
| 111 protected: | 111 protected: |
| 112 explicit ScriptDebugServer(v8::Isolate*); | 112 explicit ScriptDebugServer(v8::Isolate*); |
| 113 virtual ~ScriptDebugServer(); | 113 virtual ~ScriptDebugServer(); |
| 114 | 114 |
| 115 virtual ScriptDebugListener* getDebugListenerForContext(v8::Handle<v8::Conte
xt>) = 0; | 115 virtual ScriptDebugListener* getDebugListenerForContext(v8::Handle<v8::Conte
xt>) = 0; |
| 116 virtual void runMessageLoopOnPause(v8::Handle<v8::Context>) = 0; | 116 virtual void runMessageLoopOnPause(v8::Handle<v8::Context>) = 0; |
| 117 virtual void quitMessageLoopOnPause() = 0; | 117 virtual void quitMessageLoopOnPause() = 0; |
| 118 | 118 |
| 119 static void breakProgramCallback(const v8::FunctionCallbackInfo<v8::Value>&)
; | 119 static void breakProgramCallback(const v8::FunctionCallbackInfo<v8::Value>&)
; |
| 120 void handleProgramBreak(v8::Handle<v8::Context> pausedContext, v8::Handle<v8
::Object> executionState, v8::Handle<v8::Value> exception, v8::Handle<v8::Array>
hitBreakpoints); | 120 void handleProgramBreak(ScriptState* pausedScriptState, v8::Handle<v8::Objec
t> executionState, v8::Handle<v8::Value> exception, v8::Handle<v8::Array> hitBre
akpoints); |
| 121 | 121 |
| 122 static void v8DebugEventCallback(const v8::Debug::EventDetails& eventDetails
); | 122 static void v8DebugEventCallback(const v8::Debug::EventDetails& eventDetails
); |
| 123 void handleV8DebugEvent(const v8::Debug::EventDetails& eventDetails); | 123 void handleV8DebugEvent(const v8::Debug::EventDetails& eventDetails); |
| 124 | 124 |
| 125 void dispatchDidParseSource(ScriptDebugListener* listener, v8::Handle<v8::Ob
ject> sourceObject); | 125 void dispatchDidParseSource(ScriptDebugListener* listener, v8::Handle<v8::Ob
ject> sourceObject); |
| 126 | 126 |
| 127 void ensureDebuggerScriptCompiled(); | 127 void ensureDebuggerScriptCompiled(); |
| 128 | 128 |
| 129 PauseOnExceptionsState m_pauseOnExceptionsState; | 129 PauseOnExceptionsState m_pauseOnExceptionsState; |
| 130 ScopedPersistent<v8::Object> m_debuggerScript; | 130 ScopedPersistent<v8::Object> m_debuggerScript; |
| 131 v8::Local<v8::Object> m_executionState; | 131 v8::Local<v8::Object> m_executionState; |
| 132 v8::Local<v8::Context> m_pausedContext; | 132 RefPtr<ScriptState> m_pausedScriptState; |
| 133 bool m_breakpointsActivated; | 133 bool m_breakpointsActivated; |
| 134 ScopedPersistent<v8::FunctionTemplate> m_breakProgramCallbackTemplate; | 134 ScopedPersistent<v8::FunctionTemplate> m_breakProgramCallbackTemplate; |
| 135 HashMap<String, OwnPtr<ScopedPersistent<v8::Script> > > m_compiledScripts; | 135 HashMap<String, OwnPtr<ScopedPersistent<v8::Script> > > m_compiledScripts; |
| 136 v8::Isolate* m_isolate; | 136 v8::Isolate* m_isolate; |
| 137 | 137 |
| 138 private: | 138 private: |
| 139 enum ScopeInfoDetails { | 139 enum ScopeInfoDetails { |
| 140 AllScopes, | 140 AllScopes, |
| 141 FastAsyncScopes, | 141 FastAsyncScopes, |
| 142 NoScopes // Should be the last option. | 142 NoScopes // Should be the last option. |
| 143 }; | 143 }; |
| 144 | 144 |
| 145 ScriptValue currentCallFramesInner(ScopeInfoDetails); | 145 ScriptValue currentCallFramesInner(ScopeInfoDetails); |
| 146 | 146 |
| 147 void stepCommandWithFrame(const char* functionName, const ScriptValue& frame
); | 147 void stepCommandWithFrame(const char* functionName, const ScriptValue& frame
); |
| 148 PassRefPtr<JavaScriptCallFrame> wrapCallFrames(int maximumLimit, ScopeInfoDe
tails); | 148 PassRefPtr<JavaScriptCallFrame> wrapCallFrames(int maximumLimit, ScopeInfoDe
tails); |
| 149 | 149 |
| 150 bool m_runningNestedMessageLoop; | 150 bool m_runningNestedMessageLoop; |
| 151 }; | 151 }; |
| 152 | 152 |
| 153 } // namespace WebCore | 153 } // namespace WebCore |
| 154 | 154 |
| 155 | 155 |
| 156 #endif // ScriptDebugServer_h | 156 #endif // ScriptDebugServer_h |
| OLD | NEW |