WebCore:
Fixed <rdar://problem/
3985118> DOM objects not being marshaled on JS->native calls
Re-factored how 'native' wrappers for JS objects are created. The interpreter now
creates these wrappers. The WebCore subclass of the interpreter now overrides
createLanguageInstanceForValue() and creates a DOM ObjC wrapper for DOM objects.
* WebCore.pbproj/project.pbxproj:
* khtml/ecma/kjs_binding.cpp:
(ScriptInterpreter::createLanguageInstanceForValue):
* khtml/ecma/kjs_binding.h:
* kwq/DOMUtility.mm: Added.
(KJS::ScriptInterpreter::createObjcInstanceForValue):
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::getAppletInstanceForView):
(getInstanceForView):
(KWQKHTMLPart::getEmbedInstanceForView):
(KWQKHTMLPart::getObjectInstanceForView):
JavaScriptCore:
Fixed <rdar://problem/
3985118> DOM objects not being marshaled on JS->native calls
Re-factored how 'native' wrappers for JS objects are created. The interpreter now
creates these wrappers. The WebCore subclass of the interpreter now overrides
createLanguageInstanceForValue() and creates a DOM ObjC wrapper for DOM objects.
Reviewed by Ken.
* bindings/c/c_utility.cpp:
(convertValueToNPVariant):
* bindings/jni/jni_instance.cpp:
(JavaInstance::invokeMethod):
* bindings/jni/jni_runtime.cpp:
(JavaField::valueFromInstance):
(JavaArray::valueAt):
* bindings/objc/WebScriptObject.mm:
(-[WebScriptObject _setExecutionContext:KJS::Bindings::]):
(+[WebScriptObject _convertValueToObjcValue:KJS::originExecutionContext:Bindings::executionContext:Bindings::]):
* bindings/objc/WebScriptObjectPrivate.h:
* bindings/objc/objc_utility.h:
* bindings/objc/objc_utility.mm:
(KJS::Bindings::convertObjcValueToValue):
(KJS::Bindings::createObjcInstanceForValue):
* bindings/runtime.cpp:
(Instance::createBindingForLanguageInstance):
(Instance::createRuntimeObject):
(Instance::createLanguageInstanceForValue):
* bindings/runtime.h:
* kjs/interpreter.cpp:
(Interpreter::createLanguageInstanceForValue):
* kjs/interpreter.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8585
268f45cc-cd09-0410-ab3c-
d52691b4dbfc