summaryrefslogtreecommitdiff
path: root/Source/WebCore/bridge/c/c_instance.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebCore/bridge/c/c_instance.h')
-rw-r--r--Source/WebCore/bridge/c/c_instance.h35
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;