Changeset 29447 in webkit for trunk/JavaScriptCore/bindings/runtime.cpp
- Timestamp:
- Jan 13, 2008, 3:08:39 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/bindings/runtime.cpp
r25000 r29447 106 106 #if PLATFORM(QT) 107 107 case Instance::QtLanguage: { 108 newInstance = new Bindings::QtInstance((QObject *)nativeInstance, rootObject);108 newInstance = Bindings::QtInstance::getQtInstance((QObject *)nativeInstance, rootObject); 109 109 break; 110 110 } … … 120 120 { 121 121 Instance* instance = Instance::createBindingForLanguageInstance(language, nativeInstance, rootObject); 122 122 123 return createRuntimeObject(instance); 124 } 125 126 JSObject* Instance::createRuntimeObject(Instance* instance) 127 { 128 #if PLATFORM(QT) 129 if (instance->getBindingLanguage() == QtLanguage) 130 return QtInstance::getRuntimeObject(static_cast<QtInstance*>(instance)); 131 #endif 123 132 JSLock lock; 124 133 return new RuntimeObjectImp(instance); 125 134 } 126 135 127 RootObject* Instance::rootObject() const 128 { 136 Instance* Instance::getInstance(JSObject* object, BindingLanguage language) 137 { 138 if (!object) 139 return 0; 140 if (!object->inherits(&RuntimeObjectImp::info)) 141 return 0; 142 Instance* instance = (static_cast<RuntimeObjectImp*>(object))->getInternalInstance(); 143 if (!instance) 144 return 0; 145 if (instance->getBindingLanguage() != language) 146 return 0; 147 return instance; 148 } 149 150 RootObject* Instance::rootObject() const 151 { 129 152 return _rootObject && _rootObject->isValid() ? _rootObject.get() : 0; 130 153 }
Note:
See TracChangeset
for help on using the changeset viewer.