diff options
-rw-r--r-- | WebCore/ChangeLog | 27 | ||||
-rw-r--r-- | WebCore/bridge/Bridge.cpp | 38 | ||||
-rw-r--r-- | WebCore/bridge/Bridge.h | 30 | ||||
-rw-r--r-- | WebCore/bridge/c/c_instance.cpp | 6 | ||||
-rw-r--r-- | WebCore/bridge/jni/jni_runtime.cpp | 4 | ||||
-rw-r--r-- | WebCore/bridge/objc/objc_instance.mm | 6 | ||||
-rw-r--r-- | WebCore/bridge/objc/objc_runtime.mm | 2 | ||||
-rw-r--r-- | WebCore/bridge/qt/qt_runtime.cpp | 2 |
8 files changed, 73 insertions, 42 deletions
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog index 3298b7f..80ec313 100644 --- a/WebCore/ChangeLog +++ b/WebCore/ChangeLog @@ -1,3 +1,30 @@ +2010-01-20 Steve Block <steveblock@google.com> + + Reviewed by David Levin. + + Fixes style in WebCore/bridge/Bridge + https://bugs.webkit.org/show_bug.cgi?id=33839 + + No new tests, style fixes only. + + * bridge/Bridge.cpp: Modified. + * bridge/Bridge.h: Modified. + * bridge/c/c_instance.cpp: Modified. + (JSC::Bindings::CInstance::invokeMethod): Modified. Use renamed m_rootObject member + (JSC::Bindings::CInstance::invokeDefaultMethod): Modified. Use renamed m_rootObject member + (JSC::Bindings::CInstance::invokeConstruct): Modified. Use renamed m_rootObject member + * bridge/jni/jni_runtime.cpp: Modified. + (JavaArray::JavaArray): Modified. Use renamed m_rootObject member + (JavaArray::rootObject): Modified. Use renamed m_rootObject member + * bridge/objc/objc_instance.mm: Modified. + (ObjcInstance::invokeMethod): Modified. Use renamed m_rootObject member + (ObjcInstance::invokeDefaultMethod): Modified. Use renamed m_rootObject member + (ObjcInstance::getValueOfUndefinedField): Modified. Use renamed m_rootObject member + * bridge/objc/objc_runtime.mm: Modified. + (JSC::Bindings::ObjcArray::valueAt): Modified. Use renamed m_rootObject member + * bridge/qt/qt_runtime.cpp: Modified. + (JSC::Bindings::::rootObject): Modified. Use renamed m_rootObject member + 2010-01-19 Steve Block <steveblock@google.com> Reviewed by David Levin. diff --git a/WebCore/bridge/Bridge.cpp b/WebCore/bridge/Bridge.cpp index 0fe583a..2daf3eb 100644 --- a/WebCore/bridge/Bridge.cpp +++ b/WebCore/bridge/Bridge.cpp @@ -20,7 +20,7 @@ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "config.h" @@ -34,12 +34,14 @@ #include "qt_instance.h" #endif -namespace JSC { namespace Bindings { +namespace JSC { + +namespace Bindings { Array::Array(PassRefPtr<RootObject> rootObject) - : _rootObject(rootObject) + : m_rootObject(rootObject) { - ASSERT(_rootObject); + ASSERT(m_rootObject); } Array::~Array() @@ -47,10 +49,10 @@ Array::~Array() } Instance::Instance(PassRefPtr<RootObject> rootObject) - : _rootObject(rootObject) + : m_rootObject(rootObject) , m_runtimeObject(0) { - ASSERT(_rootObject); + ASSERT(m_rootObject); } Instance::~Instance() @@ -82,28 +84,28 @@ void Instance::end() RuntimeObjectImp* Instance::createRuntimeObject(ExecState* exec) { - ASSERT(_rootObject); - ASSERT(_rootObject->isValid()); + ASSERT(m_rootObject); + ASSERT(m_rootObject->isValid()); if (m_runtimeObject) return m_runtimeObject; JSLock lock(SilenceAssertionsOnly); m_runtimeObject = newRuntimeObject(exec); - _rootObject->addRuntimeObject(m_runtimeObject); + m_rootObject->addRuntimeObject(m_runtimeObject); return m_runtimeObject; } RuntimeObjectImp* Instance::newRuntimeObject(ExecState* exec) { JSLock lock(SilenceAssertionsOnly); - return new (exec) RuntimeObjectImp(exec, this); + return new (exec)RuntimeObjectImp(exec, this); } void Instance::willDestroyRuntimeObject() { - ASSERT(_rootObject); - ASSERT(_rootObject->isValid()); + ASSERT(m_rootObject); + ASSERT(m_rootObject->isValid()); ASSERT(m_runtimeObject); - _rootObject->removeRuntimeObject(m_runtimeObject); + m_rootObject->removeRuntimeObject(m_runtimeObject); m_runtimeObject = 0; } @@ -113,9 +115,11 @@ void Instance::willInvalidateRuntimeObject() m_runtimeObject = 0; } -RootObject* Instance::rootObject() const -{ - return _rootObject && _rootObject->isValid() ? _rootObject.get() : 0; +RootObject* Instance::rootObject() const +{ + return m_rootObject && m_rootObject->isValid() ? m_rootObject.get() : 0; } -} } // namespace JSC::Bindings +} // namespace Bindings + +} // namespace JSC diff --git a/WebCore/bridge/Bridge.h b/WebCore/bridge/Bridge.h index 5a743f1..71c72c3 100644 --- a/WebCore/bridge/Bridge.h +++ b/WebCore/bridge/Bridge.h @@ -20,7 +20,7 @@ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef Bridge_h @@ -58,7 +58,7 @@ public: class Method : public Noncopyable { public: virtual int numParameters() const = 0; - + virtual ~Method() { } }; @@ -85,12 +85,12 @@ public: // any needed state. void begin(); void end(); - + virtual Class* getClass() const = 0; RuntimeObjectImp* createRuntimeObject(ExecState*); void willInvalidateRuntimeObject(); void willDestroyRuntimeObject(); - + // Returns false if the value was not set successfully. virtual bool setValueOfUndefinedField(ExecState*, const Identifier&, JSValue) { return false; } @@ -98,18 +98,18 @@ public: virtual bool supportsInvokeDefaultMethod() const { return false; } virtual JSValue invokeDefaultMethod(ExecState*, const ArgList&) { return jsUndefined(); } - + virtual bool supportsConstruct() const { return false; } virtual JSValue invokeConstruct(ExecState*, const ArgList&) { return JSValue(); } - + virtual void getPropertyNames(ExecState*, PropertyNameArray&) { } virtual JSValue defaultValue(ExecState*, PreferredPrimitiveType) const = 0; - + virtual JSValue valueOf(ExecState* exec) const = 0; - + RootObject* rootObject() const; - + virtual ~Instance(); virtual bool getOwnPropertySlot(JSObject*, ExecState*, const Identifier&, PropertySlot&) { return false; } @@ -121,7 +121,7 @@ protected: virtual void virtualEnd() { } virtual RuntimeObjectImp* newRuntimeObject(ExecState*); - RefPtr<RootObject> _rootObject; + RefPtr<RootObject> m_rootObject; private: RuntimeObjectImp* m_runtimeObject; @@ -131,21 +131,21 @@ class Array : public Noncopyable { public: Array(PassRefPtr<RootObject>); virtual ~Array(); - + virtual void setValueAt(ExecState*, unsigned index, JSValue) const = 0; virtual JSValue valueAt(ExecState*, unsigned index) const = 0; virtual unsigned int getLength() const = 0; protected: - RefPtr<RootObject> _rootObject; + RefPtr<RootObject> m_rootObject; }; const char* signatureForParameters(const ArgList&); typedef HashMap<RefPtr<UString::Rep>, MethodList*> MethodListMap; -typedef HashMap<RefPtr<UString::Rep>, Method*> MethodMap; -typedef HashMap<RefPtr<UString::Rep>, Field*> FieldMap; - +typedef HashMap<RefPtr<UString::Rep>, Method*> MethodMap; +typedef HashMap<RefPtr<UString::Rep>, Field*> FieldMap; + } // namespace Bindings } // namespace JSC diff --git a/WebCore/bridge/c/c_instance.cpp b/WebCore/bridge/c/c_instance.cpp index 77b5966..1b05259 100644 --- a/WebCore/bridge/c/c_instance.cpp +++ b/WebCore/bridge/c/c_instance.cpp @@ -138,7 +138,7 @@ JSValue CInstance::invokeMethod(ExecState* exec, const MethodList& methodList, c for (i = 0; i < count; i++) _NPN_ReleaseVariantValue(&cArgs[i]); - JSValue resultValue = convertNPVariantToValue(exec, &resultVariant, _rootObject.get()); + JSValue resultValue = convertNPVariantToValue(exec, &resultVariant, m_rootObject.get()); _NPN_ReleaseVariantValue(&resultVariant); return resultValue; } @@ -173,7 +173,7 @@ JSValue CInstance::invokeDefaultMethod(ExecState* exec, const ArgList& args) for (i = 0; i < count; i++) _NPN_ReleaseVariantValue(&cArgs[i]); - JSValue resultValue = convertNPVariantToValue(exec, &resultVariant, _rootObject.get()); + JSValue resultValue = convertNPVariantToValue(exec, &resultVariant, m_rootObject.get()); _NPN_ReleaseVariantValue(&resultVariant); return resultValue; } @@ -212,7 +212,7 @@ JSValue CInstance::invokeConstruct(ExecState* exec, const ArgList& args) for (i = 0; i < count; i++) _NPN_ReleaseVariantValue(&cArgs[i]); - JSValue resultValue = convertNPVariantToValue(exec, &resultVariant, _rootObject.get()); + JSValue resultValue = convertNPVariantToValue(exec, &resultVariant, m_rootObject.get()); _NPN_ReleaseVariantValue(&resultVariant); return resultValue; } diff --git a/WebCore/bridge/jni/jni_runtime.cpp b/WebCore/bridge/jni/jni_runtime.cpp index d77048d..3624ba5 100644 --- a/WebCore/bridge/jni/jni_runtime.cpp +++ b/WebCore/bridge/jni/jni_runtime.cpp @@ -379,7 +379,7 @@ JavaArray::JavaArray(jobject array, const char* type, PassRefPtr<RootObject> roo JNIEnv *env = getJNIEnv(); _length = env->GetArrayLength((jarray)_array->m_instance); _type = strdup(type); - _rootObject = rootObject; + m_rootObject = rootObject; } JavaArray::~JavaArray () @@ -389,7 +389,7 @@ JavaArray::~JavaArray () RootObject* JavaArray::rootObject() const { - return _rootObject && _rootObject->isValid() ? _rootObject.get() : 0; + return m_rootObject && m_rootObject->isValid() ? m_rootObject.get() : 0; } void JavaArray::setValueAt(ExecState* exec, unsigned index, JSValue aValue) const diff --git a/WebCore/bridge/objc/objc_instance.mm b/WebCore/bridge/objc/objc_instance.mm index 9f2e3bb..25da8b9 100644 --- a/WebCore/bridge/objc/objc_instance.mm +++ b/WebCore/bridge/objc/objc_instance.mm @@ -277,7 +277,7 @@ JSValue ObjcInstance::invokeMethod(ExecState* exec, const MethodList &methodList if (*type != 'v') { [invocation getReturnValue:buffer]; - result = convertObjcValueToValue(exec, buffer, objcValueType, _rootObject.get()); + result = convertObjcValueToValue(exec, buffer, objcValueType, m_rootObject.get()); } } @catch(NSException* localException) { } @@ -329,7 +329,7 @@ JSValue ObjcInstance::invokeDefaultMethod(ExecState* exec, const ArgList &args) // OK with 32 here. char buffer[32]; [invocation getReturnValue:buffer]; - result = convertObjcValueToValue(exec, buffer, objcValueType, _rootObject.get()); + result = convertObjcValueToValue(exec, buffer, objcValueType, m_rootObject.get()); } @catch(NSException* localException) { } moveGlobalExceptionToExecState(exec); @@ -383,7 +383,7 @@ JSValue ObjcInstance::getValueOfUndefinedField(ExecState* exec, const Identifier @try { id objcValue = [targetObject valueForUndefinedKey:[NSString stringWithCString:property.ascii() encoding:NSASCIIStringEncoding]]; - result = convertObjcValueToValue(exec, &objcValue, ObjcObjectType, _rootObject.get()); + result = convertObjcValueToValue(exec, &objcValue, ObjcObjectType, m_rootObject.get()); } @catch(NSException* localException) { // Do nothing. Class did not override valueForUndefinedKey:. } diff --git a/WebCore/bridge/objc/objc_runtime.mm b/WebCore/bridge/objc/objc_runtime.mm index 5efc865..772695c 100644 --- a/WebCore/bridge/objc/objc_runtime.mm +++ b/WebCore/bridge/objc/objc_runtime.mm @@ -174,7 +174,7 @@ JSValue ObjcArray::valueAt(ExecState* exec, unsigned int index) const @try { id obj = [_array.get() objectAtIndex:index]; if (obj) - return convertObjcValueToValue (exec, &obj, ObjcObjectType, _rootObject.get()); + return convertObjcValueToValue (exec, &obj, ObjcObjectType, m_rootObject.get()); } @catch(NSException* localException) { return throwError(exec, GeneralError, "Objective-C exception."); } diff --git a/WebCore/bridge/qt/qt_runtime.cpp b/WebCore/bridge/qt/qt_runtime.cpp index be1364a..c711baa 100644 --- a/WebCore/bridge/qt/qt_runtime.cpp +++ b/WebCore/bridge/qt/qt_runtime.cpp @@ -1743,7 +1743,7 @@ template <typename T> QtArray<T>::~QtArray () template <typename T> RootObject* QtArray<T>::rootObject() const { - return _rootObject && _rootObject->isValid() ? _rootObject.get() : 0; + return m_rootObject && m_rootObject->isValid() ? m_rootObject.get() : 0; } template <typename T> void QtArray<T>::setValueAt(ExecState* exec, unsigned index, JSValue aValue) const |