[webkit-reviews] review granted: [Bug 195515] REGRESSION(r242622): Web Inspector: Fix asserts "Overridden property is missing overridingProperty" : [Attachment 364119] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Mar 11 12:46:09 PDT 2019


Matt Baker <mattbaker at apple.com> has granted Nikita Vasilyev
<nvasilyev at apple.com>'s request for review:
Bug 195515: REGRESSION(r242622): Web Inspector: Fix asserts "Overridden
property is missing overridingProperty"
https://bugs.webkit.org/show_bug.cgi?id=195515

Attachment 364119: Patch

https://bugs.webkit.org/attachment.cgi?id=364119&action=review




--- Comment #3 from Matt Baker <mattbaker at apple.com> ---
Comment on attachment 364119
  --> https://bugs.webkit.org/attachment.cgi?id=364119
Patch

rs=me. Maybe we should adopt a new pattern in the constructor of classes taking
an optional delegate:

constructor(delegate)
{
-    this._delegate = delegate || null;
+    this._delegate = delegate || {};
}

Then we could simplify tests throughout the class:

- if (this._delegate && this._delegate.someMethod) { ... }
+ if (this._delegate.someMethod) { ... }


More information about the webkit-reviews mailing list