summaryrefslogtreecommitdiff
path: root/Source/JavaScriptCore/runtime/Structure.h
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@nokia.com>2012-08-24 08:29:43 +0200
committerSimon Hausmann <simon.hausmann@nokia.com>2012-08-24 08:29:43 +0200
commit2e2ba8ff45915f40ed3e014101269c175f2a89a0 (patch)
tree3b94a9a9fa83efa384b8dac611cf8c6495532a62 /Source/JavaScriptCore/runtime/Structure.h
parentf53e6f8e798362ed712d4a51633b0d0b03dbc213 (diff)
downloadqtwebkit-2e2ba8ff45915f40ed3e014101269c175f2a89a0.tar.gz
Imported WebKit commit bf0b0213bbf3886c96610020602012ca7d11b084 (http://svn.webkit.org/repository/webkit/trunk@126545)
New snapshot with clang and python build fixes
Diffstat (limited to 'Source/JavaScriptCore/runtime/Structure.h')
-rw-r--r--Source/JavaScriptCore/runtime/Structure.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/Source/JavaScriptCore/runtime/Structure.h b/Source/JavaScriptCore/runtime/Structure.h
index 0b9c92210..2bb0107b7 100644
--- a/Source/JavaScriptCore/runtime/Structure.h
+++ b/Source/JavaScriptCore/runtime/Structure.h
@@ -256,6 +256,8 @@ namespace JSC {
&& offset <= lastValidOffset();
}
+ bool masqueradesAsUndefined(JSGlobalObject* lexicalGlobalObject);
+
PropertyOffset get(JSGlobalData&, PropertyName);
PropertyOffset get(JSGlobalData&, const UString& name);
JS_EXPORT_PRIVATE PropertyOffset get(JSGlobalData&, PropertyName, unsigned& attributes, JSCell*& specificValue);
@@ -313,6 +315,11 @@ namespace JSC {
return OBJECT_OFFSETOF(Structure, m_prototype);
}
+ static ptrdiff_t globalObjectOffset()
+ {
+ return OBJECT_OFFSETOF(Structure, m_globalObject);
+ }
+
static ptrdiff_t typeInfoFlagsOffset()
{
return OBJECT_OFFSETOF(Structure, m_typeInfo) + TypeInfo::flagsOffset();
@@ -505,6 +512,11 @@ namespace JSC {
return entry ? entry->offset : invalidOffset;
}
+ inline bool Structure::masqueradesAsUndefined(JSGlobalObject* lexicalGlobalObject)
+ {
+ return typeInfo().masqueradesAsUndefined() && globalObject() == lexicalGlobalObject;
+ }
+
inline JSValue JSValue::structureOrUndefined() const
{
if (isCell())