Commit c13d2caf authored by darin's avatar darin

JavaScriptCore:

        Rubber stamped by Maciej.

        - fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=4313
          eliminate KJS::Value and KJS::Object smart pointer wrappers (for simplicity and speed)

        * JavaScriptCore.xcodeproj/project.pbxproj: Removed object_wrapper.h.

        Global replaces and other wonderful stuff.

        * bindings/NP_jsobject.cpp:
        (_NPN_Invoke):
        (_NPN_Evaluate):
        (_NPN_GetProperty):
        (_NPN_SetProperty):
        (_NPN_HasMethod):
        (_NPN_SetException):
        * bindings/c/c_instance.cpp:
        (KJS::Bindings::CInstance::CInstance):
        (KJS::Bindings::CInstance::invokeMethod):
        (KJS::Bindings::CInstance::invokeDefaultMethod):
        (KJS::Bindings::CInstance::defaultValue):
        (KJS::Bindings::CInstance::stringValue):
        (KJS::Bindings::CInstance::numberValue):
        (KJS::Bindings::CInstance::booleanValue):
        (KJS::Bindings::CInstance::valueOf):
        * bindings/c/c_instance.h:
        * bindings/c/c_runtime.cpp:
        (CField::valueFromInstance):
        (CField::setValueToInstance):
        * bindings/c/c_runtime.h:
        * bindings/c/c_utility.cpp:
        (convertNPStringToUTF16):
        (convertUTF8ToUTF16):
        (coerceValueToNPVariantStringType):
        (convertValueToNPVariant):
        (convertNPVariantToValue):
        * bindings/c/c_utility.h:
        * bindings/jni/jni_instance.cpp:
        (JavaInstance::stringValue):
        (JavaInstance::numberValue):
        (JavaInstance::booleanValue):
        (JavaInstance::invokeMethod):
        (JavaInstance::invokeDefaultMethod):
        (JavaInstance::defaultValue):
        (JavaInstance::valueOf):
        * bindings/jni/jni_instance.h:
        * bindings/jni/jni_jsobject.cpp:
        (JSObject::invoke):
        (JSObject::call):
        (JSObject::eval):
        (JSObject::getMember):
        (JSObject::getSlot):
        (JSObject::toString):
        (JSObject::convertValueToJObject):
        (JSObject::convertJObjectToValue):
        (JSObject::listFromJArray):
        * bindings/jni/jni_jsobject.h:
        * bindings/jni/jni_objc.mm:
        (KJS::Bindings::dispatchJNICall):
        * bindings/jni/jni_runtime.cpp:
        (JavaArray::convertJObjectToArray):
        (JavaField::dispatchValueFromInstance):
        (JavaField::valueFromInstance):
        (JavaField::dispatchSetValueToInstance):
        (JavaField::setValueToInstance):
        (JavaArray::setValueAt):
        (JavaArray::valueAt):
        * bindings/jni/jni_runtime.h:
        (KJS::Bindings::JavaString::ustring):
        * bindings/jni/jni_utility.cpp:
        (KJS::Bindings::getJavaVM):
        (KJS::Bindings::getJNIEnv):
        (KJS::Bindings::getMethodID):
        (KJS::Bindings::callJNIVoidMethod):
        (KJS::Bindings::callJNIObjectMethod):
        (KJS::Bindings::callJNIBooleanMethod):
        (KJS::Bindings::callJNIStaticBooleanMethod):
        (KJS::Bindings::callJNIByteMethod):
        (KJS::Bindings::callJNICharMethod):
        (KJS::Bindings::callJNIShortMethod):
        (KJS::Bindings::callJNIIntMethod):
        (KJS::Bindings::callJNILongMethod):
        (KJS::Bindings::callJNIFloatMethod):
        (KJS::Bindings::callJNIDoubleMethod):
        (KJS::Bindings::callJNIVoidMethodA):
        (KJS::Bindings::callJNIObjectMethodA):
        (KJS::Bindings::callJNIByteMethodA):
        (KJS::Bindings::callJNICharMethodA):
        (KJS::Bindings::callJNIShortMethodA):
        (KJS::Bindings::callJNIIntMethodA):
        (KJS::Bindings::callJNILongMethodA):
        (KJS::Bindings::callJNIFloatMethodA):
        (KJS::Bindings::callJNIDoubleMethodA):
        (KJS::Bindings::callJNIBooleanMethodA):
        (KJS::Bindings::callJNIVoidMethodIDA):
        (KJS::Bindings::callJNIObjectMethodIDA):
        (KJS::Bindings::callJNIByteMethodIDA):
        (KJS::Bindings::callJNICharMethodIDA):
        (KJS::Bindings::callJNIShortMethodIDA):
        (KJS::Bindings::callJNIIntMethodIDA):
        (KJS::Bindings::callJNILongMethodIDA):
        (KJS::Bindings::callJNIFloatMethodIDA):
        (KJS::Bindings::callJNIDoubleMethodIDA):
        (KJS::Bindings::callJNIBooleanMethodIDA):
        (KJS::Bindings::getCharactersFromJString):
        (KJS::Bindings::releaseCharactersForJString):
        (KJS::Bindings::getCharactersFromJStringInEnv):
        (KJS::Bindings::releaseCharactersForJStringInEnv):
        (KJS::Bindings::getUCharactersFromJStringInEnv):
        (KJS::Bindings::releaseUCharactersForJStringInEnv):
        (KJS::Bindings::JNITypeFromClassName):
        (KJS::Bindings::signatureFromPrimitiveType):
        (KJS::Bindings::JNITypeFromPrimitiveType):
        (KJS::Bindings::getJNIField):
        (KJS::Bindings::convertValueToJValue):
        * bindings/jni/jni_utility.h:
        * bindings/objc/WebScriptObject.mm:
        (_didExecute):
        (-[WebScriptObject _initializeWithObjectImp:originExecutionContext:Bindings::executionContext:Bindings::]):
        (-[WebScriptObject _initWithObjectImp:originExecutionContext:Bindings::executionContext:Bindings::]):
        (-[WebScriptObject _imp]):
        (-[WebScriptObject _executionContext]):
        (-[WebScriptObject _setExecutionContext:]):
        (-[WebScriptObject _originExecutionContext]):
        (-[WebScriptObject _setOriginExecutionContext:]):
        (+[WebScriptObject throwException:]):
        (listFromNSArray):
        (-[WebScriptObject callWebScriptMethod:withArguments:]):
        (-[WebScriptObject evaluateWebScript:]):
        (-[WebScriptObject setValue:forKey:]):
        (-[WebScriptObject valueForKey:]):
        (-[WebScriptObject removeWebScriptKey:]):
        (-[WebScriptObject stringRepresentation]):
        (-[WebScriptObject webScriptValueAtIndex:]):
        (-[WebScriptObject setException:]):
        (+[WebScriptObject _convertValueToObjcValue:originExecutionContext:executionContext:Bindings::]):
        * bindings/objc/WebScriptObjectPrivate.h:
        * bindings/objc/objc_class.h:
        * bindings/objc/objc_class.mm:
        (KJS::Bindings::ObjcClass::fallbackObject):
        * bindings/objc/objc_instance.h:
        * bindings/objc/objc_instance.mm:
        (ObjcInstance::invokeMethod):
        (ObjcInstance::invokeDefaultMethod):
        (ObjcInstance::setValueOfField):
        (ObjcInstance::setValueOfUndefinedField):
        (ObjcInstance::getValueOfField):
        (ObjcInstance::getValueOfUndefinedField):
        (ObjcInstance::defaultValue):
        (ObjcInstance::stringValue):
        (ObjcInstance::numberValue):
        (ObjcInstance::booleanValue):
        (ObjcInstance::valueOf):
        * bindings/objc/objc_runtime.h:
        * bindings/objc/objc_runtime.mm:
        (ObjcField::valueFromInstance):
        (convertValueToObjcObject):
        (ObjcField::setValueToInstance):
        (ObjcArray::setValueAt):
        (ObjcArray::valueAt):
        (ObjcFallbackObjectImp::put):
        (ObjcFallbackObjectImp::callAsFunction):
        (ObjcFallbackObjectImp::defaultValue):
        * bindings/objc/objc_utility.h:
        * bindings/objc/objc_utility.mm:
        (Bindings::JSMethodNameToObjCMethodName):
        (Bindings::convertValueToObjcValue):
        (Bindings::convertNSStringToString):
        (Bindings::convertObjcValueToValue):
        (Bindings::objcValueTypeForType):
        (Bindings::createObjcInstanceForValue):
        * bindings/runtime.cpp:
        (Instance::getValueOfField):
        (Instance::setValueOfField):
        (Instance::createRuntimeObject):
        (Instance::createLanguageInstanceForValue):
        * bindings/runtime.h:
        (KJS::Bindings::Constructor::~Constructor):
        (KJS::Bindings::Field::~Field):
        (KJS::Bindings::MethodList::MethodList):
        (KJS::Bindings::Class::fallbackObject):
        (KJS::Bindings::Class::~Class):
        (KJS::Bindings::Instance::Instance):
        (KJS::Bindings::Instance::getValueOfUndefinedField):
        (KJS::Bindings::Instance::supportsSetValueOfUndefinedField):
        (KJS::Bindings::Instance::setValueOfUndefinedField):
        (KJS::Bindings::Instance::valueOf):
        (KJS::Bindings::Instance::setExecutionContext):
        (KJS::Bindings::Instance::~Instance):
        (KJS::Bindings::Array::~Array):
        * bindings/runtime_array.cpp:
        (RuntimeArrayImp::RuntimeArrayImp):
        (RuntimeArrayImp::lengthGetter):
        (RuntimeArrayImp::indexGetter):
        (RuntimeArrayImp::put):
        * bindings/runtime_array.h:
        * bindings/runtime_method.cpp:
        (RuntimeMethodImp::lengthGetter):
        (RuntimeMethodImp::callAsFunction):
        * bindings/runtime_method.h:
        * bindings/runtime_object.cpp:
        (RuntimeObjectImp::fallbackObjectGetter):
        (RuntimeObjectImp::fieldGetter):
        (RuntimeObjectImp::methodGetter):
        (RuntimeObjectImp::getOwnPropertySlot):
        (RuntimeObjectImp::put):
        (RuntimeObjectImp::defaultValue):
        (RuntimeObjectImp::callAsFunction):
        * bindings/runtime_object.h:
        * kjs/array_instance.h:
        * kjs/array_object.cpp:
        (ArrayInstanceImp::ArrayInstanceImp):
        (ArrayInstanceImp::lengthGetter):
        (ArrayInstanceImp::getOwnPropertySlot):
        (ArrayInstanceImp::put):
        (ArrayInstanceImp::propList):
        (ArrayInstanceImp::setLength):
        (compareByStringForQSort):
        (compareWithCompareFunctionForQSort):
        (ArrayInstanceImp::sort):
        (ArrayInstanceImp::pushUndefinedObjectsToEnd):
        (ArrayPrototypeImp::ArrayPrototypeImp):
        (ArrayProtoFuncImp::ArrayProtoFuncImp):
        (ArrayProtoFuncImp::callAsFunction):
        (ArrayObjectImp::ArrayObjectImp):
        (ArrayObjectImp::construct):
        (ArrayObjectImp::callAsFunction):
        * kjs/array_object.h:
        * kjs/bool_object.cpp:
        (BooleanPrototypeImp::BooleanPrototypeImp):
        (BooleanProtoFuncImp::BooleanProtoFuncImp):
        (BooleanProtoFuncImp::callAsFunction):
        (BooleanObjectImp::BooleanObjectImp):
        (BooleanObjectImp::construct):
        (BooleanObjectImp::callAsFunction):
        * kjs/bool_object.h:
        * kjs/collector.cpp:
        (KJS::Collector::markStackObjectsConservatively):
        (KJS::Collector::collect):
        (KJS::className):
        * kjs/completion.h:
        (KJS::Completion::Completion):
        (KJS::Completion::value):
        (KJS::Completion::isValueCompletion):
        * kjs/context.h:
        (KJS::ContextImp::variableObject):
        (KJS::ContextImp::setVariableObject):
        (KJS::ContextImp::thisValue):
        (KJS::ContextImp::activationObject):
        (KJS::ContextImp::pushScope):
        * kjs/date_object.cpp:
        (formatLocaleDate):
        (KJS::timeFromArgs):
        (KJS::DatePrototypeImp::DatePrototypeImp):
        (KJS::DateProtoFuncImp::DateProtoFuncImp):
        (KJS::DateProtoFuncImp::callAsFunction):
        (KJS::DateObjectImp::DateObjectImp):
        (KJS::DateObjectImp::construct):
        (KJS::DateObjectImp::callAsFunction):
        (KJS::DateObjectFuncImp::DateObjectFuncImp):
        (KJS::DateObjectFuncImp::callAsFunction):
        (KJS::parseDate):
        (KJS::KRFCDate_parseDate):
        (KJS::timeClip):
        * kjs/date_object.h:
        * kjs/debugger.cpp:
        (Debugger::exception):
        (Debugger::callEvent):
        (Debugger::returnEvent):
        * kjs/debugger.h:
        * kjs/error_object.cpp:
        (ErrorPrototypeImp::ErrorPrototypeImp):
        (ErrorProtoFuncImp::ErrorProtoFuncImp):
        (ErrorProtoFuncImp::callAsFunction):
        (ErrorObjectImp::ErrorObjectImp):
        (ErrorObjectImp::construct):
        (ErrorObjectImp::callAsFunction):
        (NativeErrorPrototypeImp::NativeErrorPrototypeImp):
        (NativeErrorImp::NativeErrorImp):
        (NativeErrorImp::construct):
        (NativeErrorImp::callAsFunction):
        * kjs/error_object.h:
        * kjs/function.cpp:
        (KJS::FunctionImp::FunctionImp):
        (KJS::FunctionImp::callAsFunction):
        (KJS::FunctionImp::processParameters):
        (KJS::FunctionImp::argumentsGetter):
        (KJS::FunctionImp::lengthGetter):
        (KJS::FunctionImp::put):
        (KJS::DeclaredFunctionImp::DeclaredFunctionImp):
        (KJS::DeclaredFunctionImp::construct):
        (KJS::ArgumentsImp::ArgumentsImp):
        (KJS::ArgumentsImp::mappedIndexGetter):
        (KJS::ArgumentsImp::put):
        (KJS::ActivationImp::argumentsGetter):
        (KJS::GlobalFuncImp::GlobalFuncImp):
        (KJS::encode):
        (KJS::decode):
        (KJS::GlobalFuncImp::callAsFunction):
        * kjs/function.h:
        * kjs/function_object.cpp:
        (FunctionPrototypeImp::FunctionPrototypeImp):
        (FunctionPrototypeImp::callAsFunction):
        (FunctionProtoFuncImp::FunctionProtoFuncImp):
        (FunctionProtoFuncImp::callAsFunction):
        (FunctionObjectImp::FunctionObjectImp):
        (FunctionObjectImp::construct):
        (FunctionObjectImp::callAsFunction):
        * kjs/function_object.h:
        * kjs/internal.cpp:
        (KJS::UndefinedImp::toPrimitive):
        (KJS::UndefinedImp::toObject):
        (KJS::NullImp::toPrimitive):
        (KJS::NullImp::toObject):
        (KJS::BooleanImp::toPrimitive):
        (KJS::BooleanImp::toObject):
        (KJS::StringImp::toPrimitive):
        (KJS::StringImp::toObject):
        (KJS::NumberImp::toPrimitive):
        (KJS::NumberImp::toObject):
        (KJS::NumberImp::getUInt32):
        (KJS::LabelStack::push):
        (KJS::ContextImp::ContextImp):
        (KJS::InterpreterImp::globalInit):
        (KJS::InterpreterImp::globalClear):
        (KJS::InterpreterImp::InterpreterImp):
        (KJS::InterpreterImp::initGlobalObject):
        (KJS::InterpreterImp::clear):
        (KJS::InterpreterImp::mark):
        (KJS::InterpreterImp::evaluate):
        (KJS::InternalFunctionImp::hasInstance):
        (KJS::roundValue):
        (KJS::printInfo):
        * kjs/internal.h:
        (KJS::InterpreterImp::builtinObject):
        (KJS::InterpreterImp::builtinFunction):
        (KJS::InterpreterImp::builtinArray):
        (KJS::InterpreterImp::builtinBoolean):
        (KJS::InterpreterImp::builtinString):
        (KJS::InterpreterImp::builtinNumber):
        (KJS::InterpreterImp::builtinDate):
        (KJS::InterpreterImp::builtinRegExp):
        (KJS::InterpreterImp::builtinError):
        (KJS::InterpreterImp::builtinObjectPrototype):
        (KJS::InterpreterImp::builtinFunctionPrototype):
        (KJS::InterpreterImp::builtinArrayPrototype):
        (KJS::InterpreterImp::builtinBooleanPrototype):
        (KJS::InterpreterImp::builtinStringPrototype):
        (KJS::InterpreterImp::builtinNumberPrototype):
        (KJS::InterpreterImp::builtinDatePrototype):
        (KJS::InterpreterImp::builtinRegExpPrototype):
        (KJS::InterpreterImp::builtinErrorPrototype):
        (KJS::InterpreterImp::builtinEvalError):
        (KJS::InterpreterImp::builtinRangeError):
        (KJS::InterpreterImp::builtinReferenceError):
        (KJS::InterpreterImp::builtinSyntaxError):
        (KJS::InterpreterImp::builtinTypeError):
        (KJS::InterpreterImp::builtinURIError):
        (KJS::InterpreterImp::builtinEvalErrorPrototype):
        (KJS::InterpreterImp::builtinRangeErrorPrototype):
        (KJS::InterpreterImp::builtinReferenceErrorPrototype):
        (KJS::InterpreterImp::builtinSyntaxErrorPrototype):
        (KJS::InterpreterImp::builtinTypeErrorPrototype):
        (KJS::InterpreterImp::builtinURIErrorPrototype):
        * kjs/interpreter.cpp:
        (Context::variableObject):
        (Context::thisValue):
        (Interpreter::Interpreter):
        (Interpreter::globalObject):
        (Interpreter::evaluate):
        (Interpreter::builtinObject):
        (Interpreter::builtinFunction):
        (Interpreter::builtinArray):
        (Interpreter::builtinBoolean):
        (Interpreter::builtinString):
        (Interpreter::builtinNumber):
        (Interpreter::builtinDate):
        (Interpreter::builtinRegExp):
        (Interpreter::builtinError):
        (Interpreter::builtinObjectPrototype):
        (Interpreter::builtinFunctionPrototype):
        (Interpreter::builtinArrayPrototype):
        (Interpreter::builtinBooleanPrototype):
        (Interpreter::builtinStringPrototype):
        (Interpreter::builtinNumberPrototype):
        (Interpreter::builtinDatePrototype):
        (Interpreter::builtinRegExpPrototype):
        (Interpreter::builtinErrorPrototype):
        (Interpreter::builtinEvalError):
        (Interpreter::builtinRangeError):
        (Interpreter::builtinReferenceError):
        (Interpreter::builtinSyntaxError):
        (Interpreter::builtinTypeError):
        (Interpreter::builtinURIError):
        (Interpreter::builtinEvalErrorPrototype):
        (Interpreter::builtinRangeErrorPrototype):
        (Interpreter::builtinReferenceErrorPrototype):
        (Interpreter::builtinSyntaxErrorPrototype):
        (Interpreter::builtinTypeErrorPrototype):
        (Interpreter::builtinURIErrorPrototype):
        (Interpreter::createLanguageInstanceForValue):
        * kjs/interpreter.h:
        (KJS::Interpreter::isGlobalObject):
        (KJS::ExecState::setException):
        (KJS::ExecState::clearException):
        (KJS::ExecState::exception):
        (KJS::ExecState::hadException):
        (KJS::ExecState::ExecState):
        * kjs/list.cpp:
        (KJS::List::at):
        * kjs/list.h:
        (KJS::List::operator[]):
        (KJS::ListIterator::operator->):
        (KJS::ListIterator::operator*):
        (KJS::ListIterator::operator++):
        (KJS::ListIterator::operator--):
        * kjs/lookup.h:
        (KJS::staticFunctionGetter):
        (KJS::staticValueGetter):
        (KJS::lookupPut):
        (KJS::cacheGlobalObject):
        * kjs/math_object.cpp:
        (MathObjectImp::getValueProperty):
        (MathFuncImp::MathFuncImp):
        (MathFuncImp::callAsFunction):
        * kjs/math_object.h:
        * kjs/nodes.cpp:
        (Node::evaluateReference):
        (Node::throwError):
        (Node::setExceptionDetailsIfNeeded):
        (NullNode::evaluate):
        (BooleanNode::evaluate):
        (NumberNode::evaluate):
        (StringNode::evaluate):
        (RegExpNode::evaluate):
        (ThisNode::evaluate):
        (ResolveNode::evaluate):
        (ResolveNode::evaluateReference):
        (GroupNode::evaluate):
        (ElementNode::evaluate):
        (ArrayNode::evaluate):
        (ObjectLiteralNode::evaluate):
        (PropertyValueNode::evaluate):
        (PropertyNode::evaluate):
        (AccessorNode1::evaluate):
        (AccessorNode1::evaluateReference):
        (AccessorNode2::evaluate):
        (AccessorNode2::evaluateReference):
        (ArgumentListNode::evaluate):
        (ArgumentListNode::evaluateList):
        (ArgumentsNode::evaluate):
        (NewExprNode::evaluate):
        (FunctionCallNode::evaluate):
        (PostfixNode::evaluate):
        (DeleteNode::evaluate):
        (VoidNode::evaluate):
        (TypeOfNode::evaluate):
        (PrefixNode::evaluate):
        (UnaryPlusNode::evaluate):
        (NegateNode::evaluate):
        (BitwiseNotNode::evaluate):
        (LogicalNotNode::evaluate):
        (MultNode::evaluate):
        (AddNode::evaluate):
        (ShiftNode::evaluate):
        (RelationalNode::evaluate):
        (EqualNode::evaluate):
        (BitOperNode::evaluate):
        (BinaryLogicalNode::evaluate):
        (ConditionalNode::evaluate):
        (AssignNode::evaluate):
        (CommaNode::evaluate):
        (StatListNode::execute):
        (AssignExprNode::evaluate):
        (VarDeclNode::evaluate):
        (VarDeclNode::processVarDecls):
        (VarDeclListNode::evaluate):
        (ExprStatementNode::execute):
        (IfNode::execute):
        (DoWhileNode::execute):
        (WhileNode::execute):
        (ForNode::execute):
        (ForInNode::execute):
        (ContinueNode::execute):
        (BreakNode::execute):
        (ReturnNode::execute):
        (WithNode::execute):
        (CaseClauseNode::evaluate):
        (ClauseListNode::evaluate):
        (CaseBlockNode::evaluate):
        (CaseBlockNode::evalBlock):
        (SwitchNode::execute):
        (ThrowNode::execute):
        (CatchNode::execute):
        (TryNode::execute):
        (ParameterNode::evaluate):
        (FuncDeclNode::processFuncDecl):
        (FuncExprNode::evaluate):
        (SourceElementsNode::execute):
        * kjs/nodes.h:
        (KJS::StatementNode::evaluate):
        * kjs/number_object.cpp:
        (NumberPrototypeImp::NumberPrototypeImp):
        (NumberProtoFuncImp::NumberProtoFuncImp):
        (NumberProtoFuncImp::callAsFunction):
        (NumberObjectImp::NumberObjectImp):
        (NumberObjectImp::getValueProperty):
        (NumberObjectImp::construct):
        (NumberObjectImp::callAsFunction):
        * kjs/number_object.h:
        * kjs/object.cpp:
        (KJS::ObjectImp::call):
        (KJS::ObjectImp::mark):
        (KJS::ObjectImp::classInfo):
        (KJS::ObjectImp::get):
        (KJS::ObjectImp::getProperty):
        (KJS::ObjectImp::getPropertySlot):
        (KJS::ObjectImp::put):
        (KJS::ObjectImp::hasOwnProperty):
        (KJS::ObjectImp::defaultValue):
        (KJS::ObjectImp::findPropertyHashEntry):
        (KJS::ObjectImp::construct):
        (KJS::ObjectImp::callAsFunction):
        (KJS::ObjectImp::hasInstance):
        (KJS::ObjectImp::propList):
        (KJS::ObjectImp::toPrimitive):
        (KJS::ObjectImp::toNumber):
        (KJS::ObjectImp::toString):
        (KJS::ObjectImp::toObject):
        (KJS::ObjectImp::putDirect):
        (KJS::Error::create):
        (KJS::error):
        * kjs/object.h:
        (KJS::):
        (KJS::ObjectImp::getPropertySlot):
        (KJS::AllocatedValueImp::isObject):
        (KJS::ObjectImp::ObjectImp):
        (KJS::ObjectImp::internalValue):
        (KJS::ObjectImp::setInternalValue):
        (KJS::ObjectImp::prototype):
        (KJS::ObjectImp::setPrototype):
        (KJS::ObjectImp::inherits):
        * kjs/object_object.cpp:
        (ObjectPrototypeImp::ObjectPrototypeImp):
        (ObjectProtoFuncImp::ObjectProtoFuncImp):
        (ObjectProtoFuncImp::callAsFunction):
        (ObjectObjectImp::ObjectObjectImp):
        (ObjectObjectImp::construct):
        (ObjectObjectImp::callAsFunction):
        * kjs/object_object.h:
        * kjs/operations.cpp:
        (KJS::equal):
        (KJS::strictEqual):
        (KJS::relation):
        (KJS::add):
        (KJS::mult):
        * kjs/operations.h:
        * kjs/property_map.cpp:
        (KJS::PropertyMap::mark):
        (KJS::PropertyMap::addEnumerablesToReferenceList):
        (KJS::PropertyMap::addSparseArrayPropertiesToReferenceList):
        (KJS::PropertyMap::save):
        (KJS::PropertyMap::restore):
        * kjs/property_map.h:
        * kjs/property_slot.cpp:
        (KJS::PropertySlot::undefinedGetter):
        * kjs/property_slot.h:
        (KJS::PropertySlot::getValue):
        * kjs/protect.h:
        (KJS::gcUnprotectNullTolerant):
        (KJS::ProtectedValue::ProtectedValue):
        (KJS::ProtectedValue::~ProtectedValue):
        (KJS::ProtectedValue::operator=):
        (KJS::ProtectedValue::operator ValueImp *):
        (KJS::ProtectedValue::operator->):
        * kjs/protected_object.h:
        (KJS::ProtectedObject::ProtectedObject):
        (KJS::ProtectedObject::operator=):
        (KJS::ProtectedObject::operator ValueImp *):
        (KJS::ProtectedObject::operator ObjectImp *):
        (KJS::ProtectedObject::operator->):
        (KJS::ProtectedReference::ProtectedReference):
        (KJS::ProtectedReference::~ProtectedReference):
        (KJS::ProtectedReference::operator=):
        * kjs/protected_values.cpp:
        (KJS::ProtectedValues::getProtectCount):
        (KJS::ProtectedValues::increaseProtectCount):
        (KJS::ProtectedValues::insert):
        (KJS::ProtectedValues::decreaseProtectCount):
        * kjs/protected_values.h:
        * kjs/reference.cpp:
        (KJS::Reference::Reference):
        (KJS::Reference::makeValueReference):
        (KJS::Reference::getBase):
        (KJS::Reference::getValue):
        (KJS::Reference::putValue):
        (KJS::Reference::deleteValue):
        * kjs/reference.h:
        (KJS::Reference::baseIfMutable):
        * kjs/regexp_object.cpp:
        (RegExpPrototypeImp::RegExpPrototypeImp):
        (RegExpProtoFuncImp::RegExpProtoFuncImp):
        (RegExpProtoFuncImp::callAsFunction):
        (RegExpObjectImp::RegExpObjectImp):
        (RegExpObjectImp::arrayOfMatches):
        (RegExpObjectImp::backrefGetter):
        (RegExpObjectImp::construct):
        (RegExpObjectImp::callAsFunction):
        * kjs/regexp_object.h:
        * kjs/string_object.cpp:
        (StringInstanceImp::lengthGetter):
        (StringInstanceImp::indexGetter):
        (StringInstanceImp::getOwnPropertySlot):
        (StringInstanceImp::put):
        (StringPrototypeImp::StringPrototypeImp):
        (StringProtoFuncImp::StringProtoFuncImp):
        (regExpIsGlobal):
        (replace):
        (StringProtoFuncImp::callAsFunction):
        (StringObjectImp::StringObjectImp):
        (StringObjectImp::construct):
        (StringObjectImp::callAsFunction):
        (StringObjectFuncImp::StringObjectFuncImp):
        (StringObjectFuncImp::callAsFunction):
        * kjs/string_object.h:
        * kjs/testkjs.cpp:
        (TestFunctionImp::callAsFunction):
        (VersionFunctionImp::callAsFunction):
        (main):
        * kjs/value.cpp:
        (KJS::AllocatedValueImp::operator new):
        (KJS::AllocatedValueImp::getUInt32):
        (KJS::ValueImp::toInteger):
        (KJS::ValueImp::toInt32):
        (KJS::ValueImp::toUInt32):
        (KJS::ValueImp::toUInt16):
        (KJS::ValueImp::toObject):
        (KJS::AllocatedValueImp::getBoolean):
        (KJS::AllocatedValueImp::getNumber):
        (KJS::AllocatedValueImp::getString):
        (KJS::AllocatedValueImp::getObject):
        (KJS::jsString):
        (KJS::jsNumber):
        (KJS::ConstantValues::init):
        (KJS::ConstantValues::clear):
        (KJS::ConstantValues::mark):
        * kjs/value.h:
        (KJS::):
        (KJS::jsUndefined):
        (KJS::jsNull):
        (KJS::jsBoolean):
        (KJS::jsNaN):
        (KJS::ValueImp::ValueImp):
        (KJS::ValueImp::~ValueImp):
        (KJS::AllocatedValueImp::AllocatedValueImp):
        (KJS::AllocatedValueImp::~AllocatedValueImp):
        (KJS::AllocatedValueImp::isBoolean):
        (KJS::AllocatedValueImp::isNumber):
        (KJS::AllocatedValueImp::isString):
        (KJS::AllocatedValueImp::isObject):
        (KJS::AllocatedValueImp::marked):
        (KJS::AllocatedValueImp::mark):
        (KJS::ValueImp::downcast):
        (KJS::ValueImp::isUndefined):
        (KJS::ValueImp::isNull):
        (KJS::ValueImp::isUndefinedOrNull):
        (KJS::ValueImp::isBoolean):
        (KJS::ValueImp::isNumber):
        (KJS::ValueImp::isString):
        (KJS::ValueImp::isObject):
        (KJS::ValueImp::getBoolean):
        (KJS::ValueImp::getNumber):
        (KJS::ValueImp::getString):
        (KJS::ValueImp::getObject):
        (KJS::ValueImp::getUInt32):
        (KJS::ValueImp::mark):
        (KJS::ValueImp::marked):
        (KJS::ValueImp::type):
        (KJS::ValueImp::toPrimitive):
        (KJS::ValueImp::toBoolean):
        (KJS::ValueImp::toNumber):
        (KJS::ValueImp::toString):
        (KJS::jsZero):
        (KJS::jsOne):
        (KJS::jsTwo):
        (KJS::Undefined):
        (KJS::Null):
        (KJS::Boolean):
        (KJS::Number):
        (KJS::String):

WebCore:

        Rubber stamped by Maciej.

        - fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=4313
          eliminate KJS::Value and KJS::Object smart pointer wrappers (for simplicity and speed)

        * khtml/ecma/domparser.cpp:
        (KJS::DOMParserConstructorImp::construct):
        (KJS::DOMParserProtoFunc::callAsFunction):
        * khtml/ecma/domparser.h:
        * khtml/ecma/kjs_binding.cpp:
        (KJS::ScriptInterpreter::ScriptInterpreter):
        (KJS::ScriptInterpreter::isGlobalObject):
        (KJS::ScriptInterpreter::createLanguageInstanceForValue):
        (KJS::getStringOrNull):
        (KJS::ValueToVariant):
        (KJS::setDOMException):
        * khtml/ecma/kjs_binding.h:
        (KJS::DOMFunction::toPrimitive):
        (KJS::cacheDOMObject):
        * khtml/ecma/kjs_css.cpp:
        (KJS::DOMCSSStyleDeclaration::indexGetter):
        (KJS::DOMCSSStyleDeclaration::cssPropertyGetter):
        (KJS::DOMCSSStyleDeclaration::getValueProperty):
        (KJS::DOMCSSStyleDeclaration::put):
        (KJS::DOMCSSStyleDeclarationProtoFunc::callAsFunction):
        (KJS::DOMStyleSheet::getValueProperty):
        (KJS::DOMStyleSheet::put):
        (KJS::DOMStyleSheetList::getValueProperty):
        (KJS::DOMStyleSheetList::indexGetter):
        (KJS::DOMStyleSheetList::nameGetter):
        (KJS::DOMStyleSheetListFunc::callAsFunction):
        (KJS::DOMMediaList::getValueProperty):
        (KJS::DOMMediaList::indexGetter):
        (KJS::DOMMediaList::put):
        (KJS::KJS::DOMMediaListProtoFunc::callAsFunction):
        (KJS::DOMCSSStyleSheet::getValueProperty):
        (KJS::DOMCSSStyleSheetProtoFunc::callAsFunction):
        (KJS::DOMCSSRuleList::getValueProperty):
        (KJS::DOMCSSRuleList::indexGetter):
        (KJS::DOMCSSRuleListFunc::callAsFunction):
        (KJS::DOMCSSRule::getValueProperty):
        (KJS::DOMCSSRule::put):
        (KJS::DOMCSSRule::putValueProperty):
        (KJS::DOMCSSRuleFunc::callAsFunction):
        (KJS::CSSRuleConstructor::getValueProperty):
        (KJS::getCSSRuleConstructor):
        (KJS::DOMCSSValue::getValueProperty):
        (KJS::DOMCSSValue::put):
        (KJS::getDOMCSSValue):
        (KJS::CSSValueConstructor::getValueProperty):
        (KJS::getCSSValueConstructor):
        (KJS::DOMCSSPrimitiveValue::getValueProperty):
        (KJS::DOMCSSPrimitiveValueProtoFunc::callAsFunction):
        (KJS::CSSPrimitiveValueConstructor::getValueProperty):
        (KJS::getCSSPrimitiveValueConstructor):
        (KJS::DOMCSSValueList::getValueProperty):
        (KJS::DOMCSSValueList::indexGetter):
        (KJS::DOMCSSValueListFunc::callAsFunction):
        (KJS::DOMRGBColor::getValueProperty):
        (KJS::DOMRect::getValueProperty):
        (KJS::DOMCounter::getValueProperty):
        * khtml/ecma/kjs_css.h:
        * khtml/ecma/kjs_dom.cpp:
        (KJS::DOMNode::getValueProperty):
        (KJS::DOMNode::put):
        (KJS::DOMNode::putValueProperty):
        (KJS::DOMNode::toPrimitive):
        (KJS::DOMNode::getListener):
        (KJS::DOMNodeProtoFunc::callAsFunction):
        (KJS::DOMNodeList::toPrimitive):
        (KJS::DOMNodeList::getValueProperty):
        (KJS::DOMNodeList::indexGetter):
        (KJS::DOMNodeList::nameGetter):
        (KJS::DOMNodeList::callAsFunction):
        (KJS::DOMNodeListFunc::DOMNodeListFunc):
        (KJS::DOMNodeListFunc::callAsFunction):
        (KJS::DOMAttr::getValueProperty):
        (KJS::DOMAttr::put):
        (KJS::DOMAttr::putValueProperty):
        (KJS::DOMDocument::getValueProperty):
        (KJS::DOMDocument::put):
        (KJS::DOMDocument::putValueProperty):
        (KJS::DOMDocumentProtoFunc::callAsFunction):
        (KJS::DOMElement::getValueProperty):
        (KJS::DOMElement::attributeGetter):
        (KJS::DOMElement::getOwnPropertySlot):
        (KJS::DOMElementProtoFunc::callAsFunction):
        (KJS::DOMDOMImplementationProtoFunc::callAsFunction):
        (KJS::DOMDocumentType::getValueProperty):
        (KJS::DOMNamedNodeMap::lengthGetter):
        (KJS::DOMNamedNodeMap::indexGetter):
        (KJS::DOMNamedNodeMapProtoFunc::callAsFunction):
        (KJS::DOMProcessingInstruction::getValueProperty):
        (KJS::DOMProcessingInstruction::put):
        (KJS::DOMNotation::getValueProperty):
        (KJS::DOMEntity::getValueProperty):
        (KJS::NodeConstructor::getValueProperty):
        (KJS::DOMExceptionConstructor::getValueProperty):
        (KJS::DOMNamedNodesCollection::lengthGetter):
        (KJS::DOMNamedNodesCollection::indexGetter):
        (KJS::DOMCharacterData::getValueProperty):
        (KJS::DOMCharacterData::put):
        (KJS::DOMCharacterDataProtoFunc::callAsFunction):
        (KJS::DOMTextProtoFunc::callAsFunction):
        * khtml/ecma/kjs_dom.h:
        * khtml/ecma/kjs_events.cpp:
        (KJS::JSAbstractEventListener::handleEvent):
        (KJS::JSUnprotectedEventListener::JSUnprotectedEventListener):
        (KJS::JSUnprotectedEventListener::~JSUnprotectedEventListener):
        (KJS::JSUnprotectedEventListener::listenerObj):
        (KJS::JSUnprotectedEventListener::windowObj):
        (KJS::JSUnprotectedEventListener::mark):
        (KJS::JSEventListener::JSEventListener):
        (KJS::JSEventListener::~JSEventListener):
        (KJS::JSEventListener::listenerObj):
        (KJS::JSEventListener::windowObj):
        (KJS::JSLazyEventListener::JSLazyEventListener):
        (KJS::JSLazyEventListener::handleEvent):
        (KJS::JSLazyEventListener::listenerObj):
        (KJS::JSLazyEventListener::parseCode):
        (KJS::getNodeEventListener):
        (KJS::EventConstructor::getValueProperty):
        (KJS::getEventConstructor):
        (KJS::DOMEvent::getValueProperty):
        (KJS::DOMEvent::put):
        (KJS::DOMEvent::putValueProperty):
        (KJS::DOMEventProtoFunc::callAsFunction):
        (KJS::getDOMEvent):
        (KJS::EventExceptionConstructor::getValueProperty):
        (KJS::getEventExceptionConstructor):
        (KJS::DOMUIEvent::getValueProperty):
        (KJS::DOMUIEventProtoFunc::callAsFunction):
        (KJS::DOMMouseEvent::getValueProperty):
        (KJS::DOMMouseEventProtoFunc::callAsFunction):
        (KJS::DOMKeyboardEvent::getValueProperty):
        (KJS::DOMKeyboardEventProtoFunc::callAsFunction):
        (KJS::MutationEventConstructor::getValueProperty):
        (KJS::getMutationEventConstructor):
        (KJS::DOMMutationEvent::getValueProperty):
        (KJS::DOMMutationEventProtoFunc::callAsFunction):
        (KJS::DOMWheelEvent::getValueProperty):
        (KJS::DOMWheelEventProtoFunc::callAsFunction):
        (KJS::stringOrUndefined):
        (KJS::Clipboard::getValueProperty):
        (KJS::Clipboard::put):
        (KJS::Clipboard::putValueProperty):
        (KJS::ClipboardProtoFunc::callAsFunction):
        * khtml/ecma/kjs_events.h:
        (KJS::JSAbstractEventListener::listenerObjImp):
        * khtml/ecma/kjs_html.cpp:
        (KJS::KJS::HTMLDocFunction::callAsFunction):
        (KJS::HTMLDocument::namedItemGetter):
        (KJS::HTMLDocument::getValueProperty):
        (KJS::KJS::HTMLDocument::put):
        (KJS::KJS::HTMLDocument::putValueProperty):
        (KJS::HTMLElement::formIndexGetter):
        (KJS::HTMLElement::formNameGetter):
        (KJS::HTMLElement::selectIndexGetter):
        (KJS::HTMLElement::framesetNameGetter):
        (KJS::HTMLElement::frameWindowPropertyGetter):
        (KJS::HTMLElement::runtimeObjectGetter):
        (KJS::HTMLElement::runtimeObjectPropertyGetter):
        (KJS::HTMLElement::getOwnPropertySlot):
        (KJS::KJS::HTMLElement::implementsCall):
        (KJS::KJS::HTMLElement::callAsFunction):
        (KJS::HTMLElement::htmlGetter):
        (KJS::HTMLElement::headGetter):
        (KJS::HTMLElement::linkGetter):
        (KJS::HTMLElement::titleGetter):
        (KJS::HTMLElement::metaGetter):
        (KJS::HTMLElement::baseGetter):
        (KJS::HTMLElement::isIndexGetter):
        (KJS::HTMLElement::styleGetter):
        (KJS::HTMLElement::bodyGetter):
        (KJS::HTMLElement::formGetter):
        (KJS::HTMLElement::selectGetter):
        (KJS::HTMLElement::optGroupGetter):
        (KJS::HTMLElement::optionGetter):
        (KJS::getInputSelectionStart):
        (KJS::getInputSelectionEnd):
        (KJS::HTMLElement::inputGetter):
        (KJS::HTMLElement::textAreaGetter):
        (KJS::HTMLElement::buttonGetter):
        (KJS::HTMLElement::labelGetter):
        (KJS::HTMLElement::fieldSetGetter):
        (KJS::HTMLElement::legendGetter):
        (KJS::HTMLElement::uListGetter):
        (KJS::HTMLElement::oListGetter):
        (KJS::HTMLElement::dListGetter):
        (KJS::HTMLElement::dirGetter):
        (KJS::HTMLElement::menuGetter):
        (KJS::HTMLElement::liGetter):
        (KJS::HTMLElement::divGetter):
        (KJS::HTMLElement::paragraphGetter):
        (KJS::HTMLElement::headingGetter):
        (KJS::HTMLElement::blockQuoteGetter):
        (KJS::HTMLElement::quoteGetter):
        (KJS::HTMLElement::preGetter):
        (KJS::HTMLElement::brGetter):
        (KJS::HTMLElement::baseFontGetter):
        (KJS::HTMLElement::fontGetter):
        (KJS::HTMLElement::hrGetter):
        (KJS::HTMLElement::modGetter):
        (KJS::HTMLElement::anchorGetter):
        (KJS::HTMLElement::imageGetter):
        (KJS::HTMLElement::objectGetter):
        (KJS::HTMLElement::paramGetter):
        (KJS::HTMLElement::appletGetter):
        (KJS::HTMLElement::mapGetter):
        (KJS::HTMLElement::areaGetter):
        (KJS::HTMLElement::scriptGetter):
        (KJS::HTMLElement::tableGetter):
        (KJS::HTMLElement::tableCaptionGetter):
        (KJS::HTMLElement::tableColGetter):
        (KJS::HTMLElement::tableSectionGetter):
        (KJS::HTMLElement::tableRowGetter):
        (KJS::HTMLElement::tableCellGetter):
        (KJS::HTMLElement::frameSetGetter):
        (KJS::HTMLElement::frameGetter):
        (KJS::HTMLElement::iFrameGetter):
        (KJS::HTMLElement::marqueeGetter):
        (KJS::HTMLElement::getValueProperty):
        (KJS::HTMLElementFunction::HTMLElementFunction):
        (KJS::KJS::HTMLElementFunction::callAsFunction):
        (KJS::KJS::HTMLElement::put):
        (KJS::HTMLElement::htmlSetter):
        (KJS::HTMLElement::headSetter):
        (KJS::HTMLElement::linkSetter):
        (KJS::HTMLElement::titleSetter):
        (KJS::HTMLElement::metaSetter):
        (KJS::HTMLElement::baseSetter):
        (KJS::HTMLElement::isIndexSetter):
        (KJS::HTMLElement::styleSetter):
        (KJS::HTMLElement::bodySetter):
        (KJS::HTMLElement::formSetter):
        (KJS::HTMLElement::selectSetter):
        (KJS::HTMLElement::optGroupSetter):
        (KJS::HTMLElement::optionSetter):
        (KJS::HTMLElement::inputSetter):
        (KJS::HTMLElement::textAreaSetter):
        (KJS::HTMLElement::buttonSetter):
        (KJS::HTMLElement::labelSetter):
        (KJS::HTMLElement::fieldSetSetter):
        (KJS::HTMLElement::legendSetter):
        (KJS::HTMLElement::uListSetter):
        (KJS::HTMLElement::oListSetter):
        (KJS::HTMLElement::dListSetter):
        (KJS::HTMLElement::dirSetter):
        (KJS::HTMLElement::menuSetter):
        (KJS::HTMLElement::liSetter):
        (KJS::HTMLElement::divSetter):
        (KJS::HTMLElement::paragraphSetter):
        (KJS::HTMLElement::headingSetter):
        (KJS::HTMLElement::blockQuoteSetter):
        (KJS::HTMLElement::quoteSetter):
        (KJS::HTMLElement::preSetter):
        (KJS::HTMLElement::brSetter):
        (KJS::HTMLElement::baseFontSetter):
        (KJS::HTMLElement::fontSetter):
        (KJS::HTMLElement::hrSetter):
        (KJS::HTMLElement::modSetter):
        (KJS::HTMLElement::anchorSetter):
        (KJS::HTMLElement::imageSetter):
        (KJS::HTMLElement::objectSetter):
        (KJS::HTMLElement::paramSetter):
        (KJS::HTMLElement::appletSetter):
        (KJS::HTMLElement::mapSetter):
        (KJS::HTMLElement::areaSetter):
        (KJS::HTMLElement::scriptSetter):
        (KJS::HTMLElement::tableSetter):
        (KJS::HTMLElement::tableCaptionSetter):
        (KJS::HTMLElement::tableColSetter):
        (KJS::HTMLElement::tableSectionSetter):
        (KJS::HTMLElement::tableRowSetter):
        (KJS::HTMLElement::tableCellSetter):
        (KJS::HTMLElement::frameSetSetter):
        (KJS::HTMLElement::frameSetter):
        (KJS::HTMLElement::iFrameSetter):
        (KJS::HTMLElement::marqueeSetter):
        (KJS::HTMLElement::putValueProperty):
        (KJS::HTMLCollection::lengthGetter):
        (KJS::HTMLCollection::indexGetter):
        (KJS::HTMLCollection::nameGetter):
        (KJS::HTMLCollection::getOwnPropertySlot):
        (KJS::KJS::HTMLCollection::callAsFunction):
        (KJS::KJS::HTMLCollection::getNamedItems):
        (KJS::KJS::HTMLCollectionProtoFunc::callAsFunction):
        (KJS::HTMLSelectCollection::selectedIndexGetter):
        (KJS::KJS::HTMLSelectCollection::put):
        (KJS::OptionConstructorImp::construct):
        (KJS::ImageConstructorImp::construct):
        (KJS::Image::getValueProperty):
        (KJS::Image::put):
        (KJS::Image::putValueProperty):
        (KJS::isGradient):
        (KJS::isImagePattern):
        (KJS::KJS::Context2DFunction::callAsFunction):
        (KJS::Context2D::getValueProperty):
        (KJS::Context2D::put):
        (KJS::colorRefFromValue):
        (KJS::colorFromValue):
        (KJS::Context2D::setShadow):
        (KJS::Context2D::updateFillImagePattern):
        (KJS::Context2D::updateStrokeImagePattern):
        (KJS::Context2D::putValueProperty):
        (KJS::Context2D::Context2D):
        (KJS::Context2D::mark):
        (KJS::GradientFunction::callAsFunction):
        (KJS::Gradient::getValueProperty):
        (KJS::Gradient::put):
        (KJS::Gradient::putValueProperty):
        (KJS::ImagePattern::getValueProperty):
        (KJS::ImagePattern::put):
        (KJS::ImagePattern::putValueProperty):
        * khtml/ecma/kjs_html.h:
        * khtml/ecma/kjs_navigator.cpp:
        (KJS::Navigator::getValueProperty):
        (KJS::Plugins::getValueProperty):
        (KJS::Plugins::indexGetter):
        (KJS::Plugins::nameGetter):
        (KJS::MimeTypes::getValueProperty):
        (KJS::MimeTypes::indexGetter):
        (KJS::MimeTypes::nameGetter):
        (KJS::Plugin::getValueProperty):
        (KJS::Plugin::indexGetter):
        (KJS::Plugin::nameGetter):
        (KJS::MimeType::getValueProperty):
        (KJS::PluginsFunc::callAsFunction):
        (KJS::NavigatorFunc::callAsFunction):
        * khtml/ecma/kjs_navigator.h:
        * khtml/ecma/kjs_proxy.cpp:
        (KJSProxyImpl::evaluate):
        (TestFunctionImp::callAsFunction):
        (KJSProxyImpl::initScript):
        (KJSProxy::proxy):
        * khtml/ecma/kjs_range.cpp:
        (KJS::DOMRange::getValueProperty):
        (KJS::DOMRangeProtoFunc::callAsFunction):
        (KJS::RangeConstructor::getValueProperty):
        * khtml/ecma/kjs_range.h:
        * khtml/ecma/kjs_traversal.cpp:
        (KJS::DOMNodeIterator::getValueProperty):
        (KJS::DOMNodeIteratorProtoFunc::callAsFunction):
        (KJS::NodeFilterConstructor::getValueProperty):
        (KJS::getNodeFilterConstructor):
        (KJS::DOMNodeFilterProtoFunc::callAsFunction):
        (KJS::DOMTreeWalker::getValueProperty):
        (KJS::DOMTreeWalker::put):
        (KJS::DOMTreeWalkerProtoFunc::callAsFunction):
        (KJS::JSNodeFilterCondition::JSNodeFilterCondition):
        (KJS::JSNodeFilterCondition::acceptNode):
        * khtml/ecma/kjs_traversal.h:
        * khtml/ecma/kjs_views.cpp:
        (KJS::DOMAbstractView::getValueProperty):
        (KJS::DOMAbstractViewFunc::callAsFunction):
        * khtml/ecma/kjs_views.h:
        * khtml/ecma/kjs_window.cpp:
        (KJS::Screen::getValueProperty):
        (KJS::Window::retrieveWindow):
        (KJS::Window::retrieveActive):
        (KJS::Window::retrieve):
        (KJS::parseFeatures):
        (KJS::showModalDialog):
        (KJS::Window::getValueProperty):
        (KJS::Window::childFrameGetter):
        (KJS::Window::namedFrameGetter):
        (KJS::Window::indexGetter):
        (KJS::Window::namedItemGetter):
        (KJS::Window::put):
        (KJS::Window::installTimeout):
        (KJS::Window::setListener):
        (KJS::Window::getListener):
        (KJS::Window::getJSEventListener):
        (KJS::Window::getJSUnprotectedEventListener):
        (KJS::Window::getJSLazyEventListener):
        (KJS::WindowFunc::callAsFunction):
        (KJS::ScheduledAction::ScheduledAction):
        (KJS::ScheduledAction::execute):
        (KJS::WindowQObject::installTimeout):
        (KJS::FrameArray::getValueProperty):
        (KJS::FrameArray::indexGetter):
        (KJS::FrameArray::nameGetter):
        (KJS::Location::getValueProperty):
        (KJS::Location::put):
        (KJS::Location::toPrimitive):
        (KJS::LocationFunc::callAsFunction):
        (KJS::Selection::getValueProperty):
        (KJS::Selection::toPrimitive):
        (KJS::SelectionFunc::callAsFunction):
        (KJS::BarInfo::getValueProperty):
        (KJS::History::getValueProperty):
        (KJS::HistoryFunc::callAsFunction):
        (KJS::Konqueror::get):
        (KJS::KonquerorFunc::callAsFunction):
        * khtml/ecma/kjs_window.h:
        * khtml/ecma/xmlhttprequest.cpp:
        (KJS::XMLHttpRequestConstructorImp::construct):
        (KJS::XMLHttpRequest::getValueProperty):
        (KJS::XMLHttpRequest::put):
        (KJS::XMLHttpRequest::putValueProperty):
        (KJS::XMLHttpRequest::getAllResponseHeaders):
        (KJS::XMLHttpRequest::getResponseHeader):
        (KJS::XMLHttpRequest::getStatus):
        (KJS::XMLHttpRequest::getStatusText):
        (KJS::XMLHttpRequestProtoFunc::callAsFunction):
        * khtml/ecma/xmlhttprequest.h:
        * khtml/ecma/xmlserializer.cpp:
        (KJS::XMLSerializerConstructorImp::construct):
        (KJS::XMLSerializerProtoFunc::callAsFunction):
        * khtml/ecma/xmlserializer.h:
        * kwq/DOMUtility.mm:
        (KJS::ScriptInterpreter::createObjcInstanceForValue):
        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::bindingRootObject):
        (KWQKHTMLPart::windowScriptObject):
        (KWQKHTMLPart::windowScriptNPObject):
        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge executionContextForView:]):
        * kwq/WebCoreScriptDebugger.mm:
        (WebCoreScriptDebuggerImp::callEvent):
        (WebCoreScriptDebuggerImp::returnEvent):
        (-[WebCoreScriptDebugger finalize]):
        (-[WebCoreScriptCallFrame _convertValueToObjcValue:]):
        (-[WebCoreScriptCallFrame scopeChain]):
        (-[WebCoreScriptCallFrame evaluateWebScript:]):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@10084 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 964cc7db
This diff is collapsed.
......@@ -27,12 +27,10 @@
/* Begin PBXBuildFile section */
65305EAF08A58DDE00F31E73 /* protected_object.h in Headers */ = {isa = PBXBuildFile; fileRef = 65305EAE08A58DDE00F31E73 /* protected_object.h */; settings = {ATTRIBUTES = (Private, ); }; };
65305EB008A58E0900F31E73 /* protected_object.h in Headers */ = {isa = PBXBuildFile; fileRef = 65305EAE08A58DDE00F31E73 /* protected_object.h */; settings = {ATTRIBUTES = (Private, ); }; };
6539AACB08A3225A00223EE2 /* object_wrapper.h in Headers */ = {isa = PBXBuildFile; fileRef = 6539AACA08A3225A00223EE2 /* object_wrapper.h */; settings = {ATTRIBUTES = (Private, ); }; };
65621E6D089E859700760F35 /* property_slot.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 65621E6B089E859700760F35 /* property_slot.cpp */; };
65621E6E089E859700760F35 /* property_slot.h in Headers */ = {isa = PBXBuildFile; fileRef = 65621E6C089E859700760F35 /* property_slot.h */; settings = {ATTRIBUTES = (Private, ); }; };
65621E6F089E85D300760F35 /* property_slot.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 65621E6B089E859700760F35 /* property_slot.cpp */; };
65621E70089E85D300760F35 /* property_slot.h in Headers */ = {isa = PBXBuildFile; fileRef = 65621E6C089E859700760F35 /* property_slot.h */; settings = {ATTRIBUTES = (Private, ); }; };
65BBAEE008A329B300357728 /* object_wrapper.h in Headers */ = {isa = PBXBuildFile; fileRef = 6539AACA08A3225A00223EE2 /* object_wrapper.h */; settings = {ATTRIBUTES = (Private, ); }; };
932F5B400822A1C700736975 /* array_object.h in Headers */ = {isa = PBXBuildFile; fileRef = F692A84E0255597D01FF60F7 /* array_object.h */; settings = {ATTRIBUTES = (Private, ); }; };
932F5B420822A1C700736975 /* collector.h in Headers */ = {isa = PBXBuildFile; fileRef = F692A8530255597D01FF60F7 /* collector.h */; settings = {ATTRIBUTES = (Private, ); }; };
932F5B430822A1C700736975 /* date_object.h in Headers */ = {isa = PBXBuildFile; fileRef = F692A8560255597D01FF60F7 /* date_object.h */; settings = {ATTRIBUTES = (Private, ); }; };
......@@ -458,7 +456,6 @@
651F6412039D5B5F0078395C /* dtoa.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = dtoa.cpp; sourceTree = "<group>"; };
651F6413039D5B5F0078395C /* dtoa.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = dtoa.h; sourceTree = "<group>"; };
65305EAE08A58DDE00F31E73 /* protected_object.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = protected_object.h; sourceTree = "<group>"; };
6539AACA08A3225A00223EE2 /* object_wrapper.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = object_wrapper.h; sourceTree = "<group>"; };
65417205039E02E70058BFEB /* get.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = get.c; path = pcre/get.c; sourceTree = "<group>"; };
65417206039E02E70058BFEB /* maketables.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = maketables.c; path = pcre/maketables.c; sourceTree = "<group>"; };
65417207039E02E70058BFEB /* pcre.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = pcre.c; path = pcre/pcre.c; sourceTree = "<group>"; };
......@@ -645,7 +642,6 @@
isa = PBXGroup;
children = (
65305EAE08A58DDE00F31E73 /* protected_object.h */,
6539AACA08A3225A00223EE2 /* object_wrapper.h */,
65621E6B089E859700760F35 /* property_slot.cpp */,
65621E6C089E859700760F35 /* property_slot.h */,
938772E5038BFE19008635CE /* array_instance.h */,
......@@ -918,7 +914,6 @@
932F5B8F0822A1C700736975 /* fast_malloc.h in Headers */,
932FC11D0824A6A3005B3C75 /* create_hash_table in Headers */,
65621E6E089E859700760F35 /* property_slot.h in Headers */,
6539AACB08A3225A00223EE2 /* object_wrapper.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
......@@ -942,7 +937,6 @@
A85D8204087B2822006A9172 /* nodes.h in Headers */,
A85D8205087B2822006A9172 /* number_object.h in Headers */,
A85D8206087B2822006A9172 /* object_object.h in Headers */,
65BBAEE008A329B300357728 /* object_wrapper.h in Headers */,
A85D8207087B2822006A9172 /* object.h in Headers */,
A85D8208087B2822006A9172 /* operations.h in Headers */,
A85D8209087B2822006A9172 /* property_map.h in Headers */,
......
......@@ -149,24 +149,24 @@ bool _NPN_Invoke (NPP npp, NPObject *o, NPIdentifier methodName, const NPVariant
// Lookup the function object.
ExecState *exec = obj->executionContext->interpreter()->globalExec();
Interpreter::lock();
Value func = obj->imp->get (exec, identiferFromNPIdentifier(i->value.string));
ValueImp *func = obj->imp->get (exec, identiferFromNPIdentifier(i->value.string));
Interpreter::unlock();
if (func.isNull()) {
if (func->isNull()) {
NPN_InitializeVariantAsNull(result);
return false;
}
else if ( func.type() == UndefinedType) {
else if (func->isUndefined()) {
NPN_InitializeVariantAsUndefined(result);
return false;
}
else {
// Call the function object.
ObjectImp *funcImp = static_cast<ObjectImp*>(func.imp());
Object thisObj = Object(const_cast<ObjectImp*>(obj->imp));
ObjectImp *funcImp = static_cast<ObjectImp*>(func);
ObjectImp *thisObj = const_cast<ObjectImp*>(obj->imp);
List argList = listFromVariantArgs(exec, args, argCount);
Interpreter::lock();
Value resultV = funcImp->call (exec, thisObj, argList);
ValueImp *resultV = funcImp->call (exec, thisObj, argList);
Interpreter::unlock();
// Convert and return the result of the function call.
......@@ -193,8 +193,7 @@ bool _NPN_Evaluate (NPP npp, NPObject *o, NPString *s, NPVariant *variant)
return false;
ExecState *exec = obj->executionContext->interpreter()->globalExec();
Object thisObj = Object(const_cast<ObjectImp*>(obj->imp));
Value result;
ValueImp *result;
Interpreter::lock();
NPUTF16 *scriptString;
......@@ -205,7 +204,7 @@ bool _NPN_Evaluate (NPP npp, NPObject *o, NPString *s, NPVariant *variant)
if (type == Normal) {
result = completion.value();
if (result.isNull()) {
if (!result) {
result = Undefined();
}
}
......@@ -234,21 +233,9 @@ bool _NPN_GetProperty (NPP npp, NPObject *o, NPIdentifier propertyName, NPVarian
ExecState *exec = obj->executionContext->interpreter()->globalExec();
PrivateIdentifier *i = (PrivateIdentifier *)propertyName;
if (i->isString) {
if (!obj->imp->hasProperty (exec, identiferFromNPIdentifier(i->value.string))) {
NPN_InitializeVariantAsNull(variant);
return false;
}
}
else {
if (!obj->imp->hasProperty (exec, i->value.number)) {
NPN_InitializeVariantAsNull(variant);
return false;
}
}
Interpreter::lock();
Value result;
ValueImp *result;
if (i->isString) {
result = obj->imp->get (exec, identiferFromNPIdentifier(i->value.string));
}
......@@ -257,11 +244,11 @@ bool _NPN_GetProperty (NPP npp, NPObject *o, NPIdentifier propertyName, NPVarian
}
Interpreter::unlock();
if (result.isNull()) {
if (result->isNull()) {
NPN_InitializeVariantAsNull(variant);
return false;
}
else if (result.type() == UndefinedType) {
else if (result->isUndefined()) {
NPN_InitializeVariantAsUndefined(variant);
return false;
}
......@@ -292,7 +279,6 @@ bool _NPN_SetProperty (NPP npp, NPObject *o, NPIdentifier propertyName, const NP
ExecState *exec = obj->executionContext->interpreter()->globalExec();
Interpreter::lock();
Value result;
PrivateIdentifier *i = (PrivateIdentifier *)propertyName;
if (i->isString) {
obj->imp->put (exec, identiferFromNPIdentifier(i->value.string), convertNPVariantToValue(exec, variant));
......@@ -394,10 +380,10 @@ bool _NPN_HasMethod(NPP npp, NPObject *o, NPIdentifier methodName)
// Lookup the function object.
ExecState *exec = obj->executionContext->interpreter()->globalExec();
Interpreter::lock();
Value func = obj->imp->get (exec, identiferFromNPIdentifier(i->value.string));
ValueImp *func = obj->imp->get (exec, identiferFromNPIdentifier(i->value.string));
Interpreter::unlock();
if (func.isNull() || func.type() == UndefinedType) {
if (func->isUndefined()) {
return false;
}
......@@ -417,7 +403,7 @@ void _NPN_SetException (NPObject *o, const NPUTF8 *message)
JavaScriptObject *obj = (JavaScriptObject *)o;
ExecState *exec = obj->executionContext->interpreter()->globalExec();
Interpreter::lock();
Object err = Error::create(exec, GeneralError, message);
ObjectImp *err = Error::create(exec, GeneralError, message);
exec->setException (err);
Interpreter::unlock();
}
......
......@@ -39,15 +39,15 @@
}
#endif
using namespace KJS::Bindings;
using namespace KJS;
namespace KJS {
namespace Bindings {
CInstance::CInstance (NPObject *o)
{
_object = _NPN_RetainObject (o);
_class = 0;
setExecutionContext (0);
};
}
CInstance::~CInstance ()
{
......@@ -94,9 +94,9 @@ void CInstance::end()
// Do nothing.
}
Value CInstance::invokeMethod (KJS::ExecState *exec, const MethodList &methodList, const List &args)
ValueImp *CInstance::invokeMethod (ExecState *exec, const MethodList &methodList, const List &args)
{
Value resultValue;
ValueImp *resultValue;
// Overloading methods are not allowed by NPObjects. Should only be one
// name match for a particular method.
......@@ -146,9 +146,9 @@ Value CInstance::invokeMethod (KJS::ExecState *exec, const MethodList &methodLis
}
Value CInstance::invokeDefaultMethod (KJS::ExecState *exec, const List &args)
ValueImp *CInstance::invokeDefaultMethod (ExecState *exec, const List &args)
{
Value resultValue;
ValueImp *resultValue;
if (_object->_class->invokeDefault) {
unsigned i, count = args.size();
......@@ -188,44 +188,44 @@ Value CInstance::invokeDefaultMethod (KJS::ExecState *exec, const List &args)
}
KJS::Value CInstance::defaultValue (KJS::Type hint) const
ValueImp *CInstance::defaultValue (Type hint) const
{
if (hint == KJS::StringType) {
if (hint == StringType) {
return stringValue();
}
else if (hint == KJS::NumberType) {
else if (hint == NumberType) {
return numberValue();
}
else if (hint == KJS::BooleanType) {
else if (hint == BooleanType) {
return booleanValue();
}
return valueOf();
}
KJS::Value CInstance::stringValue() const
ValueImp *CInstance::stringValue() const
{
char buf[1024];
snprintf (buf, 1024, "NPObject %p, NPClass %p", _object, _object->_class);
KJS::String v(buf);
return v;
snprintf(buf, 1024, "NPObject %p, NPClass %p", _object, _object->_class);
return jsString(buf);
}
KJS::Value CInstance::numberValue() const
ValueImp *CInstance::numberValue() const
{
// FIXME: Implement something sensible
KJS::Number v(0);
return v;
return jsNumber(0);
}
KJS::Value CInstance::booleanValue() const
ValueImp *CInstance::booleanValue() const
{
// FIXME: Implement something sensible
KJS::Boolean v((bool)0);
return v;
return jsBoolean(false);
}
KJS::Value CInstance::valueOf() const
ValueImp *CInstance::valueOf() const
{
return stringValue();
};
}
}
}
......@@ -51,15 +51,15 @@ public:
virtual void begin();
virtual void end();
virtual Value valueOf() const;
virtual Value defaultValue (KJS::Type hint) const;
virtual ValueImp *valueOf() const;
virtual ValueImp *defaultValue (KJS::Type hint) const;
virtual Value invokeMethod (ExecState *exec, const MethodList &method, const List &args);
virtual Value invokeDefaultMethod (ExecState *exec, const List &args);
virtual ValueImp *invokeMethod (ExecState *exec, const MethodList &method, const List &args);
virtual ValueImp *invokeDefaultMethod (ExecState *exec, const List &args);
Value stringValue() const;
Value numberValue() const;
Value booleanValue() const;
ValueImp *stringValue() const;
ValueImp *numberValue() const;
ValueImp *booleanValue() const;
NPObject *getObject() const { return _object; }
......
......@@ -41,11 +41,11 @@ using namespace KJS::Bindings;
// ---------------------- CField ----------------------
Value CField::valueFromInstance(KJS::ExecState *exec, const Instance *inst) const
ValueImp *CField::valueFromInstance(ExecState *exec, const Instance *inst) const
{
const CInstance *instance = static_cast<const CInstance*>(inst);
NPObject *obj = instance->getObject();
Value aValue;
ValueImp *aValue;
NPVariant property;
VOID_TO_NPVARIANT(property);
if (obj->_class->getProperty) {
......@@ -58,7 +58,7 @@ Value CField::valueFromInstance(KJS::ExecState *exec, const Instance *inst) cons
return aValue;
}
void CField::setValueToInstance(KJS::ExecState *exec, const Instance *inst, const KJS::Value &aValue) const
void CField::setValueToInstance(ExecState *exec, const Instance *inst, ValueImp *aValue) const
{
const CInstance *instance = static_cast<const CInstance*>(inst);
NPObject *obj = instance->getObject();
......
......@@ -35,7 +35,6 @@
namespace KJS
{
class Value;
namespace Bindings
{
......@@ -49,8 +48,8 @@ public:
_fieldIdentifier = ident;
};
virtual KJS::Value valueFromInstance(KJS::ExecState *exec, const Instance *instance) const;
virtual void setValueToInstance(KJS::ExecState *exec, const Instance *instance, const KJS::Value &aValue) const;
virtual ValueImp *valueFromInstance(ExecState *exec, const Instance *instance) const;
virtual void setValueToInstance(ExecState *exec, const Instance *instance, ValueImp *aValue) const;
virtual const char *name() const { return _NPN_UTF8FromIdentifier(_fieldIdentifier); }
virtual RuntimeType type() const { return ""; }
......@@ -85,8 +84,8 @@ public:
CArray &operator=(const CArray &other);
virtual void setValueAt(KJS::ExecState *exec, unsigned int index, const KJS::Value &aValue) const;
virtual KJS::Value valueAt(KJS::ExecState *exec, unsigned int index) const;
virtual void setValueAt(ExecState *exec, unsigned int index, ValueImp *aValue) const;
virtual ValueImp *valueAt(ExecState *exec, unsigned int index) const;
virtual unsigned int getLength() const;
virtual ~CArray();
......
......@@ -37,55 +37,55 @@ using namespace KJS;
using namespace KJS::Bindings;
// Requires free() of returned UTF16Chars.
void convertNPStringToUTF16 (const NPString *string, NPUTF16 **UTF16Chars, unsigned int *UTF16Length)
void convertNPStringToUTF16(const NPString *string, NPUTF16 **UTF16Chars, unsigned int *UTF16Length)
{
convertUTF8ToUTF16 (string->UTF8Characters, string->UTF8Length, UTF16Chars, UTF16Length);
convertUTF8ToUTF16(string->UTF8Characters, string->UTF8Length, UTF16Chars, UTF16Length);
}
// Requires free() of returned UTF16Chars.
void convertUTF8ToUTF16 (const NPUTF8 *UTF8Chars, int UTF8Length, NPUTF16 **UTF16Chars, unsigned int *UTF16Length)
void convertUTF8ToUTF16(const NPUTF8 *UTF8Chars, int UTF8Length, NPUTF16 **UTF16Chars, unsigned int *UTF16Length)
{
assert (UTF8Chars);
assert(UTF8Chars);
if (UTF8Length == -1)
UTF8Length = strlen(UTF8Chars);
CFStringRef stringRef = CFStringCreateWithBytes (NULL, (const UInt8*)UTF8Chars, (CFIndex)UTF8Length, kCFStringEncodingUTF8, false);
CFStringRef stringRef = CFStringCreateWithBytes(NULL, (const UInt8*)UTF8Chars, (CFIndex)UTF8Length, kCFStringEncodingUTF8, false);
*UTF16Length = (unsigned int)CFStringGetLength (stringRef);
*UTF16Chars = (NPUTF16 *)malloc (sizeof(NPUTF16) * (*UTF16Length));
*UTF16Length = (unsigned int)CFStringGetLength(stringRef);
*UTF16Chars = (NPUTF16 *)malloc(sizeof(NPUTF16) * (*UTF16Length));
// Convert the string to UTF16.
CFRange range = { 0, *UTF16Length };
CFStringGetCharacters (stringRef, range, (UniChar *)*UTF16Chars);
CFRelease (stringRef);
CFStringGetCharacters(stringRef, range, (UniChar *)*UTF16Chars);
CFRelease(stringRef);
}
// Variant value must be released with NPReleaseVariantValue()
void coerceValueToNPVariantStringType (KJS::ExecState *exec, const KJS::Value &value, NPVariant *result)
void coerceValueToNPVariantStringType(ExecState *exec, ValueImp *value, NPVariant *result)
{
UString ustring = value.toString(exec);
UString ustring = value->toString(exec);
CString cstring = ustring.UTF8String();
NPString string = { (const NPUTF8 *)cstring.c_str(), cstring.size() };
NPN_InitializeVariantWithStringCopy (result, &string);
NPN_InitializeVariantWithStringCopy(result, &string);
}
// Variant value must be released with NPReleaseVariantValue()
void convertValueToNPVariant (KJS::ExecState *exec, const KJS::Value &value, NPVariant *result)
void convertValueToNPVariant(ExecState *exec, ValueImp *value, NPVariant *result)
{
Type type = value.type();
Type type = value->type();
if (type == StringType) {
UString ustring = value.toString(exec);
UString ustring = value->toString(exec);
CString cstring = ustring.UTF8String();
NPString string = { (const NPUTF8 *)cstring.c_str(), cstring.size() };
NPN_InitializeVariantWithStringCopy (result, &string );
NPN_InitializeVariantWithStringCopy(result, &string );
}
else if (type == NumberType) {
NPN_InitializeVariantWithDouble (result, value.toNumber(exec));
NPN_InitializeVariantWithDouble(result, value->toNumber(exec));
}
else if (type == BooleanType) {
NPN_InitializeVariantWithBool (result, value.toBoolean(exec));
NPN_InitializeVariantWithBool(result, value->toBoolean(exec));
}
else if (type == UnspecifiedType) {
NPN_InitializeVariantAsUndefined(result);
......@@ -94,20 +94,20 @@ void convertValueToNPVariant (KJS::ExecState *exec, const KJS::Value &value, NPV
NPN_InitializeVariantAsNull(result);
}
else if (type == ObjectType) {
KJS::ObjectImp *objectImp = static_cast<KJS::ObjectImp*>(value.imp());
if (objectImp->classInfo() == &KJS::RuntimeObjectImp::info) {
KJS::RuntimeObjectImp *imp = static_cast<KJS::RuntimeObjectImp *>(value.imp());
ObjectImp *objectImp = static_cast<ObjectImp*>(value);
if (objectImp->classInfo() == &RuntimeObjectImp::info) {
RuntimeObjectImp *imp = static_cast<RuntimeObjectImp *>(value);
CInstance *instance = static_cast<CInstance*>(imp->getInternalInstance());
NPN_InitializeVariantWithObject (result, instance->getObject());
NPN_InitializeVariantWithObject(result, instance->getObject());
}
else {
KJS::Interpreter *originInterpreter = exec->interpreter();
Interpreter *originInterpreter = exec->interpreter();
const Bindings::RootObject *originExecutionContext = rootForInterpreter(originInterpreter);
KJS::Interpreter *interpreter = 0;
Interpreter *interpreter = 0;
if (originInterpreter->isGlobalObject(value)) {
interpreter = originInterpreter->interpreterForGlobalObject (value.imp());
interpreter = originInterpreter->interpreterForGlobalObject(value);
}
if (!interpreter)
......@@ -115,29 +115,29 @@ void convertValueToNPVariant (KJS::ExecState *exec, const KJS::Value &value, NPV
const Bindings::RootObject *executionContext = rootForInterpreter(interpreter);
if (!executionContext) {
Bindings::RootObject *newExecutionContext = new KJS::Bindings::RootObject(0);
newExecutionContext->setInterpreter (interpreter);
Bindings::RootObject *newExecutionContext = new Bindings::RootObject(0);
newExecutionContext->setInterpreter(interpreter);
executionContext = newExecutionContext;
}
NPObject *obj = (NPObject *)exec->interpreter()->createLanguageInstanceForValue (exec, Instance::CLanguage, value.toObject(exec), originExecutionContext, executionContext);
NPN_InitializeVariantWithObject (result, obj);
_NPN_ReleaseObject (obj);
NPObject *obj = (NPObject *)exec->interpreter()->createLanguageInstanceForValue(exec, Instance::CLanguage, value->toObject(exec), originExecutionContext, executionContext);
NPN_InitializeVariantWithObject(result, obj);
_NPN_ReleaseObject(obj);
}
}
else
NPN_InitializeVariantAsUndefined(result);
}
Value convertNPVariantToValue (KJS::ExecState *exec, const NPVariant *variant)
ValueImp *convertNPVariantToValue(ExecState *exec, const NPVariant *variant)
{
NPVariantType type = variant->type;
if (type == NPVariantType_Bool) {
NPBool aBool;
if (NPN_VariantToBool (variant, &aBool))
return KJS::Boolean (aBool);
return KJS::Boolean (false);
if (NPN_VariantToBool(variant, &aBool))
return jsBoolean(aBool);
return jsBoolean(false);
}
else if (type == NPVariantType_Null) {
return Null();
......@@ -147,23 +147,23 @@ Value convertNPVariantToValue (KJS::ExecState *exec, const NPVariant *variant)
}
else if (type == NPVariantType_Int32) {
int32_t anInt;
if (NPN_VariantToInt32 (variant, &anInt))
return Number (anInt);
return Number (0);
if (NPN_VariantToInt32(variant, &anInt))
return Number(anInt);
return Number(0);
}
else if (type == NPVariantType_Double) {
double aDouble;
if (NPN_VariantToDouble (variant, &aDouble))
return Number (aDouble);
return Number (0);
if (NPN_VariantToDouble(variant, &aDouble))
return Number(aDouble);
return Number(0);
}
else if (type == NPVariantType_String) {
NPUTF16 *stringValue;
unsigned int UTF16Length;
convertNPStringToUTF16 (&variant->value.stringValue, &stringValue, &UTF16Length); // requires free() of returned memory.
String resultString(UString((const UChar *)stringValue,UTF16Length));
free (stringValue);
return resultString;
convertNPStringToUTF16(&variant->value.stringValue, &stringValue, &UTF16Length); // requires free() of returned memory.
UString resultString((const UChar *)stringValue,UTF16Length);
free(stringValue);
return jsString(resultString);
}
else if (type == NPVariantType_Object) {
NPObject *obj = variant->value.objectValue;
......@@ -171,7 +171,7 @@ Value convertNPVariantToValue (KJS::ExecState *exec, const NPVariant *variant)
if (obj->_class == NPScriptObjectClass) {
// Get ObjectImp from NP_JavaScriptObject.
JavaScriptObject *o = (JavaScriptObject *)obj;
return Object(const_cast<ObjectImp*>(o->imp));
return const_cast<Obje