RESOLVED FIXED 198395
Web Inspector: remove RemoteObject.prototype.getPropertyDescriptorsAsObject
https://bugs.webkit.org/show_bug.cgi?id=198395
Summary Web Inspector: remove RemoteObject.prototype.getPropertyDescriptorsAsObject
Devin Rousso
Reported 2019-05-30 15:55:40 PDT
When calling `remoteObject.getPropertyDescriptorsAsObject`, if one of the returned property descriptors is named `__proto__`, it will replace the `__proto__` of the plain object created for that function with the `WI.PropertyDescriptor`, altering the prototype chain. This is not a good thing. Since this function is only used in a few places, we should remove it entirely.
Attachments
Patch (7.14 KB, patch)
2019-05-30 19:40 PDT, Devin Rousso
no flags
Archive of layout-test-results from ews102 for mac-highsierra (3.20 MB, application/zip)
2019-05-30 20:25 PDT, EWS Watchlist
no flags
Archive of layout-test-results from ews105 for mac-highsierra-wk2 (2.91 MB, application/zip)
2019-05-30 20:51 PDT, EWS Watchlist
no flags
Archive of layout-test-results from ews112 for mac-highsierra (2.88 MB, application/zip)
2019-05-30 21:26 PDT, EWS Watchlist
no flags
Patch (7.15 KB, patch)
2019-05-30 21:46 PDT, Devin Rousso
no flags
Devin Rousso
Comment 1 2019-05-30 19:40:28 PDT
EWS Watchlist
Comment 2 2019-05-30 20:25:52 PDT Comment hidden (obsolete)
EWS Watchlist
Comment 3 2019-05-30 20:25:53 PDT Comment hidden (obsolete)
EWS Watchlist
Comment 4 2019-05-30 20:51:55 PDT Comment hidden (obsolete)
EWS Watchlist
Comment 5 2019-05-30 20:51:57 PDT Comment hidden (obsolete)
EWS Watchlist
Comment 6 2019-05-30 21:26:40 PDT Comment hidden (obsolete)
EWS Watchlist
Comment 7 2019-05-30 21:26:42 PDT Comment hidden (obsolete)
Devin Rousso
Comment 8 2019-05-30 21:46:30 PDT
Created attachment 371033 [details] Patch Integer vs String comparison -.-
Matt Baker
Comment 9 2019-06-03 13:18:49 PDT
Comment on attachment 371033 [details] Patch r=me, nice fix. Since ErrorObjectView.prototype.update is only called internally, and isn't an override, let's make it private or even inline it inside ErrorObjectView.prototype.expand, which is the only call site.
Devin Rousso
Comment 10 2019-06-03 13:29:02 PDT
(In reply to Matt Baker from comment #9) > Since ErrorObjectView.prototype.update is only called internally, and isn't an override, let's make it private or even inline it inside ErrorObjectView.prototype.expand, which is the only call site. I'd rather not make a change like this as it's frankly unnecessary for this patch, and could be more prone to issues than what I'd tested. Furthermore, I'm actually a fan of the idea of modularizing functionality, even if it's only used once, as it makes code easier to read and more future-capable.
WebKit Commit Bot
Comment 11 2019-06-03 13:58:50 PDT
Comment on attachment 371033 [details] Patch Clearing flags on attachment: 371033 Committed r246046: <https://trac.webkit.org/changeset/246046>
WebKit Commit Bot
Comment 12 2019-06-03 13:58:52 PDT
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 13 2019-06-03 13:59:20 PDT
Note You need to log in before you can comment on or make changes to this bug.