summaryrefslogtreecommitdiffstats
path: root/Source/JavaScriptCore/runtime/JSObject.h
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@nokia.com>2012-07-24 17:03:20 +0200
committerSimon Hausmann <simon.hausmann@nokia.com>2012-07-24 17:03:20 +0200
commit08d4a74d56ca431877819fc4566e27eafe150342 (patch)
treeebd8530838ab390c015c6b7e659a22852c1663ae /Source/JavaScriptCore/runtime/JSObject.h
parent1de6cd4794bbd5a52189384189a2b8df1848b39b (diff)
Imported WebKit commit 0fbd41c4e13f5a190faf160bf993eee614e6e18e (http://svn.webkit.org/repository/webkit/trunk@123477)
New snapshot that adapts to latest Qt API changes
Diffstat (limited to 'Source/JavaScriptCore/runtime/JSObject.h')
-rw-r--r--Source/JavaScriptCore/runtime/JSObject.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/Source/JavaScriptCore/runtime/JSObject.h b/Source/JavaScriptCore/runtime/JSObject.h
index 9972d6077..cc43440ab 100644
--- a/Source/JavaScriptCore/runtime/JSObject.h
+++ b/Source/JavaScriptCore/runtime/JSObject.h
@@ -173,14 +173,14 @@ namespace JSC {
{
PropertyOffset offset = structure()->get(globalData, propertyName);
checkOffset(offset, structure()->typeInfo().type());
- return offset != invalidOffset ? locationForOffset(offset) : 0;
+ return isValidOffset(offset) ? locationForOffset(offset) : 0;
}
WriteBarrierBase<Unknown>* getDirectLocation(JSGlobalData& globalData, PropertyName propertyName, unsigned& attributes)
{
JSCell* specificFunction;
PropertyOffset offset = structure()->get(globalData, propertyName, attributes, specificFunction);
- return offset != invalidOffset ? locationForOffset(offset) : 0;
+ return isValidOffset(offset) ? locationForOffset(offset) : 0;
}
bool hasInlineStorage() const { return structure()->hasInlineStorage(); }
@@ -227,7 +227,7 @@ namespace JSC {
if (offsetInInlineStorage < static_cast<size_t>(inlineStorageCapacity))
result = offsetInInlineStorage;
else
- result = location - outOfLineStorage() + firstOutOfLineOffset;
+ result = outOfLineStorage() - location + (inlineStorageCapacity - 2);
validateOffset(result, structure()->typeInfo().type());
return result;
}