Title: [152937] branches/dfgFourthTier/Source/_javascript_Core
- Revision
- 152937
- Author
- [email protected]
- Date
- 2013-07-19 19:53:32 -0700 (Fri, 19 Jul 2013)
Log Message
fourthTier: Structure::isValidOffset() should be able to tell you if you're loading a valid JSValue, and not just not crashing
https://bugs.webkit.org/show_bug.cgi?id=118911
Reviewed by Geoffrey Garen.
We could also have a separate method like "willNotCrash(offset)", but that's not
what isValidOffset() is intended to mean.
* runtime/Structure.h:
(JSC::Structure::isValidOffset):
Modified Paths
Diff
Modified: branches/dfgFourthTier/Source/_javascript_Core/ChangeLog (152936 => 152937)
--- branches/dfgFourthTier/Source/_javascript_Core/ChangeLog 2013-07-20 01:32:24 UTC (rev 152936)
+++ branches/dfgFourthTier/Source/_javascript_Core/ChangeLog 2013-07-20 02:53:32 UTC (rev 152937)
@@ -1,5 +1,18 @@
2013-07-19 Filip Pizlo <[email protected]>
+ fourthTier: Structure::isValidOffset() should be able to tell you if you're loading a valid JSValue, and not just not crashing
+ https://bugs.webkit.org/show_bug.cgi?id=118911
+
+ Reviewed by Geoffrey Garen.
+
+ We could also have a separate method like "willNotCrash(offset)", but that's not
+ what isValidOffset() is intended to mean.
+
+ * runtime/Structure.h:
+ (JSC::Structure::isValidOffset):
+
+2013-07-19 Filip Pizlo <[email protected]>
+
fourthTier: Structure should be able to tell you if it's valid to load at a given offset from any object with that structure
https://bugs.webkit.org/show_bug.cgi?id=118878
Modified: branches/dfgFourthTier/Source/_javascript_Core/runtime/Structure.h (152936 => 152937)
--- branches/dfgFourthTier/Source/_javascript_Core/runtime/Structure.h 2013-07-20 01:32:24 UTC (rev 152936)
+++ branches/dfgFourthTier/Source/_javascript_Core/runtime/Structure.h 2013-07-20 02:53:32 UTC (rev 152937)
@@ -223,8 +223,8 @@
bool isValidOffset(PropertyOffset offset) const
{
return JSC::isValidOffset(offset)
- && (offset < m_inlineCapacity
- || (offset >= firstOutOfLineOffset && offset <= m_offset));
+ && offset <= m_offset
+ && (offset < m_inlineCapacity || offset >= firstOutOfLineOffset);
}
bool masqueradesAsUndefined(JSGlobalObject* lexicalGlobalObject);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes