JavaScriptCore:
authorggaren <ggaren@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 14 Jul 2006 22:39:58 +0000 (22:39 +0000)
committerggaren <ggaren@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 14 Jul 2006 22:39:58 +0000 (22:39 +0000)
commit982e8171a5fa1e1f4a3ea550ab405bc17db06f38
tree846984686971d12be5bde12a13ff54cb73a04680
parent6fd0c0dc9d7ef0cfdbaefb2672e04508aba15847
JavaScriptCore:

        Reviewed by Maciej.

        - Implemented ref-counting of JSContexts by splitting into two datatypes:
        JSGlobalContext, which you can create/retain/release, and JSContext, which
        you can't.

        Internally, you retain a JSGlobalContext/ExecState by retaining its
        interpreter, which, in the case of a global ExecState, owns it.

        - Also made ~Interpreter() protected to catch places where Interpreter
        is manually deleted. (Can't make it private because some crazy fool
        decided it would be a good idea to subclass Interpreter in other frameworks.
        I pity da fool.)

        * API/APICast.h:
        (toJS): Added cast for new JSGlobalContext
        * API/JSStringRef.h: Changed vague "you must" language to more specific
        (but, ultimately, equally vague) "behavior is undefined if you don't"
        language.
        (KJS::Interpreter::Interpreter): Factored more common initialization into
        init()
        * kjs/interpreter.h:
        (KJS::Interpreter::ref): new
        (KJS::Interpreter::deref): new
        (KJS::Interpreter::refCount): new
        * kjs/testkjs.cpp:
        (doIt): Ref-count the interpreter.

JavaScriptGlue:

        Reviewed by Maciej.

        - Updated JSInterpreter to work with Interpreter ref-counting in JavaScriptCore.

        (JSInterpreter::JSInterpreter::~JSInterpreter): Now protected to catch
        manual delete.

WebCore:

        Reviewed by Maciej.

        - Updated ScriptInterpreter to work with Interpreter ref-counting in
        JavaScriptCore.

        (KJS::ScriptInterpreter::~ScriptInterpreter): Now protected to catch
        manual delete.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@15437 268f45cc-cd09-0410-ab3c-d52691b4dbfc
22 files changed:
JavaScriptCore/API/APICast.h
JavaScriptCore/API/JSBase.h
JavaScriptCore/API/JSContextRef.cpp
JavaScriptCore/API/JSContextRef.h
JavaScriptCore/API/JSStringRef.h
JavaScriptCore/API/minidom.c
JavaScriptCore/API/testapi.c
JavaScriptCore/ChangeLog
JavaScriptCore/JavaScriptCore.exp
JavaScriptCore/kjs/interpreter.cpp
JavaScriptCore/kjs/interpreter.h
JavaScriptCore/kjs/testkjs.cpp
JavaScriptGlue/ChangeLog
JavaScriptGlue/JSRun.cpp
JavaScriptGlue/JSRun.h
JavaScriptGlue/JSUtils.h
JavaScriptGlue/JSValueWrapper.cpp
WebCore/ChangeLog
WebCore/bindings/js/kjs_binding.cpp
WebCore/bindings/js/kjs_binding.h
WebCore/bindings/js/kjs_proxy.cpp
WebCore/bindings/js/kjs_proxy.h