Closed
Bug 632347
Opened 13 years ago
Closed 13 years ago
Expanding a property in the Object Inspector whose type is Generator causes lockup
Categories
(DevTools :: General, defect)
DevTools
General
Tracking
(Not tracked)
VERIFIED
FIXED
People
(Reporter: rcampbell, Assigned: msucan)
References
()
Details
(Keywords: hang, Whiteboard: [console-1])
Attachments
(2 files, 3 obsolete files)
11.55 KB,
patch
|
Details | Diff | Splinter Review | |
1.22 KB,
patch
|
Details | Diff | Splinter Review |
In the web console, open an Object inspector that contains a Generator. Click the arrow to expand it, browser locks up, beachballs, etc.
Reporter | ||
Comment 1•13 years ago
|
||
see test case at the above URL
Assignee | ||
Comment 2•13 years ago
|
||
Proposed patch, with fixes for the autocomplete, eval result inspection and for the object inspector panel code. Included a mochitest which checks that the three parts of the Web Console do not fail with iterators and generators. I used the MDN docs to write down the main types of supported iters and gens. Feedback for improvements is welcome! Thanks!
Assignee: nobody → mihai.sucan
Status: NEW → ASSIGNED
Attachment #510760 -
Flags: feedback?(rcampbell)
Assignee | ||
Updated•13 years ago
|
Whiteboard: [patchclean:0208]
Version: unspecified → Trunk
Reporter | ||
Comment 3•13 years ago
|
||
Comment on attachment 510760 [details] [diff] [review] proposed patch + let str = aResult + ""; toString() ? f+=me!
Attachment #510760 -
Flags: feedback?(rcampbell) → feedback+
Assignee | ||
Comment 4•13 years ago
|
||
Updated the patch. Thanks for the feedback+ Rob! Asking for review from Shawn.
Attachment #510760 -
Attachment is obsolete: true
Attachment #511336 -
Flags: review?(sdwilsh)
Assignee | ||
Updated•13 years ago
|
Whiteboard: [patchclean:0208] → [patchclean:0210]
Comment 5•13 years ago
|
||
Comment on attachment 511336 [details] [diff] [review] updated patch >+++ b/toolkit/components/console/hudservice/HUDService.jsm >+ // Skip Iterators and Generators. >+ if (typeof obj == "object") { >+ if (typeof obj.__iterator__ == "function" || >+ obj.constructor && obj.constructor.name == "Iterator") { >+ return null; >+ } >+ >+ let str = obj.toString(); >+ if (typeof obj.next == "function" && >+ str.indexOf("[object Generator") == 0) { >+ return null; >+ } >+ } You do this code twice, which means you should pull it into a helper method (like isIteratorOrGenerator(aObject) perhaps) >+++ b/toolkit/components/console/hudservice/tests/browser/browser_webconsole_bug_632347_iterators_generators.js >@@ -0,0 +1,99 @@ >+/* >+ * Any copyright is dedicated to the Public Domain. >+ * http://creativecommons.org/publicdomain/zero/1.0/ >+ * >+ * Contributor(s): >+ * Mihai Èucan <mihai.sucan@gmail.com> >+ */ nit: just https://www.mozilla.org/MPL/boilerplate-1.1/pd-c r=sdwilsh
Attachment #511336 -
Flags: review?(sdwilsh) → review+
Assignee | ||
Comment 6•13 years ago
|
||
Thanks for the review+ Shawn! Updated the patch as requested.
Attachment #511336 -
Attachment is obsolete: true
Assignee | ||
Updated•13 years ago
|
Whiteboard: [patchclean:0210] → [patchclean:0309][checkin][future-release]
Updated•13 years ago
|
Whiteboard: [patchclean:0309][checkin][future-release] → [patchclean:0309][checkin][future-release][console-1]
Assignee | ||
Comment 7•13 years ago
|
||
Ready to land (mozilla-central, default branch, on top of bugs 619598 and 618311).
Attachment #518135 -
Attachment is obsolete: true
Assignee | ||
Updated•13 years ago
|
Whiteboard: [patchclean:0309][checkin][future-release][console-1] → [patchclean:0323][checkin][console-1]
Reporter | ||
Comment 8•13 years ago
|
||
Comment on attachment 521241 [details] [diff] [review] [in-devtools] rebased patch checked into devtools http://hg.mozilla.org/projects/devtools/rev/b224e897c616
Attachment #521241 -
Attachment description: rebased patch → [in-devtools] rebased patch
Reporter | ||
Updated•13 years ago
|
Whiteboard: [patchclean:0323][checkin][console-1] → [patchclean:0323][merge-moz-central][console-1]
Reporter | ||
Comment 9•13 years ago
|
||
http://tinderbox.mozilla.org/showlog.cgi?log=Devtools/1301077938.1301081696.7097.gz&fulltext=1 TEST-PASS | chrome://mochitests/content/browser/toolkit/components/console/hudservice/tests/browser/browser_webconsole_bug_632347_iterators_generators.js | iter2 is correctly displayed in the Property Panel TEST-UNEXPECTED-FAIL | chrome://mochitests/content/browser/toolkit/components/console/hudservice/tests/browser/browser_webconsole_bug_632347_iterators_generators.js | window.parent is correctly displayed in the Property Panel JavaScript strict warning: resource://gre/modules/NetworkPrioritizer.jsm, line 117: reference to undefined property aBrowser.webNavigation INFO TEST-END | chrome://mochitests/content/browser/toolkit/components/console/hudservice/tests/browser/browser_webconsole_bug_632347_iterators_generators.js | finished in 845ms TEST-INFO | checking window state
Reporter | ||
Comment 10•13 years ago
|
||
disabled test in devtools: http://hg.mozilla.org/projects/devtools/rev/c8e0ffa5b44b
Assignee | ||
Comment 11•13 years ago
|
||
This fixes the test in debug builds. Works for me. It applies cleanly in the devtools repo, default branch.
Reporter | ||
Updated•13 years ago
|
Whiteboard: [patchclean:0323][merge-moz-central][console-1] → [console-1][merge-m-c]
Reporter | ||
Comment 12•13 years ago
|
||
http://hg.mozilla.org/mozilla-central/rev/b224e897c616
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Whiteboard: [console-1][merge-m-c] → [console-1]
Comment 13•13 years ago
|
||
Verified on: Build identifier: Mozilla/5.0 (Windows NT 5.1; rv:2.2a1pre) Gecko/20110403 Firefox/4.2a1pre
Status: RESOLVED → VERIFIED
Updated•6 years ago
|
Product: Firefox → DevTools
You need to log in
before you can comment on or make changes to this bug.
Description
•