Ignore:
Timestamp:
Jan 13, 2008, 3:08:39 AM (17 years ago)
Author:
[email protected]
Message:

2008-01-13 Michael Goddard <[email protected]>

Reviewed by Anders Carlsson.

Add binding language type to Instance.
Allows runtime determination of the type of an
Instance, to allow safe casting. Doesn't actually
add any safe casting yet, though.

Add a helper function to get an Instance from a JSObject*.
Given an object and the expected binding language, see if
the JSObject actually wraps an Instance of the given type
and return it. Otherwise return 0.

Move RuntimeObjectImp creations into Instance.
Make the ctor protected, and Instance a friend class, so
that all creation of RuntimeObjectImps goes through
one place.

Remove copy ctor/assignment operator for QtInstance.
Instance itself is Noncopyable, so QtInstance doesn't
need to have these.

Add caching for QtInstance and associated RuntimeObjectImps.
Push any dealings with QtLanguage bindings into QtInstance,
and cache them there, rather than in the Instance layer. Add
a QtRuntimeObjectImp to help with caching.

  • JavaScriptCore.exp:
  • bindings/c/c_instance.h:
  • bindings/jni/jni_instance.h:
  • bindings/objc/objc_instance.h:
  • bindings/qt/qt_instance.cpp: (KJS::Bindings::QtRuntimeObjectImp::QtRuntimeObjectImp): (KJS::Bindings::QtRuntimeObjectImp::~QtRuntimeObjectImp): (KJS::Bindings::QtRuntimeObjectImp::invalidate): (KJS::Bindings::QtRuntimeObjectImp::removeFromCache): (KJS::Bindings::QtInstance::QtInstance): (KJS::Bindings::QtInstance::~QtInstance): (KJS::Bindings::QtInstance::getQtInstance): (KJS::Bindings::QtInstance::getRuntimeObject):
  • bindings/qt/qt_instance.h: (KJS::Bindings::QtInstance::getBindingLanguage):
  • bindings/runtime.cpp: (KJS::Bindings::Instance::createBindingForLanguageInstance): (KJS::Bindings::Instance::createRuntimeObject): (KJS::Bindings::Instance::getInstance):
  • bindings/runtime.h:
  • bindings/runtime_object.h: (KJS::RuntimeObjectImp::getInternalInstance):

2008-01-13 Michael Goddard <[email protected]>

Reviewed by Anders Carlsson.

Move RuntimeObjectImp creations into Instance.
Make the ctor protected, and Instance a friend class, so
that all creation of RuntimeObjectImps goes through
one place.

  • bindings/js/kjs_dom.cpp: (WebCore::getRuntimeObject):
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/JavaScriptCore.exp

    r29396 r29447  
    159159__ZN3KJS16ParserRefCounted5derefEv
    160160__ZN3KJS16RuntimeObjectImp4infoE
    161 __ZN3KJS16RuntimeObjectImpC1EPNS_8Bindings8InstanceE
    162161__ZN3KJS17PropertyNameArray3addERKNS_10IdentifierE
    163162__ZN3KJS19InternalFunctionImp4infoE
     
    196195__ZN3KJS8Bindings24findProtectingRootObjectEPNS_8JSObjectE
    197196__ZN3KJS8Bindings8Instance18didExecuteFunctionEv
     197__ZN3KJS8Bindings8Instance19createRuntimeObjectEPS1_
    198198__ZN3KJS8Bindings8Instance21setDidExecuteFunctionEPFvPNS_9ExecStateEPNS_8JSObjectEE
    199199__ZN3KJS8Bindings8Instance32createBindingForLanguageInstanceENS1_15BindingLanguageEPvN3WTF10PassRefPtrINS0_10RootObjectEEE
Note: See TracChangeset for help on using the changeset viewer.