Title: [186120] trunk/Source/WebInspectorUI
Revision
186120
Author
[email protected]
Date
2015-06-30 10:20:20 -0700 (Tue, 30 Jun 2015)

Log Message

Web Inspector: iOS 8: Uncaught Exception expanding Object Prototype
https://bugs.webkit.org/show_bug.cgi?id=146427

Patch by Joseph Pecoraro <[email protected]> on 2015-06-30
Reviewed by Timothy Hatcher.

* UserInterface/Views/ObjectTreePropertyTreeElement.js:
(WebInspector.ObjectTreePropertyTreeElement.prototype._updateProperties):
* UserInterface/Views/ObjectTreeView.js:
(WebInspector.ObjectTreeView.prototype._updateProperties):
We are supposed to receive value properties for __proto__ properties
so that we can immediately start showing information about the property.
When that is not the case, which appeared to only be on legacy
backends for the top level prototype, just ignore it.

Modified Paths

Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (186119 => 186120)


--- trunk/Source/WebInspectorUI/ChangeLog	2015-06-30 17:16:05 UTC (rev 186119)
+++ trunk/Source/WebInspectorUI/ChangeLog	2015-06-30 17:20:20 UTC (rev 186120)
@@ -1,5 +1,21 @@
 2015-06-30  Joseph Pecoraro  <[email protected]>
 
+        Web Inspector: iOS 8: Uncaught Exception expanding Object Prototype
+        https://bugs.webkit.org/show_bug.cgi?id=146427
+
+        Reviewed by Timothy Hatcher.
+
+        * UserInterface/Views/ObjectTreePropertyTreeElement.js:
+        (WebInspector.ObjectTreePropertyTreeElement.prototype._updateProperties):
+        * UserInterface/Views/ObjectTreeView.js:
+        (WebInspector.ObjectTreeView.prototype._updateProperties):
+        We are supposed to receive value properties for __proto__ properties
+        so that we can immediately start showing information about the property.
+        When that is not the case, which appeared to only be on legacy
+        backends for the top level prototype, just ignore it.
+
+2015-06-30  Joseph Pecoraro  <[email protected]>
+
         Web Inspector: Misc. Timeline cleanup
         https://bugs.webkit.org/show_bug.cgi?id=146430
 

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/ObjectTreePropertyTreeElement.js (186119 => 186120)


--- trunk/Source/WebInspectorUI/UserInterface/Views/ObjectTreePropertyTreeElement.js	2015-06-30 17:16:05 UTC (rev 186119)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/ObjectTreePropertyTreeElement.js	2015-06-30 17:20:20 UTC (rev 186120)
@@ -373,6 +373,11 @@
             if (isAPI && propertyDescriptor.nativeGetter)
                 continue;
 
+            // COMPATIBILITY (iOS 8): Sometimes __proto__ is not a value, but a get/set property.
+            // In those cases it is actually not useful to show.
+            if (propertyDescriptor.name === "__proto__" && !propertyDescriptor.hasValue())
+                continue;
+
             if (isArray && isPropertyMode) {
                 if (propertyDescriptor.isIndexProperty())
                     this.appendChild(new WebInspector.ObjectTreeArrayIndexTreeElement(propertyDescriptor, propertyPath));

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/ObjectTreeView.js (186119 => 186120)


--- trunk/Source/WebInspectorUI/UserInterface/Views/ObjectTreeView.js	2015-06-30 17:16:05 UTC (rev 186119)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/ObjectTreeView.js	2015-06-30 17:20:20 UTC (rev 186120)
@@ -293,6 +293,11 @@
 
         var hadProto = false;
         for (var propertyDescriptor of properties) {
+            // COMPATIBILITY (iOS 8): Sometimes __proto__ is not a value, but a get/set property.
+            // In those cases it is actually not useful to show.
+            if (propertyDescriptor.name === "__proto__" && !propertyDescriptor.hasValue())
+                continue;
+
             if (isArray && isPropertyMode) {
                 if (propertyDescriptor.isIndexProperty())
                     this._outline.appendChild(new WebInspector.ObjectTreeArrayIndexTreeElement(propertyDescriptor, propertyPath));
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to