diff options
Diffstat (limited to 'Source/JavaScriptCore/runtime/Structure.h')
-rw-r--r-- | Source/JavaScriptCore/runtime/Structure.h | 12 |
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()) |