RESOLVED FIXED 177734
Prototype structure transition should be a deferred transition
https://bugs.webkit.org/show_bug.cgi?id=177734
Summary Prototype structure transition should be a deferred transition
Saam Barati
Reported 2017-10-01 23:54:43 PDT
I think OPC set depends on the structure being changed before the watchpoint fires. If true, let's make it use the deferred transition mechanism.
Attachments
patch (5.61 KB, patch)
2017-10-10 16:42 PDT, Saam Barati
no flags
Saam Barati
Comment 1 2017-10-10 15:32:26 PDT
So I was right that this was wrong, however, we catch ourselves from bugs because this check: ```bool PropertyCondition::isWatchableWhenValid( Structure* structure, WatchabilityEffort effort) const { if (structure->transitionWatchpointSetHasBeenInvalidated()) { return false; } ... }```` We will always return false here because the Structure in question just transitioned by changing its prototype, therefore, it will always have an invalidated transition watchpoint set. The consequence here is if we always set our prototype to be the same object, we'll end up invalidating these watchpoints repeatedly.
Saam Barati
Comment 2 2017-10-10 16:23:52 PDT
(In reply to Saam Barati from comment #1) > So I was right that this was wrong, however, we catch ourselves from bugs > because this check: > > ```bool PropertyCondition::isWatchableWhenValid( > Structure* structure, WatchabilityEffort effort) const > { > if (structure->transitionWatchpointSetHasBeenInvalidated()) { > return false; > } > ... > }```` > > We will always return false here because the Structure in question just > transitioned by changing its prototype, therefore, it will always have an > invalidated transition watchpoint set. The consequence here is if we always > set our prototype to be the same object, we'll end up invalidating these > watchpoints repeatedly. We actually skip transitioning if we set the prototype to the same value. This makes sense. Anyways, I'm going to make this change for sanity reasons. It seems like we've been relying on the wrong code path all along.
Saam Barati
Comment 3 2017-10-10 16:42:07 PDT
Keith Miller
Comment 4 2017-10-10 16:47:00 PDT
Comment on attachment 323358 [details] patch r=me.
WebKit Commit Bot
Comment 5 2017-10-10 17:54:03 PDT
Comment on attachment 323358 [details] patch Clearing flags on attachment: 323358 Committed r223161: <http://trac.webkit.org/changeset/223161>
WebKit Commit Bot
Comment 6 2017-10-10 17:54:04 PDT
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 7 2017-10-10 17:55:39 PDT
Note You need to log in before you can comment on or make changes to this bug.