Title: [92810] trunk/Source/_javascript_Core
- Revision
- 92810
- Author
- [email protected]
- Date
- 2011-08-10 18:08:42 -0700 (Wed, 10 Aug 2011)
Log Message
Removed some incorrect code that was dead.
Reviewed by Oliver Hunt.
clearSingleTransition() wasn't resetting m_data. Luckily,
no one cares, because its caller was unused. Removed both.
* runtime/Structure.cpp:
* runtime/StructureTransitionTable.h:
(JSC::StructureTransitionTable::~StructureTransitionTable):
Modified Paths
Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (92809 => 92810)
--- trunk/Source/_javascript_Core/ChangeLog 2011-08-11 01:02:00 UTC (rev 92809)
+++ trunk/Source/_javascript_Core/ChangeLog 2011-08-11 01:08:42 UTC (rev 92810)
@@ -1,3 +1,16 @@
+2011-08-10 Geoffrey Garen <[email protected]>
+
+ Removed some incorrect code that was dead.
+
+ Reviewed by Oliver Hunt.
+
+ clearSingleTransition() wasn't resetting m_data. Luckily,
+ no one cares, because its caller was unused. Removed both.
+
+ * runtime/Structure.cpp:
+ * runtime/StructureTransitionTable.h:
+ (JSC::StructureTransitionTable::~StructureTransitionTable):
+
2011-08-10 Filip Pizlo <[email protected]>
REGRESSION(r92670-r92744): WebKit crashes when opening Gmail
Modified: trunk/Source/_javascript_Core/runtime/Structure.cpp (92809 => 92810)
--- trunk/Source/_javascript_Core/runtime/Structure.cpp 2011-08-11 01:02:00 UTC (rev 92809)
+++ trunk/Source/_javascript_Core/runtime/Structure.cpp 2011-08-11 01:08:42 UTC (rev 92810)
@@ -83,29 +83,6 @@
return map()->get(make_pair(rep, attributes));
}
-inline void StructureTransitionTable::remove(Structure* structure)
-{
- if (isUsingSingleSlot()) {
- // If more than one transition had been added, then we wouldn't be in
- // single slot mode (even despecifying a from a specific value triggers
- // map mode).
- // As such, the passed structure *must* be the existing transition.
- ASSERT(singleTransition() == structure);
- clearSingleTransition();
- } else {
- // Check whether a mapping exists for structure's key, and whether the
- // entry is structure (the latter check may fail if we initially had a
- // transition with a specific value, and this has been despecified).
-
- // Newer versions of the STL have an std::make_pair function that takes rvalue references.
- // When either of the parameters are bitfields, the C++ compiler will try to bind them as lvalues, which is invalid. To work around this, use unary "+" to make the parameter an rvalue.
- // See https://bugs.webkit.org/show_bug.cgi?id=59261 for more details
- TransitionMap::iterator entry = map()->find(make_pair(structure->m_nameInPrevious, +structure->m_attributesInPrevious));
- if (entry != map()->end() && structure == entry.get().second)
- map()->remove(entry);
- }
-}
-
inline void StructureTransitionTable::add(JSGlobalData& globalData, Structure* structure)
{
if (isUsingSingleSlot()) {
Modified: trunk/Source/_javascript_Core/runtime/StructureTransitionTable.h (92809 => 92810)
--- trunk/Source/_javascript_Core/runtime/StructureTransitionTable.h 2011-08-11 01:02:00 UTC (rev 92809)
+++ trunk/Source/_javascript_Core/runtime/StructureTransitionTable.h 2011-08-11 01:08:42 UTC (rev 92810)
@@ -93,14 +93,18 @@
~StructureTransitionTable()
{
- if (!isUsingSingleSlot())
+ if (!isUsingSingleSlot()) {
delete map();
- else
- clearSingleTransition();
+ return;
+ }
+
+ HandleSlot slot = this->slot();
+ if (!slot)
+ return;
+ HandleHeap::heapFor(slot)->deallocate(slot);
}
inline void add(JSGlobalData&, Structure*);
- inline void remove(Structure*);
inline bool contains(StringImpl* rep, unsigned attributes) const;
inline Structure* get(StringImpl* rep, unsigned attributes) const;
@@ -145,13 +149,6 @@
return 0;
}
- void clearSingleTransition()
- {
- ASSERT(isUsingSingleSlot());
- if (HandleSlot slot = this->slot())
- HandleHeap::heapFor(slot)->deallocate(slot);
- }
-
void setSingleTransition(JSGlobalData& globalData, Structure* structure)
{
ASSERT(isUsingSingleSlot());
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes