⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 284506 in webkit


Ignore:
Timestamp:
Oct 19, 2021, 3:48:26 PM (5 years ago)
Author:
sbarati@apple.com
Message:

canDoFastSpread should also check that the Structure is from the global object we're watching
https://bugs.webkit.org/show_bug.cgi?id=231976
<rdar://84340372>

Reviewed by Keith Miller.

  • dfg/DFGGraph.cpp:

(JSC::DFG::Graph::canDoFastSpread):

Location:
trunk/Source/JavaScriptCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r284480 r284506  
     12021-10-19  Saam Barati  <sbarati@apple.com>
     2
     3        canDoFastSpread should also check that the Structure is from the global object we're watching
     4        https://bugs.webkit.org/show_bug.cgi?id=231976
     5        <rdar://84340372>
     6
     7        Reviewed by Keith Miller.
     8
     9        * dfg/DFGGraph.cpp:
     10        (JSC::DFG::Graph::canDoFastSpread):
     11
    1122021-10-19  Chris Dumez  <cdumez@apple.com>
    213
  • trunk/Source/JavaScriptCore/dfg/DFGGraph.cpp

    r281615 r284506  
    18441844        return false;
    18451845
    1846     ArrayPrototype* arrayPrototype = globalObjectFor(node->child1()->origin.semantic)->arrayPrototype();
     1846    JSGlobalObject* globalObject = globalObjectFor(node->child1()->origin.semantic);
     1847    ArrayPrototype* arrayPrototype = globalObject->arrayPrototype();
    18471848    bool allGood = true;
    18481849    value.m_structure.forEach([&] (RegisteredStructure structure) {
    18491850        allGood &= structure->hasMonoProto()
     1851            && structure->globalObject() == globalObject
    18501852            && structure->storedPrototype() == arrayPrototype
    18511853            && !structure->isDictionary()
Note: See TracChangeset for help on using the changeset viewer.