diff options
author | Lorry Tar Creator <lorry-tar-importer@lorry> | 2017-06-27 06:07:23 +0000 |
---|---|---|
committer | Lorry Tar Creator <lorry-tar-importer@lorry> | 2017-06-27 06:07:23 +0000 |
commit | 1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c (patch) | |
tree | 46dcd36c86e7fbc6e5df36deb463b33e9967a6f7 /Source/WebCore/bridge/c/c_instance.h | |
parent | 32761a6cee1d0dee366b885b7b9c777e67885688 (diff) | |
download | WebKitGtk-tarball-master.tar.gz |
webkitgtk-2.16.5HEADwebkitgtk-2.16.5master
Diffstat (limited to 'Source/WebCore/bridge/c/c_instance.h')
-rw-r--r-- | Source/WebCore/bridge/c/c_instance.h | 35 |
1 files changed, 17 insertions, 18 deletions
diff --git a/Source/WebCore/bridge/c/c_instance.h b/Source/WebCore/bridge/c/c_instance.h index db6335319..ee866280e 100644 --- a/Source/WebCore/bridge/c/c_instance.h +++ b/Source/WebCore/bridge/c/c_instance.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2003 Apple Computer, Inc. All rights reserved. + * Copyright (C) 2003 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -10,10 +10,10 @@ * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * - * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY + * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -30,7 +30,6 @@ #include "BridgeJSC.h" #include "runtime_root.h" -#include <wtf/PassRefPtr.h> #include <wtf/text/WTFString.h> typedef struct NPObject NPObject; @@ -43,9 +42,9 @@ class CClass; class CInstance : public Instance { public: - static PassRefPtr<CInstance> create(NPObject* object, PassRefPtr<RootObject> rootObject) + static Ref<CInstance> create(NPObject* object, RefPtr<RootObject>&& rootObject) { - return adoptRef(new CInstance(object, rootObject)); + return adoptRef(*new CInstance(object, WTFMove(rootObject))); } static void setGlobalException(String); @@ -53,20 +52,20 @@ public: virtual ~CInstance(); - virtual Class *getClass() const override; + Class *getClass() const override; - virtual JSValue valueOf(ExecState*) const override; - virtual JSValue defaultValue(ExecState*, PreferredPrimitiveType) const override; + JSValue valueOf(ExecState*) const override; + JSValue defaultValue(ExecState*, PreferredPrimitiveType) const override; - virtual JSValue getMethod(ExecState*, PropertyName) override; - virtual JSValue invokeMethod(ExecState*, RuntimeMethod*) override; - virtual bool supportsInvokeDefaultMethod() const override; - virtual JSValue invokeDefaultMethod(ExecState*) override; + JSValue getMethod(ExecState*, PropertyName) override; + JSValue invokeMethod(ExecState*, RuntimeMethod*) override; + bool supportsInvokeDefaultMethod() const override; + JSValue invokeDefaultMethod(ExecState*) override; - virtual bool supportsConstruct() const override; - virtual JSValue invokeConstruct(ExecState*, const ArgList&) override; + bool supportsConstruct() const override; + JSValue invokeConstruct(ExecState*, const ArgList&) override; - virtual void getPropertyNames(ExecState*, PropertyNameArray&) override; + void getPropertyNames(ExecState*, PropertyNameArray&) override; JSValue stringValue(ExecState*) const; JSValue numberValue(ExecState*) const; @@ -75,9 +74,9 @@ public: NPObject *getObject() const { return _object; } private: - CInstance(NPObject*, PassRefPtr<RootObject>); + CInstance(NPObject*, RefPtr<RootObject>&&); - virtual RuntimeObject* newRuntimeObject(ExecState*) override; + RuntimeObject* newRuntimeObject(ExecState*) override; bool toJSPrimitive(ExecState*, const char*, JSValue&) const; |