source: webkit/trunk/JavaScriptCore/debugger/Debugger.h@ 46202

Last change on this file since 46202 was 45733, checked in by [email protected], 16 years ago

JavaScriptCore:

2009-07-10 Kevin McCullough <[email protected]>

Reviewed by Geoffrey Garen.

  • debugger/Debugger.h: Made this function virtual for use in WebCore's WebInspector.

WebCore:

2009-07-10 Kevin McCullough <[email protected]>

Reviewed by Geoffrey Garen.

  • inspector/JavaScriptCallFrame.cpp: (WebCore::JavaScriptCallFrame::dynamicGlobalObject):
  • inspector/JavaScriptCallFrame.h: New helper method, used below.
  • inspector/JavaScriptDebugServer.cpp: (WebCore::JavaScriptDebugServer::detach): In the special case where we detach from a window currently executing JavaScript, manually tear down our representation of the JavaScript call stack, since we won't get any more callbacks from JavaScriptCore to automatically tear it down. It's too bad that WebCore is responsible for this kind of tracking -- in the future, it would be nice if more of the breakpoint handling was inside of JavaScriptCore.
  • Property svn:eol-style set to native
File size: 2.3 KB
Line 
1/*
2 * Copyright (C) 1999-2001 Harri Porten ([email protected])
3 * Copyright (C) 2001 Peter Kelly ([email protected])
4 * Copyright (C) 2008 Apple Inc. All rights reserved.
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version.
10 *
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 *
20 */
21
22#ifndef Debugger_h
23#define Debugger_h
24
25#include "Protect.h"
26
27namespace JSC {
28
29 class DebuggerCallFrame;
30 class ExecState;
31 class JSGlobalObject;
32 class SourceCode;
33 class UString;
34
35 class Debugger {
36 public:
37 Debugger();
38 virtual ~Debugger();
39
40 void attach(JSGlobalObject*);
41 virtual void detach(JSGlobalObject*);
42
43 virtual void sourceParsed(ExecState*, const SourceCode&, int errorLine, const UString& errorMsg) = 0;
44 virtual void exception(const DebuggerCallFrame&, intptr_t sourceID, int lineno) = 0;
45 virtual void atStatement(const DebuggerCallFrame&, intptr_t sourceID, int lineno) = 0;
46 virtual void callEvent(const DebuggerCallFrame&, intptr_t sourceID, int lineno) = 0;
47 virtual void returnEvent(const DebuggerCallFrame&, intptr_t sourceID, int lineno) = 0;
48
49 virtual void willExecuteProgram(const DebuggerCallFrame&, intptr_t sourceID, int lineno) = 0;
50 virtual void didExecuteProgram(const DebuggerCallFrame&, intptr_t sourceID, int lineno) = 0;
51 virtual void didReachBreakpoint(const DebuggerCallFrame&, intptr_t sourceID, int lineno) = 0;
52
53 private:
54 HashSet<JSGlobalObject*> m_globalObjects;
55 };
56
57 // This method exists only for backwards compatibility with existing
58 // WebScriptDebugger clients
59 JSValue evaluateInGlobalCallFrame(const UString&, JSValue& exception, JSGlobalObject*);
60
61} // namespace JSC
62
63#endif // Debugger_h
Note: See TracBrowser for help on using the repository browser.