summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/javascriptcore/JavaScriptCore/runtime/JSWrapperObject.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/3rdparty/javascriptcore/JavaScriptCore/runtime/JSWrapperObject.h')
-rw-r--r--src/3rdparty/javascriptcore/JavaScriptCore/runtime/JSWrapperObject.h20
1 files changed, 14 insertions, 6 deletions
diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/runtime/JSWrapperObject.h b/src/3rdparty/javascriptcore/JavaScriptCore/runtime/JSWrapperObject.h
index 2a2e3c6ffd..b56a58dc58 100644
--- a/src/3rdparty/javascriptcore/JavaScriptCore/runtime/JSWrapperObject.h
+++ b/src/3rdparty/javascriptcore/JavaScriptCore/runtime/JSWrapperObject.h
@@ -25,7 +25,7 @@
#include "JSObject.h"
namespace JSC {
-
+
// This class is used as a base for classes such as String,
// Number, Boolean and Date which are wrappers for primitive types.
class JSWrapperObject : public JSObject {
@@ -35,23 +35,31 @@ namespace JSC {
public:
JSValue internalValue() const { return m_internalValue; }
void setInternalValue(JSValue);
-
- virtual void mark();
-
+
+ static PassRefPtr<Structure> createStructure(JSValue prototype)
+ {
+ return Structure::create(prototype, TypeInfo(ObjectType, HasStandardGetOwnPropertySlot | HasDefaultGetPropertyNames | HasDefaultMark));
+ }
+
private:
+ virtual void markChildren(MarkStack&);
+
JSValue m_internalValue;
};
-
+
inline JSWrapperObject::JSWrapperObject(PassRefPtr<Structure> structure)
: JSObject(structure)
{
+ addAnonymousSlots(1);
+ putAnonymousValue(0, jsNull());
}
-
+
inline void JSWrapperObject::setInternalValue(JSValue value)
{
ASSERT(value);
ASSERT(!value.isObject());
m_internalValue = value;
+ putAnonymousValue(0, value);
}
} // namespace JSC