summaryrefslogtreecommitdiff
path: root/Source/WebCore/bindings/js/JSErrorHandler.h
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@lorry>2017-06-27 06:07:23 +0000
committerLorry Tar Creator <lorry-tar-importer@lorry>2017-06-27 06:07:23 +0000
commit1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c (patch)
tree46dcd36c86e7fbc6e5df36deb463b33e9967a6f7 /Source/WebCore/bindings/js/JSErrorHandler.h
parent32761a6cee1d0dee366b885b7b9c777e67885688 (diff)
downloadWebKitGtk-tarball-master.tar.gz
Diffstat (limited to 'Source/WebCore/bindings/js/JSErrorHandler.h')
-rw-r--r--Source/WebCore/bindings/js/JSErrorHandler.h17
1 files changed, 7 insertions, 10 deletions
diff --git a/Source/WebCore/bindings/js/JSErrorHandler.h b/Source/WebCore/bindings/js/JSErrorHandler.h
index 55d2d53e0..ba01c0e0b 100644
--- a/Source/WebCore/bindings/js/JSErrorHandler.h
+++ b/Source/WebCore/bindings/js/JSErrorHandler.h
@@ -28,37 +28,34 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef JSErrorHandler_h
-#define JSErrorHandler_h
+#pragma once
#include "JSEventListener.h"
namespace WebCore {
-class JSErrorHandler : public JSEventListener {
+class JSErrorHandler final : public JSEventListener {
public:
- static PassRefPtr<JSErrorHandler> create(JSC::JSObject* listener, JSC::JSObject* wrapper, bool isAttribute, DOMWrapperWorld& world)
+ static Ref<JSErrorHandler> create(JSC::JSObject* listener, JSC::JSObject* wrapper, bool isAttribute, DOMWrapperWorld& world)
{
- return adoptRef(new JSErrorHandler(listener, wrapper, isAttribute, world));
+ return adoptRef(*new JSErrorHandler(listener, wrapper, isAttribute, world));
}
virtual ~JSErrorHandler();
private:
JSErrorHandler(JSC::JSObject* function, JSC::JSObject* wrapper, bool isAttribute, DOMWrapperWorld&);
- virtual void handleEvent(ScriptExecutionContext*, Event*);
+ void handleEvent(ScriptExecutionContext*, Event*) final;
};
// Creates a JS EventListener for "onerror" event handler in worker context. It has custom implementation because
// unlike other event listeners it accepts three parameters.
-inline PassRefPtr<JSErrorHandler> createJSErrorHandler(JSC::ExecState* exec, JSC::JSValue listener, JSC::JSObject* wrapper)
+inline RefPtr<JSErrorHandler> createJSErrorHandler(JSC::ExecState* exec, JSC::JSValue listener, JSC::JSObject* wrapper)
{
if (!listener.isObject())
- return 0;
+ return nullptr;
return JSErrorHandler::create(asObject(listener), wrapper, true, currentWorld(exec));
}
} // namespace WebCore
-
-#endif // JSErrorHandler_h