Title: [179680] branches/safari-600.1.4.15-branch

Diff

Modified: branches/safari-600.1.4.15-branch/LayoutTests/ChangeLog (179679 => 179680)


--- branches/safari-600.1.4.15-branch/LayoutTests/ChangeLog	2015-02-05 08:19:19 UTC (rev 179679)
+++ branches/safari-600.1.4.15-branch/LayoutTests/ChangeLog	2015-02-05 08:55:50 UTC (rev 179680)
@@ -1,3 +1,17 @@
+2015-02-05  Lucas Forschler  <[email protected]>
+
+        Merge r178768
+
+    2015-01-20  Joseph Pecoraro  <[email protected]>
+
+            Web Inspector: Expanding event objects in console shows undefined for most values, it should have real values
+            https://bugs.webkit.org/show_bug.cgi?id=137306
+
+            Reviewed by Timothy Hatcher.
+
+            * inspector/model/remote-object-get-properties-expected.txt: Added.
+            * inspector/model/remote-object-get-properties.html: Added.
+
 2015-02-04  Lucas Forschler  <[email protected]>
 
         Merge r178363

Modified: branches/safari-600.1.4.15-branch/Source/_javascript_Core/ChangeLog (179679 => 179680)


--- branches/safari-600.1.4.15-branch/Source/_javascript_Core/ChangeLog	2015-02-05 08:19:19 UTC (rev 179679)
+++ branches/safari-600.1.4.15-branch/Source/_javascript_Core/ChangeLog	2015-02-05 08:55:50 UTC (rev 179680)
@@ -1,3 +1,26 @@
+2015-02-05  Lucas Forschler  <[email protected]>
+
+        Merge r178768
+
+    2015-01-20  Joseph Pecoraro  <[email protected]>
+
+            Web Inspector: Expanding event objects in console shows undefined for most values, it should have real values
+            https://bugs.webkit.org/show_bug.cgi?id=137306
+
+            Reviewed by Timothy Hatcher.
+
+            Provide another optional parameter to getProperties, to gather a list
+            of all own and getter properties.
+
+            * inspector/InjectedScript.cpp:
+            (Inspector::InjectedScript::getProperties):
+            * inspector/InjectedScript.h:
+            * inspector/InjectedScriptSource.js:
+            * inspector/agents/InspectorRuntimeAgent.cpp:
+            (Inspector::InspectorRuntimeAgent::getProperties):
+            * inspector/agents/InspectorRuntimeAgent.h:
+            * inspector/protocol/Runtime.json:
+
 2015-02-04  Lucas Forschler  <[email protected]>
 
         Merge r179329

Modified: branches/safari-600.1.4.15-branch/Source/_javascript_Core/inspector/InjectedScript.cpp (179679 => 179680)


--- branches/safari-600.1.4.15-branch/Source/_javascript_Core/inspector/InjectedScript.cpp	2015-02-05 08:19:19 UTC (rev 179679)
+++ branches/safari-600.1.4.15-branch/Source/_javascript_Core/inspector/InjectedScript.cpp	2015-02-05 08:55:50 UTC (rev 179680)
@@ -109,11 +109,12 @@
     *result = Inspector::TypeBuilder::Debugger::FunctionDetails::runtimeCast(resultValue);
 }
 
-void InjectedScript::getProperties(ErrorString* errorString, const String& objectId, bool ownProperties, RefPtr<Array<Inspector::TypeBuilder::Runtime::PropertyDescriptor>>* properties)
+void InjectedScript::getProperties(ErrorString* errorString, const String& objectId, bool ownProperties, bool ownAndGetterProperties, RefPtr<Array<Inspector::TypeBuilder::Runtime::PropertyDescriptor>>* properties)
 {
     Deprecated::ScriptFunctionCall function(injectedScriptObject(), ASCIILiteral("getProperties"), inspectorEnvironment()->functionCallHandler());
     function.appendArgument(objectId);
     function.appendArgument(ownProperties);
+    function.appendArgument(ownAndGetterProperties);
 
     RefPtr<InspectorValue> result;
     makeCall(function, &result);

Modified: branches/safari-600.1.4.15-branch/Source/_javascript_Core/inspector/InjectedScript.h (179679 => 179680)


--- branches/safari-600.1.4.15-branch/Source/_javascript_Core/inspector/InjectedScript.h	2015-02-05 08:19:19 UTC (rev 179679)
+++ branches/safari-600.1.4.15-branch/Source/_javascript_Core/inspector/InjectedScript.h	2015-02-05 08:55:50 UTC (rev 179680)
@@ -60,7 +60,7 @@
     void callFunctionOn(ErrorString*, const String& objectId, const String& _expression_, const String& arguments, bool returnByValue, bool generatePreview, RefPtr<TypeBuilder::Runtime::RemoteObject>* result, TypeBuilder::OptOutput<bool>* wasThrown);
     void evaluateOnCallFrame(ErrorString*, const Deprecated::ScriptValue& callFrames, const String& callFrameId, const String& _expression_, const String& objectGroup, bool includeCommandLineAPI, bool returnByValue, bool generatePreview, RefPtr<TypeBuilder::Runtime::RemoteObject>* result, TypeBuilder::OptOutput<bool>* wasThrown);
     void getFunctionDetails(ErrorString*, const String& functionId, RefPtr<TypeBuilder::Debugger::FunctionDetails>* result);
-    void getProperties(ErrorString*, const String& objectId, bool ownProperties, RefPtr<TypeBuilder::Array<TypeBuilder::Runtime::PropertyDescriptor>>* result);
+    void getProperties(ErrorString*, const String& objectId, bool ownProperties, bool ownAndGetterProperties, RefPtr<TypeBuilder::Array<TypeBuilder::Runtime::PropertyDescriptor>>* result);
     void getInternalProperties(ErrorString*, const String& objectId, RefPtr<TypeBuilder::Array<TypeBuilder::Runtime::InternalPropertyDescriptor>>* result);
 
     PassRefPtr<TypeBuilder::Array<TypeBuilder::Debugger::CallFrame>> wrapCallFrames(const Deprecated::ScriptValue&);

Modified: branches/safari-600.1.4.15-branch/Source/_javascript_Core/inspector/InjectedScriptSource.js (179679 => 179680)


--- branches/safari-600.1.4.15-branch/Source/_javascript_Core/inspector/InjectedScriptSource.js	2015-02-05 08:19:19 UTC (rev 179679)
+++ branches/safari-600.1.4.15-branch/Source/_javascript_Core/inspector/InjectedScriptSource.js	2015-02-05 08:55:50 UTC (rev 179680)
@@ -216,12 +216,7 @@
         return result;
     },
 
-    /**
-     * @param {string} objectId
-     * @param {boolean} ownProperties
-     * @return {Array.<RuntimeAgent.PropertyDescriptor>|boolean}
-     */
-    getProperties: function(objectId, ownProperties)
+    getProperties: function(objectId, ownProperties, ownAndGetterProperties)
     {
         var parsedObjectId = this._parseObjectId(objectId);
         var object = this._objectForId(parsedObjectId);
@@ -229,8 +224,9 @@
 
         if (!this._isDefined(object))
             return false;
-        var descriptors = this._propertyDescriptors(object, ownProperties);
 
+        var descriptors = this._propertyDescriptors(object, ownProperties, ownAndGetterProperties);
+
         // Go over properties, wrap object values.
         for (var i = 0; i < descriptors.length; ++i) {
             var descriptor = descriptors[i];
@@ -245,6 +241,7 @@
             if (!("enumerable" in descriptor))
                 descriptor.enumerable = false;
         }
+
         return descriptors;
     },
 
@@ -318,70 +315,6 @@
     },
 
     /**
-     * @param {Object} object
-     * @param {boolean} ownProperties
-     * @return {Array.<Object>}
-     */
-    _propertyDescriptors: function(object, ownProperties)
-    {
-        var descriptors = [];
-        var nameProcessed = {};
-        nameProcessed["__proto__"] = null;
-        for (var o = object; this._isDefined(o); o = o.__proto__) {
-            var names = Object.getOwnPropertyNames(/** @type {!Object} */ (o));
-            for (var i = 0; i < names.length; ++i) {
-                var name = names[i];
-                if (nameProcessed[name])
-                    continue;
-
-                try {
-                    nameProcessed[name] = true;
-                    var descriptor = Object.getOwnPropertyDescriptor(/** @type {!Object} */ (object), name);
-                    if (!descriptor) {
-                        // Not all bindings provide proper descriptors. Fall back to the writable, configurable property.
-                        try {
-                            descriptor = { name: name, value: object[name], writable: false, configurable: false, enumerable: false};
-                            if (o === object)
-                                descriptor.isOwn = true;
-                            descriptors.push(descriptor);
-                        } catch (e) {
-                            // Silent catch.
-                        }
-                        continue;
-                    }
-                    if (descriptor.hasOwnProperty("get") && descriptor.hasOwnProperty("set") && !descriptor.get && !descriptor.set) {
-                        // Not all bindings provide proper descriptors. Fall back to the writable, configurable property.
-                        try {
-                            descriptor = { name: name, value: object[name], writable: false, configurable: false, enumerable: false};
-                            if (o === object)
-                                descriptor.isOwn = true;
-                            descriptors.push(descriptor);
-                        } catch (e) {
-                            // Silent catch.
-                        }
-                        continue;
-                    }
-                } catch (e) {
-                    var descriptor = {};
-                    descriptor.value = e;
-                    descriptor.wasThrown = true;
-                }
-
-                descriptor.name = name;
-                if (o === object)
-                    descriptor.isOwn = true;
-                descriptors.push(descriptor);
-            }
-            if (ownProperties) {
-                if (object.__proto__)
-                    descriptors.push({ name: "__proto__", value: object.__proto__, writable: true, configurable: true, enumerable: false, isOwn: true});
-                break;
-            }
-        }
-        return descriptors;
-    },
-
-    /**
      * @param {string} _expression_
      * @param {string} objectGroup
      * @param {boolean} injectCommandLineAPI
@@ -679,6 +612,109 @@
         return module;
     },
 
+    _propertyDescriptors: function(object, ownProperties, ownAndGetterProperties)
+    {
+        // Modes:
+        //  - ownProperties - only own properties and __proto__
+        //  - ownAndGetterProperties - own properties, __proto__, and getters in the prototype chain
+        //  - neither - get all properties in the prototype chain, exclude __proto__
+
+        var descriptors = [];
+        var nameProcessed = {};
+        nameProcessed["__proto__"] = null;
+
+        function createFakeValueDescriptor(name, descriptor, isOwnProperty)
+        {
+            try {
+                return {name: name, value: object[name], writable: descriptor.writable, configurable: descriptor.configurable, enumerable: descriptor.enumerable};
+            } catch (e) {
+                var errorDescriptor = {name: name, value: e, wasThrown: true};
+                if (isOwnProperty)
+                    errorDescriptor.isOwn = true;
+                return errorDescriptor;
+            }
+        }
+
+        function processDescriptor(descriptor, isOwnProperty)
+        {
+            // Own properties only.
+            if (ownProperties) {
+                if (isOwnProperty)
+                    descriptors.push(descriptor);
+                return;
+            }
+
+            // Own and getter properties.
+            if (ownAndGetterProperties) {
+                if (isOwnProperty) {
+                    // Own property, include the descriptor as is.
+                    descriptors.push(descriptor);
+                } else if (descriptor.hasOwnProperty("get") && descriptor.get) {
+                    // Getter property in the prototype chain. Create a fake value descriptor.
+                    descriptors.push(createFakeValueDescriptor(descriptor.name, descriptor, isOwnProperty));
+                } else if (descriptor.possibleNativeBindingGetter) {
+                    // Possible getter property in the prototype chain.
+                    descriptors.push(descriptor);
+                }
+                return;
+            }
+
+            // All properties.
+            descriptors.push(descriptor);
+        }
+
+        function processPropertyNames(o, names, isOwnProperty)
+        {
+            for (var i = 0; i < names.length; ++i) {
+                var name = names[i];
+                if (nameProcessed[name] || name === "__proto__")
+                    continue;
+
+                nameProcessed[name] = true;
+
+                var descriptor = Object.getOwnPropertyDescriptor(o, name);
+                if (!descriptor) {
+                    // FIXME: Bad descriptor. Can we get here?
+                    // Fall back to very restrictive settings.
+                    var fakeDescriptor = createFakeValueDescriptor(name, {writable: false, configurable: false, enumerable: false}, isOwnProperty);
+                    processDescriptor(fakeDescriptor, isOwnProperty);
+                    continue;
+                }
+
+                if (descriptor.hasOwnProperty("get") && descriptor.hasOwnProperty("set") && !descriptor.get && !descriptor.set) {
+                    // FIXME: <https://webkit.org/b/140575> Web Inspector: Native Bindings Descriptors are Incomplete
+                    // Developers may create such a descriptors, so we should be resilient:
+                    // var x = {}; Object.defineProperty(x, "p", {get:undefined}); Object.getOwnPropertyDescriptor(x, "p")
+                    var fakeDescriptor = createFakeValueDescriptor(name, descriptor, isOwnProperty);
+                    fakeDescriptor.possibleNativeBindingGetter = true; // Native bindings.
+                    processDescriptor(fakeDescriptor, isOwnProperty);
+                    continue;
+                }
+
+                descriptor.name = name;
+                if (isOwnProperty)
+                    descriptor.isOwn = true;
+                processDescriptor(descriptor, isOwnProperty);
+            }
+        }
+
+        // Iterate prototype chain.
+        for (var o = object; this._isDefined(o); o = o.__proto__) {
+            var isOwnProperty = o === object;
+            processPropertyNames(o, Object.getOwnPropertyNames(o), isOwnProperty);
+            if (ownProperties)
+                break;
+        }
+        
+        // Include __proto__ at the end.
+        try {
+            if (object.__proto__)
+                descriptors.push({name: "__proto__", value: object.__proto__, writable: true, configurable: true, enumerable: false, isOwn: true});
+        } catch (e) {}
+
+        return descriptors;
+    },
+
     /**
      * @param {*} object
      * @return {boolean}

Modified: branches/safari-600.1.4.15-branch/Source/_javascript_Core/inspector/agents/InspectorRuntimeAgent.cpp (179679 => 179680)


--- branches/safari-600.1.4.15-branch/Source/_javascript_Core/inspector/agents/InspectorRuntimeAgent.cpp	2015-02-05 08:19:19 UTC (rev 179679)
+++ branches/safari-600.1.4.15-branch/Source/_javascript_Core/inspector/agents/InspectorRuntimeAgent.cpp	2015-02-05 08:55:50 UTC (rev 179680)
@@ -157,7 +157,7 @@
     }
 }
 
-void InspectorRuntimeAgent::getProperties(ErrorString* errorString, const String& objectId, const bool* const ownProperties, RefPtr<Inspector::TypeBuilder::Array<Inspector::TypeBuilder::Runtime::PropertyDescriptor>>& result, RefPtr<Inspector::TypeBuilder::Array<Inspector::TypeBuilder::Runtime::InternalPropertyDescriptor>>& internalProperties)
+void InspectorRuntimeAgent::getProperties(ErrorString* errorString, const String& objectId, const bool* const ownProperties, const bool* const ownAndGetterProperties, RefPtr<Inspector::TypeBuilder::Array<Inspector::TypeBuilder::Runtime::PropertyDescriptor>>& result, RefPtr<Inspector::TypeBuilder::Array<Inspector::TypeBuilder::Runtime::InternalPropertyDescriptor>>& internalProperties)
 {
     InjectedScript injectedScript = m_injectedScriptManager->injectedScriptForObjectId(objectId);
     if (injectedScript.hasNoValue()) {
@@ -168,7 +168,7 @@
     ScriptDebugServer::PauseOnExceptionsState previousPauseOnExceptionsState = setPauseOnExceptionsState(m_scriptDebugServer, ScriptDebugServer::DontPauseOnExceptions);
     muteConsole();
 
-    injectedScript.getProperties(errorString, objectId, ownProperties ? *ownProperties : false, &result);
+    injectedScript.getProperties(errorString, objectId, ownProperties ? *ownProperties : false, ownAndGetterProperties ? *ownAndGetterProperties : false, &result);
     injectedScript.getInternalProperties(errorString, objectId, &internalProperties);
 
     unmuteConsole();

Modified: branches/safari-600.1.4.15-branch/Source/_javascript_Core/inspector/agents/InspectorRuntimeAgent.h (179679 => 179680)


--- branches/safari-600.1.4.15-branch/Source/_javascript_Core/inspector/agents/InspectorRuntimeAgent.h	2015-02-05 08:19:19 UTC (rev 179679)
+++ branches/safari-600.1.4.15-branch/Source/_javascript_Core/inspector/agents/InspectorRuntimeAgent.h	2015-02-05 08:55:50 UTC (rev 179680)
@@ -63,7 +63,7 @@
     virtual void evaluate(ErrorString*, const String& _expression_, const String* objectGroup, const bool* includeCommandLineAPI, const bool* doNotPauseOnExceptionsAndMuteConsole, const int* executionContextId, const bool* returnByValue, const bool* generatePreview, RefPtr<Inspector::TypeBuilder::Runtime::RemoteObject>& result, Inspector::TypeBuilder::OptOutput<bool>* wasThrown) override final;
     virtual void callFunctionOn(ErrorString*, const String& objectId, const String& _expression_, const RefPtr<Inspector::InspectorArray>* optionalArguments, const bool* doNotPauseOnExceptionsAndMuteConsole, const bool* returnByValue, const bool* generatePreview, RefPtr<Inspector::TypeBuilder::Runtime::RemoteObject>& result, Inspector::TypeBuilder::OptOutput<bool>* wasThrown) override final;
     virtual void releaseObject(ErrorString*, const ErrorString& objectId) override final;
-    virtual void getProperties(ErrorString*, const String& objectId, const bool* ownProperties, RefPtr<Inspector::TypeBuilder::Array<Inspector::TypeBuilder::Runtime::PropertyDescriptor>>& result, RefPtr<Inspector::TypeBuilder::Array<Inspector::TypeBuilder::Runtime::InternalPropertyDescriptor>>& internalProperties) override final;
+    virtual void getProperties(ErrorString*, const String& objectId, const bool* ownProperties, const bool* const ownAndGetterProperties, RefPtr<Inspector::TypeBuilder::Array<Inspector::TypeBuilder::Runtime::PropertyDescriptor>>& result, RefPtr<Inspector::TypeBuilder::Array<Inspector::TypeBuilder::Runtime::InternalPropertyDescriptor>>& internalProperties) override final;
     virtual void releaseObjectGroup(ErrorString*, const String& objectGroup) override final;
     virtual void run(ErrorString*) override;
 

Modified: branches/safari-600.1.4.15-branch/Source/_javascript_Core/inspector/protocol/Runtime.json (179679 => 179680)


--- branches/safari-600.1.4.15-branch/Source/_javascript_Core/inspector/protocol/Runtime.json	2015-02-05 08:19:19 UTC (rev 179679)
+++ branches/safari-600.1.4.15-branch/Source/_javascript_Core/inspector/protocol/Runtime.json	2015-02-05 08:55:50 UTC (rev 179680)
@@ -163,7 +163,8 @@
             "name": "getProperties",
             "parameters": [
                 { "name": "objectId", "$ref": "RemoteObjectId", "description": "Identifier of the object to return properties for." },
-                { "name": "ownProperties", "optional": true, "type": "boolean", "description": "If true, returns properties belonging only to the element itself, not to its prototype chain." }
+                { "name": "ownProperties", "optional": true, "type": "boolean", "description": "If true, returns properties belonging only to the object itself, not to its prototype chain." },
+                { "name": "ownAndGetterProperties", "optional": true, "type": "boolean", "description": "If true, returns properties belonging to the object itself, and getters in its prototype chain." }
             ],
             "returns": [
                 { "name": "result", "type": "array", "items": { "$ref": "PropertyDescriptor"}, "description": "Object properties." },

Modified: branches/safari-600.1.4.15-branch/Source/WebInspectorUI/ChangeLog (179679 => 179680)


--- branches/safari-600.1.4.15-branch/Source/WebInspectorUI/ChangeLog	2015-02-05 08:19:19 UTC (rev 179679)
+++ branches/safari-600.1.4.15-branch/Source/WebInspectorUI/ChangeLog	2015-02-05 08:55:50 UTC (rev 179680)
@@ -1,3 +1,28 @@
+2015-02-05  Lucas Forschler  <[email protected]>
+
+        Merge r178768
+
+    2015-01-20  Joseph Pecoraro  <[email protected]>
+
+            Web Inspector: Expanding event objects in console shows undefined for most values, it should have real values
+            https://bugs.webkit.org/show_bug.cgi?id=137306
+
+            Reviewed by Timothy Hatcher.
+
+            When first expanding an object, show all the object's own properties and any
+            getter properties that may be on its prototype chain. Now, we only fetch
+            own properties, for __proto__ properties.
+
+            * UserInterface/Protocol/RemoteObject.js:
+            (WebInspector.RemoteObject.prototype.getOwnProperties):
+            (WebInspector.RemoteObject.prototype.getOwnAndGetterProperties):
+            (WebInspector.RemoteObject.prototype.getAllProperties):
+            (WebInspector.RemoteObject.prototype.get hasChildren): Deleted.
+            * UserInterface/Views/ObjectPropertiesSection.js:
+            (WebInspector.ObjectPropertiesSection):
+            (WebInspector.ObjectPropertiesSection.prototype.update):
+            (WebInspector.ObjectPropertyTreeElement.prototype.onpopulate):
+
 2014-07-31  Matthew Hanson  <[email protected]>
 
         Merge r171866. <rdar://problem/17872676>

Modified: branches/safari-600.1.4.15-branch/Source/WebInspectorUI/UserInterface/Protocol/RemoteObject.js (179679 => 179680)


--- branches/safari-600.1.4.15-branch/Source/WebInspectorUI/UserInterface/Protocol/RemoteObject.js	2015-02-05 08:19:19 UTC (rev 179679)
+++ branches/safari-600.1.4.15-branch/Source/WebInspectorUI/UserInterface/Protocol/RemoteObject.js	2015-02-05 08:55:50 UTC (rev 179680)
@@ -118,15 +118,20 @@
 
     getOwnProperties: function(callback)
     {
-        this._getProperties(true, callback);
+        this._getProperties(true, false, callback);
     },
 
+    getOwnAndGetterProperties: function(callback)
+    {
+        this._getProperties(false, true, callback);
+    },
+
     getAllProperties: function(callback)
     {
-        this._getProperties(false, callback);
+        this._getProperties(false, false, callback);
     },
 
-    _getProperties: function(ownProperties, callback)
+    _getProperties: function(ownProperties, ownAndGetterProperties, callback)
     {
         if (!this._objectId) {
             callback([]);
@@ -152,7 +157,32 @@
             }
             callback(result);
         }
-        RuntimeAgent.getProperties(this._objectId, ownProperties, remoteObjectBinder);
+
+        // COMPATIBILITY (iOS 8): RuntimeAgent.getProperties did not support ownerAndGetterProperties.
+        // Here we do our best to reimplement it by getting all properties and reducing them down.
+        if (ownAndGetterProperties && !RuntimeAgent.getProperties.supports("ownAndGetterProperties")) {
+            RuntimeAgent.getProperties(this._objectId, function(error, allProperties) {
+                var ownOrGetterPropertiesList = [];
+                if (allProperties) {
+                    for (var property of allProperties) {
+                        if (property.isOwn || property.get || property.name === "__proto__") {
+                            // Own property or getter property in prototype chain.
+                            ownOrGetterPropertiesList.push(property);
+                        } else if (property.value && property.name !== property.name.toUpperCase()) {
+                            var type = property.value.type;
+                            if (type && type !== "function" && property.name !== "constructor") {
+                                // Possible native binding getter property converted to a value. Also, no CONSTANT name style and not "constructor".
+                                ownOrGetterPropertiesList.push(property);
+                            }
+                        }
+                    }
+                }
+                remoteObjectBinder(error, ownOrGetterPropertiesList);
+            }); 
+            return;
+        }
+
+        RuntimeAgent.getProperties(this._objectId, ownProperties, ownAndGetterProperties, remoteObjectBinder);
     },
 
     setPropertyValue: function(name, value, callback)

Modified: branches/safari-600.1.4.15-branch/Source/WebInspectorUI/UserInterface/Views/ObjectPropertiesSection.js (179679 => 179680)


--- branches/safari-600.1.4.15-branch/Source/WebInspectorUI/UserInterface/Views/ObjectPropertiesSection.js	2015-02-05 08:19:19 UTC (rev 179679)
+++ branches/safari-600.1.4.15-branch/Source/WebInspectorUI/UserInterface/Views/ObjectPropertiesSection.js	2015-02-05 08:55:50 UTC (rev 179680)
@@ -23,11 +23,11 @@
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-WebInspector.ObjectPropertiesSection = function(object, title, subtitle, emptyPlaceholder, ignoreHasOwnProperty, extraProperties, treeElementConstructor)
+WebInspector.ObjectPropertiesSection = function(object, title, subtitle, emptyPlaceholder, getAllProperties, extraProperties, treeElementConstructor)
 {
     this.emptyPlaceholder = (emptyPlaceholder || WebInspector.UIString("No Properties"));
     this.object = object;
-    this.ignoreHasOwnProperty = ignoreHasOwnProperty;
+    this.getAllProperties = getAllProperties;
     this.extraProperties = extraProperties;
     this.treeElementConstructor = treeElementConstructor || WebInspector.ObjectPropertyTreeElement;
     this.editable = true;
@@ -50,10 +50,10 @@
                 return;
             self.updateProperties(properties);
         }
-        if (this.ignoreHasOwnProperty)
+        if (this.getAllProperties)
             this.object.getAllProperties(callback);
         else
-            this.object.getOwnProperties(callback);
+            this.object.getOwnAndGetterProperties(callback);
     },
 
     updateProperties: function(properties, rootTreeElementConstructor, rootPropertyComparer)
@@ -163,7 +163,11 @@
                 this.appendChild(new this.treeOutline.section.treeElementConstructor(properties[i]));
             }
         };
-        this.property.value.getOwnProperties(callback.bind(this));
+
+        if (this.property.name === "__proto__")
+            this.property.value.getOwnProperties(callback.bind(this));
+        else
+            this.property.value.getOwnAndGetterProperties(callback.bind(this));
     },
 
     ondblclick: function(event)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to