Last Comment Bug 700351 - Fix deep object inspection in the script debugger
: Fix deep object inspection in the script debugger
Status: RESOLVED FIXED
:
Product: Firefox
Classification: Client Software
Component: Developer Tools: Debugger (show other bugs)
: Trunk
: All All
: -- normal (vote)
: ---
Assigned To: Panos Astithas [:past]
:
Mentors:
Depends on: 694538 699419
Blocks: 697761
  Show dependency treegraph
 
Reported: 2011-11-07 10:00 PST by Panos Astithas [:past]
Modified: 2011-11-21 02:11 PST (History)
2 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
WIP (3.93 KB, patch)
2011-11-15 04:27 PST, Panos Astithas [:past]
no flags Details | Diff | Splinter Review
WIP fix (3.41 KB, patch)
2011-11-15 06:35 PST, Victor Porof [:vporof][:vp]
no flags Details | Diff | Splinter Review
Working patch (6.95 KB, patch)
2011-11-15 09:08 PST, Panos Astithas [:past]
no flags Details | Diff | Splinter Review
Working patch v2 (12.50 KB, patch)
2011-11-16 07:54 PST, Panos Astithas [:past]
no flags Details | Diff | Splinter Review
Working patch v3 (13.40 KB, patch)
2011-11-17 02:04 PST, Panos Astithas [:past]
dcamp: review+
Details | Diff | Splinter Review

Description Panos Astithas [:past] 2011-11-07 10:00:05 PST
The script debugger after bug 694538 allows the inspection of objects like 'this', __proto__, etc., albeit only one-level deep. After bug 699419 is done, object inspection should be fixed to work as expected.
Comment 1 Panos Astithas [:past] 2011-11-15 04:27:09 PST
Created attachment 574568 [details] [diff] [review]
WIP

This is my WIP. Running it on htmlpad.org/debugger I get the following error when I try to inspect the "this" object:

DBG-CLIENT: Error handling response: TypeError: aVar.addProperties is not a function - SF_addExpander([object Object],[object Proxy])@chrome://browser/content/debugger.js:263
([object Proxy])@chrome://browser/content/debugger.js:293
([object Proxy])@resource:///modules/dbg-client.jsm:736
DC_onPacket([object Proxy])@resource:///modules/dbg-client.jsm:370

Commenting out lines 294 and 299 should make the errors disappear, along with deep object inspection.
Comment 2 Victor Porof [:vporof][:vp] 2011-11-15 06:35:19 PST
Comment on attachment 574568 [details] [diff] [review]
WIP

Review of attachment 574568 [details] [diff] [review]:
-----------------------------------------------------------------

You were trying to call addProperties from a property descriptor.
Comment 3 Victor Porof [:vporof][:vp] 2011-11-15 06:35:56 PST
Created attachment 574588 [details] [diff] [review]
WIP fix
Comment 4 Panos Astithas [:past] 2011-11-15 09:08:21 PST
Created attachment 574604 [details] [diff] [review]
Working patch

Fixed the frame.arguments and __proto__ breakage, as well as a few more corer cases that I've hit: prototypes for wrapped natives and property grips having hasOwnProperty defined. It's just missing a few tests.
Comment 5 Panos Astithas [:past] 2011-11-16 07:54:32 PST
Created attachment 574895 [details] [diff] [review]
Working patch v2

Added tests for making sure expanding an object retrieves its properties, and made a couple of small changes requested in bug 694538 comment 5 and bug 695279 comment 7.
Comment 6 Panos Astithas [:past] 2011-11-17 02:04:20 PST
Created attachment 575123 [details] [diff] [review]
Working patch v3

Made another simplification requested in bug 694538 comment 8.

Note You need to log in before you can comment on or make changes to this bug.