1 | /*
|
---|
2 | * Copyright (C) 1999-2002 Harri Porten ([email protected])
|
---|
3 | * Copyright (C) 2001 Peter Kelly ([email protected])
|
---|
4 | * Copyright (C) 2004, 2007, 2008 Apple Inc. All rights reserved.
|
---|
5 | *
|
---|
6 | * This library is free software; you can redistribute it and/or
|
---|
7 | * modify it under the terms of the GNU Library General Public
|
---|
8 | * License as published by the Free Software Foundation; either
|
---|
9 | * version 2 of the License, or (at your option) any later version.
|
---|
10 | *
|
---|
11 | * This library is distributed in the hope that it will be useful,
|
---|
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
---|
14 | * Library General Public License for more details.
|
---|
15 | *
|
---|
16 | * You should have received a copy of the GNU Library General Public License
|
---|
17 | * along with this library; see the file COPYING.LIB. If not, write to
|
---|
18 | * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
---|
19 | * Boston, MA 02110-1301, USA.
|
---|
20 | *
|
---|
21 | */
|
---|
22 |
|
---|
23 | #include "config.h"
|
---|
24 | #include "GetterSetter.h"
|
---|
25 |
|
---|
26 | #include <wtf/Assertions.h>
|
---|
27 |
|
---|
28 | namespace KJS {
|
---|
29 |
|
---|
30 | void GetterSetter::mark()
|
---|
31 | {
|
---|
32 | JSCell::mark();
|
---|
33 |
|
---|
34 | if (m_getter && !m_getter->marked())
|
---|
35 | m_getter->mark();
|
---|
36 | if (m_setter && !m_setter->marked())
|
---|
37 | m_setter->mark();
|
---|
38 | }
|
---|
39 |
|
---|
40 | JSValue* GetterSetter::toPrimitive(ExecState*, JSType) const
|
---|
41 | {
|
---|
42 | ASSERT_NOT_REACHED();
|
---|
43 | return jsNull();
|
---|
44 | }
|
---|
45 |
|
---|
46 | bool GetterSetter::getPrimitiveNumber(ExecState*, double& number, JSValue*& value)
|
---|
47 | {
|
---|
48 | ASSERT_NOT_REACHED();
|
---|
49 | number = 0;
|
---|
50 | value = 0;
|
---|
51 | return true;
|
---|
52 | }
|
---|
53 |
|
---|
54 | bool GetterSetter::toBoolean(ExecState*) const
|
---|
55 | {
|
---|
56 | ASSERT_NOT_REACHED();
|
---|
57 | return false;
|
---|
58 | }
|
---|
59 |
|
---|
60 | double GetterSetter::toNumber(ExecState*) const
|
---|
61 | {
|
---|
62 | ASSERT_NOT_REACHED();
|
---|
63 | return 0.0;
|
---|
64 | }
|
---|
65 |
|
---|
66 | UString GetterSetter::toString(ExecState*) const
|
---|
67 | {
|
---|
68 | ASSERT_NOT_REACHED();
|
---|
69 | return UString::null();
|
---|
70 | }
|
---|
71 |
|
---|
72 | JSObject* GetterSetter::toObject(ExecState* exec) const
|
---|
73 | {
|
---|
74 | ASSERT_NOT_REACHED();
|
---|
75 | return jsNull()->toObject(exec);
|
---|
76 | }
|
---|
77 |
|
---|
78 | } // namespace KJS
|
---|