summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/javascriptcore/JavaScriptCore/runtime/JSGlobalObject.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/3rdparty/javascriptcore/JavaScriptCore/runtime/JSGlobalObject.h')
-rw-r--r--src/3rdparty/javascriptcore/JavaScriptCore/runtime/JSGlobalObject.h33
1 files changed, 20 insertions, 13 deletions
diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/runtime/JSGlobalObject.h b/src/3rdparty/javascriptcore/JavaScriptCore/runtime/JSGlobalObject.h
index 98e9b68ed1..7459c2e12b 100644
--- a/src/3rdparty/javascriptcore/JavaScriptCore/runtime/JSGlobalObject.h
+++ b/src/3rdparty/javascriptcore/JavaScriptCore/runtime/JSGlobalObject.h
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2007 Eric Seidel <eric@webkit.org>
- * Copyright (C) 2007, 2008 Apple Inc. All rights reserved.
+ * Copyright (C) 2007, 2008, 2009 Apple Inc. All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@@ -31,10 +31,6 @@
#include <wtf/HashSet.h>
#include <wtf/OwnPtr.h>
-#ifdef QT_BUILD_SCRIPT_LIB
-#include "SourcePoolQt.h"
-#endif
-
namespace JSC {
class ArrayPrototype;
@@ -43,6 +39,7 @@ namespace JSC {
class Debugger;
class ErrorConstructor;
class FunctionPrototype;
+ class GlobalCodeBlock;
class GlobalEvalFunction;
class NativeErrorConstructor;
class ProgramCodeBlock;
@@ -149,7 +146,7 @@ namespace JSC {
RefPtr<JSGlobalData> globalData;
- HashSet<ProgramCodeBlock*> codeBlocks;
+ HashSet<GlobalCodeBlock*> codeBlocks;
};
public:
@@ -171,15 +168,16 @@ namespace JSC {
public:
virtual ~JSGlobalObject();
- virtual void mark();
+ virtual void markChildren(MarkStack&);
virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&);
+ virtual bool getOwnPropertyDescriptor(ExecState*, const Identifier&, PropertyDescriptor&);
virtual bool hasOwnPropertyForWrite(ExecState*, const Identifier&);
virtual void put(ExecState*, const Identifier&, JSValue, PutPropertySlot&);
virtual void putWithAttributes(ExecState*, const Identifier& propertyName, JSValue value, unsigned attributes);
- virtual void defineGetter(ExecState*, const Identifier& propertyName, JSObject* getterFunc);
- virtual void defineSetter(ExecState*, const Identifier& propertyName, JSObject* setterFunc);
+ virtual void defineGetter(ExecState*, const Identifier& propertyName, JSObject* getterFunc, unsigned attributes);
+ virtual void defineSetter(ExecState*, const Identifier& propertyName, JSObject* setterFunc, unsigned attributes);
// Linked list of all global objects that use the same JSGlobalData.
JSGlobalObject*& head() { return d()->globalData->head; }
@@ -233,9 +231,6 @@ namespace JSC {
Debugger* debugger() const { return d()->debugger; }
void setDebugger(Debugger* debugger)
{
-#ifdef QT_BUILD_SCRIPT_LIB
- globalData()->scriptpool->setDebugger(debugger);
-#endif
d()->debugger = debugger;
}
@@ -257,7 +252,7 @@ namespace JSC {
virtual bool isDynamicScope() const;
- HashSet<ProgramCodeBlock*>& codeBlocks() { return d()->codeBlocks; }
+ HashSet<GlobalCodeBlock*>& codeBlocks() { return d()->codeBlocks; }
void copyGlobalsFrom(RegisterFile&);
void copyGlobalsTo(RegisterFile&);
@@ -336,6 +331,13 @@ namespace JSC {
return symbolTableGet(propertyName, slot);
}
+ inline bool JSGlobalObject::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
+ {
+ if (symbolTableGet(propertyName, descriptor))
+ return true;
+ return JSVariableObject::getOwnPropertyDescriptor(exec, propertyName, descriptor);
+ }
+
inline bool JSGlobalObject::hasOwnPropertyForWrite(ExecState* exec, const Identifier& propertyName)
{
PropertySlot slot;
@@ -358,11 +360,16 @@ namespace JSC {
if (typeInfo().type() == ObjectType)
return m_prototype;
+#if USE(JSVALUE32)
if (typeInfo().type() == StringType)
return exec->lexicalGlobalObject()->stringPrototype();
ASSERT(typeInfo().type() == NumberType);
return exec->lexicalGlobalObject()->numberPrototype();
+#else
+ ASSERT(typeInfo().type() == StringType);
+ return exec->lexicalGlobalObject()->stringPrototype();
+#endif
}
inline StructureChain* Structure::prototypeChain(ExecState* exec) const