Changeset 28468 in webkit for trunk/JavaScriptCore/kjs/debugger.h


Ignore:
Timestamp:
Dec 5, 2007, 6:31:41 PM (17 years ago)
Author:
[email protected]
Message:

JavaScriptCore:

Reviewed by Darin Adler.

Third step in refactoring JSGlobalObject: Moved data members and
functions accessing data members from Interpreter to JSGlobalObject.
Changed Interpreter member functions to static functions.


This resolves a bug in global object bootstrapping, where the global
ExecState could be used when uninitialized.


This is a big change, but it's mostly code motion and renaming.


Layout and JS tests, and testjsglue and testapi, pass. SunSpider reports
a .7% regression, but Shark sees no difference related to this patch,
and SunSpider reported a .7% speedup from an earlier step in this
refactoring, so I think it's fair to call that a wash.

JavaScriptGlue:

Reviewed by Darin Adler.

Third step in refactoring JSGlobalObject: Moved data members and data
member access from Interpreter to JSGlobalObject. Replaced JSInterpreter
subclass with JSGlobalObject subclass.


  • JSRun.cpp: (JSRun::JSRun): (JSRun::Evaluate): (JSRun::CheckSyntax):
  • JSRun.h: (JSGlueGlobalObject::JSGlueGlobalObject):
  • JSUtils.cpp: (KJSValueToCFTypeInternal):
  • JSValueWrapper.cpp: (getThreadGlobalExecState):

WebCore:

Reviewed by Darin Adler.

Third step in refactoring JSGlobalObject: Moved data members and data
member access from Interpreter to JSGlobalObject. Changed Interpreter
member functions to static functions. Same for the subclass,
ScriptInterpreter.


This is a big change, but it's mostly code motion and renaming.

WebKit/mac:

Reviewed by Darin Adler.

Third step in refactoring JSGlobalObject: Moved data members and data
member access from Interpreter to JSGlobalObject.


  • WebView/WebFrame.mm: (-[WebFrame _attachScriptDebugger]):

WebKit/win:

Reviewed by Darin Adler.

Third step in refactoring JSGlobalObject: Moved data members and data
member access from Interpreter to JSGlobalObject.


  • WebFrame.cpp: (WebFrame::globalContext): (WebFrame::attachScriptDebugger): (WebFrame::windowObjectCleared):
  • WebScriptDebugger.cpp: (WebScriptDebugger::WebScriptDebugger):
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/kjs/debugger.h

    r15593 r28468  
    3030
    3131  class DebuggerImp;
    32   class Interpreter;
    3332  class ExecState;
    3433  class JSObject;
     
    5958
    6059    /**
    61      * Destroys the debugger. If the debugger is attached to any interpreters,
     60     * Destroys the debugger. If the debugger is attached to any global objects,
    6261     * it is automatically detached.
    6362     */
     
    6766
    6867    /**
    69      * Attaches the debugger to specified interpreter. This will cause this
    70      * object to receive notification of events from the interpreter.
    71      *
    72      * If the interpreter is deleted, the debugger will automatically be
    73      * detached.
    74      *
    75      * Note: only one debugger can be attached to an interpreter at a time.
    76      * Attaching another debugger to the same interpreter will cause the
    77      * original debugger to be detached from that interpreter.
    78      *
    79      * @param interp The interpreter to attach to
     68     * Attaches the debugger to specified global object. This will cause this
     69     * object to receive notification of events during execution.
     70     *
     71     * If the global object is deleted, it will detach the debugger.
     72     *
     73     * Note: only one debugger can be attached to a global object at a time.
     74     * Attaching another debugger to the same global object will cause the
     75     * original debugger to be detached.
     76     *
     77     * @param The global object to attach to.
    8078     *
    8179     * @see detach()
    8280     */
    83     void attach(Interpreter *interp);
    84 
    85     /**
    86      * Detach the debugger from an interpreter
    87      *
    88      * @param interp The interpreter to detach from. If 0, the debugger will be
    89      * detached from all interpreters to which it is attached.
     81    void attach(JSGlobalObject*);
     82
     83    /**
     84     * Detach the debugger from a global object.
     85     *
     86     * @param The global object to detach from. If 0, the debugger will be
     87     * detached from all global objects to which it is attached.
    9088     *
    9189     * @see attach()
    9290     */
    93     void detach(Interpreter *interp);
     91    void detach(JSGlobalObject*);
    9492
    9593    /**
     
    216214  private:
    217215    DebuggerImp *rep;
    218     HashMap<Interpreter*, ProtectedPtr<JSValue> > latestExceptions;
     216    HashMap<JSGlobalObject*, ProtectedPtr<JSValue> > latestExceptions;
    219217
    220218  public:
Note: See TracChangeset for help on using the changeset viewer.