[JSC] Unify how we throw TypeError from C++
[WebKit-https.git] / Source / WebCore / bridge / objc / objc_instance.mm
index 6a632f4..81d2caf 100644 (file)
@@ -206,7 +206,7 @@ JSC::JSValue ObjcInstance::getMethod(ExecState* exec, PropertyName propertyName)
 JSC::JSValue ObjcInstance::invokeMethod(ExecState* exec, RuntimeMethod* runtimeMethod)
 {
     if (!asObject(runtimeMethod)->inherits(ObjCRuntimeMethod::info()))
-        return exec->vm().throwException(exec, createTypeError(exec, "Attempt to invoke non-plug-in method on plug-in object."));
+        return throwTypeError(exec, ASCIILiteral("Attempt to invoke non-plug-in method on plug-in object."));
 
     ObjcMethod *method = static_cast<ObjcMethod*>(runtimeMethod->method());
     ASSERT(method);