Rename confusingly named "runtimeObject" functions
[WebKit-https.git] / Source / WebCore / bridge / runtime_method.cpp
index f05bfe6..4af3d65 100644 (file)
@@ -89,10 +89,8 @@ static EncodedJSValue JSC_HOST_CALL callRuntimeMethod(ExecState* exec)
             return JSValue::encode(RuntimeObject::throwInvalidAccessError(exec));
     } else {
         // Calling a runtime object of a plugin element?
-        if (thisValue.inherits(JSHTMLElement::info())) {
-            HTMLElement* element = jsCast<JSHTMLElement*>(asObject(thisValue))->impl();
-            instance = pluginInstance(element);
-        }
+        if (thisValue.inherits(JSHTMLElement::info()))
+            instance = pluginInstance(*jsCast<JSHTMLElement*>(asObject(thisValue))->impl());
         if (!instance)
             return throwVMTypeError(exec);
     }