WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
161852
Web Inspector: Object.shallowEqual() should return false if object prototype chains differ
https://bugs.webkit.org/show_bug.cgi?id=161852
Summary
Web Inspector: Object.shallowEqual() should return false if object prototype ...
Matt Baker
Reported
2016-09-11 16:53:10 PDT
A simple solution would be to just compare constructor names. This will at least catch cases like: Object.shallowEqual([], {}); class A {}; class B extends A {}; Object.shallowEqual(new A, new B);
Attachments
[Patch] Proposed Fix
(7.26 KB, patch)
2016-09-12 10:58 PDT
,
Matt Baker
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Matt Baker
Comment 1
2016-09-12 10:58:14 PDT
Created
attachment 288585
[details]
[Patch] Proposed Fix
Radar WebKit Bug Importer
Comment 2
2016-09-12 10:58:33 PDT
<
rdar://problem/28262106
>
Joseph Pecoraro
Comment 3
2016-09-12 11:15:39 PDT
Comment on
attachment 288585
[details]
[Patch] Proposed Fix View in context:
https://bugs.webkit.org/attachment.cgi?id=288585&action=review
r=me
> Source/WebInspectorUI/UserInterface/Base/Utilities.js:63 > + if (a.constructor !== b.constructor) > return false;
We discussed an alternative checking (__proto__ / Object.getPrototypeOf). I'm fine with either because we shouldn't be modifying object instance __proto__ properties anywhere.
WebKit Commit Bot
Comment 4
2016-09-12 11:37:45 PDT
Comment on
attachment 288585
[details]
[Patch] Proposed Fix Clearing flags on attachment: 288585 Committed
r205815
: <
http://trac.webkit.org/changeset/205815
>
WebKit Commit Bot
Comment 5
2016-09-12 11:37:49 PDT
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug