[Webkit-unassigned] [Bug 27514] add support for watched expressions

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat Sep 5 00:44:47 PDT 2009


https://bugs.webkit.org/show_bug.cgi?id=27514





--- Comment #14 from Pavel Feldman <pfeldman at chromium.org>  2009-09-05 00:44:47 PDT ---
I looked at the code and I think I know what you should try. Inherit
WebInspector.WatchExpressionsSection from WebInspector.ObjectPropertiesSection.
In the inherited class, override update() method so that instead of the
original code:

var self = this;
var callback = function(properties) {
    if (!properties)
        return;
    self._update(properties);
};
InjectedScriptAccess.getProperties(this.object, this.ignoreHasOwnProperty,
callback);

you would do something like:

var properties = [];
for (all watch expressions) {
    properties.push(new WebInspector.ObjectPropertyProxy(watchExpression /*
name */, evalResultObjectProxy /* value */);
}
this.update(properties);

This way your section will get populated with exactly what you want. Instead of
property names you will have your watch expressions. They will be infinitely
expandable (allowing browsing their substructures). There are couple of things
to do before it works nice:

1. It will not work for primitive values until InspectorController::wrapObject
is changed to wrap them. I could not do it within 2 minutes since primitive
unconditional wrapping spoils autocomplete code. I'll see if I can complete it
before my flight today.

2. You should render evaluation exceptions manually.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list