Closed
Bug 819670
Opened 12 years ago
Closed 12 years ago
Web console object inspection does not handle native getters throwing very well
Categories
(DevTools :: Console, defect)
DevTools
Console
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: bzbarsky, Assigned: bzbarsky)
References
Details
Attachments
(2 files)
1.62 KB,
patch
|
msucan
:
review+
|
Details | Diff | Splinter Review |
4.58 KB,
patch
|
bzbarsky
:
review+
msucan
:
checkin+
|
Details | Diff | Splinter Review |
Steps to reproduce: 1) Open web console 2) Type "document.__proto__" 3) Click the resulting object to inspect it. EXPECTED RESULTS: Inspection window comes up ACTUAL RESULTS: No inspection window, and error console has: Timestamp: 12/8/12 10:50:11 AM Error: TypeError: Value does not implement interface Node. Source File: chrome://global/content/devtools/dbg-server.js Line: 641 Timestamp: 12/8/12 10:50:11 AM Error: TypeError: Value does not implement interface Node. Source File: chrome://global/content/devtools/dbg-server.js Line: 641 This is because the proto chain has getter properties that will throw when called on a non-instance object. Patch coming up to fix this.
Assignee | ||
Comment 1•12 years ago
|
||
Note that once bug 819624 lands this will be somewhat tested because there will be properties that throw on a chrome HTMLDocument (e.g. .domain).
Assignee | ||
Updated•12 years ago
|
Attachment #690101 -
Flags: review?(mihai.sucan)
Comment 2•12 years ago
|
||
Comment on attachment 690101 [details] [diff] [review] Make the console utils handle getters throwing by just reporting the property as having a getter, since the value can't be gotten. Thank you for the patch! We should have a test as well. I can add one next week, if you're busy.
Attachment #690101 -
Flags: review?(mihai.sucan) → review+
Assignee | ||
Comment 3•12 years ago
|
||
It's not so much being busy as having no idea how to add one. So if you're willing to, that would be great! Though note what I said in comment 1 about this being tested at least a bit by the existing tests once bug 819624 lands (which might admittedly not be too soon).
Comment 4•12 years ago
|
||
Added a test which checks if inspection fails for document.__proto__. Please let me know if this is sufficient. Thanks!
Attachment #690427 -
Flags: review?(bzbarsky)
Assignee | ||
Comment 5•12 years ago
|
||
Comment on attachment 690427 [details] [diff] [review] fix + test Assuming the test fails without the patch, r=me
Attachment #690427 -
Flags: review?(bzbarsky) → review+
Comment 6•12 years ago
|
||
(In reply to Boris Zbarsky (:bz) from comment #5) > Comment on attachment 690427 [details] [diff] [review] > fix + test > > Assuming the test fails without the patch, r=me It does. Thanks!
Comment 7•12 years ago
|
||
Comment on attachment 690427 [details] [diff] [review] fix + test Landed: https://hg.mozilla.org/integration/fx-team/rev/0101fe201aa4
Attachment #690427 -
Flags: checkin+
Updated•12 years ago
|
Status: NEW → ASSIGNED
OS: Mac OS X → All
Hardware: x86 → All
Whiteboard: [need review] → [fixed-in-fx-team]
Version: unspecified → Trunk
Updated•12 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Updated•6 years ago
|
Product: Firefox → DevTools
You need to log in
before you can comment on or make changes to this bug.
Description
•