Closed
Bug 785134
Opened 12 years ago
Closed 12 years ago
Update jsb to fix various bugs
Categories
(DevTools :: General, defect)
DevTools
General
Tracking
(Not tracked)
RESOLVED
FIXED
Firefox 18
People
(Reporter: miker, Assigned: miker)
References
Details
Attachments
(1 file, 6 obsolete files)
104.60 KB,
patch
|
jwalker
:
review+
|
Details | Diff | Splinter Review |
There are a number of serious jsb bugs that have been fixed recently. We need to update and optimize it for fx.
Assignee | ||
Comment 1•12 years ago
|
||
Panos implied that he was waiting for this the other day.
Attachment #662186 -
Flags: review?(past)
Assignee | ||
Comment 2•12 years ago
|
||
Comment on attachment 662186 [details] [diff] [review] Updated jsb and worked around a btoa encoding issue Actually, Joe is probably better reviewing this.
Attachment #662186 -
Flags: review?(past) → review?(jwalker)
Comment 3•12 years ago
|
||
Comment on attachment 662186 [details] [diff] [review] Updated jsb and worked around a btoa encoding issue Review of attachment 662186 [details] [diff] [review]: ----------------------------------------------------------------- Did we change line endings on Jsbeautify.jsm? The diff seems to think that everything has changed. ::: browser/devtools/commandline/CmdJsb.jsm @@ +112,5 @@ > } catch(e) { > return gcli.lookup('jsbInvalidURL'); > } > > let promise = context.createPromise(); That's sooooo 2012. The NEW IMPROVED way is: var deferred = context.defer(); setTimeout(function() { deferred.resolve("hello"); }, 500); return deferred.promise; This is the more normal way to work with jetpack/Q style promises. The old way still works, but is deprecated. @@ +122,5 @@ > let browserWindow = browserDoc.defaultView; > + let gBrowser = browserWindow.gBrowser; > + let result = js_beautify(xhr.responseText, opts); > + > + // TODO: btoa currently only works with ISO-8859-1 Nit, since we're changing it for the above - I think we're supposed to use FIXME rather than TODO in moz code. ::: browser/locales/en-US/chrome/browser/devtools/gclicommands.properties @@ +811,5 @@ > > +# the 'jsb <doNotPreserveNewlines>' parameter. This string is designed to be > +# shown in a menu alongside the command name, which is why it should be as short > +# as possible. > +jsbDoNotPreserveNewlinesDesc=Do not preserve line breaks. Please could you remove the '.', here and in the other descriptions.
Attachment #662186 -
Flags: review?(jwalker) → review+
Assignee | ||
Comment 4•12 years ago
|
||
(In reply to Joe Walker [:jwalker] from comment #3) > ::: browser/devtools/commandline/CmdJsb.jsm > @@ +112,5 @@ > > } catch(e) { > > return gcli.lookup('jsbInvalidURL'); > > } > > > > let promise = context.createPromise(); > > That's sooooo 2012. The NEW IMPROVED way is: > > var deferred = context.defer(); > setTimeout(function() { > deferred.resolve("hello"); > }, 500); > return deferred.promise; > I have logged bug 792815 to update how we use promise across our commands.
Assignee | ||
Comment 5•12 years ago
|
||
(In reply to Joe Walker [:jwalker] from comment #3) > Comment on attachment 662186 [details] [diff] [review] > Updated jsb and worked around a btoa encoding issue > > Review of attachment 662186 [details] [diff] [review]: > ----------------------------------------------------------------- > > Did we change line endings on Jsbeautify.jsm? The diff seems to think that > everything has changed. > > ::: browser/devtools/commandline/CmdJsb.jsm > @@ +112,5 @@ > > } catch(e) { > > return gcli.lookup('jsbInvalidURL'); > > } > > > > let promise = context.createPromise(); > > That's sooooo 2012. The NEW IMPROVED way is: > > var deferred = context.defer(); > setTimeout(function() { > deferred.resolve("hello"); > }, 500); > return deferred.promise; > > This is the more normal way to work with jetpack/Q style promises. The old > way still works, but is deprecated. > This has been moved out into another bug. > @@ +122,5 @@ > > let browserWindow = browserDoc.defaultView; > > + let gBrowser = browserWindow.gBrowser; > > + let result = js_beautify(xhr.responseText, opts); > > + > > + // TODO: btoa currently only works with ISO-8859-1 > > Nit, since we're changing it for the above - I think we're supposed to use > FIXME rather than TODO in moz code. > Changed > ::: browser/locales/en-US/chrome/browser/devtools/gclicommands.properties > @@ +811,5 @@ > > > > +# the 'jsb <doNotPreserveNewlines>' parameter. This string is designed to be > > +# shown in a menu alongside the command name, which is why it should be as short > > +# as possible. > > +jsbDoNotPreserveNewlinesDesc=Do not preserve line breaks. > > Please could you remove the '.', here and in the other descriptions. Done
Attachment #662186 -
Attachment is obsolete: true
Assignee | ||
Updated•12 years ago
|
Whiteboard: [land-in-fx-team]
Comment 6•12 years ago
|
||
https://hg.mozilla.org/integration/fx-team/rev/48cfe823a5da
Whiteboard: [land-in-fx-team] → [fixed-in-fx-team]
Comment 7•12 years ago
|
||
Backed out: https://tbpl.mozilla.org/?tree=Fx-Team&rev=4b211b444e7f Oranges: https://tbpl.mozilla.org/?tree=Fx-Team&rev=48cfe823a5da
Whiteboard: [fixed-in-fx-team]
Assignee | ||
Comment 8•12 years ago
|
||
This is caused by Bug 213047. It is best for us to open the result in scratchpad anyway as we don't need to worry about character encoding or base 64 encoding issues.
Assignee | ||
Comment 9•12 years ago
|
||
Attachment #664044 -
Attachment is obsolete: true
Attachment #665910 -
Flags: review?(dcamp)
Assignee | ||
Updated•12 years ago
|
Attachment #665910 -
Flags: review?(dcamp) → review?(jwalker)
Comment 10•12 years ago
|
||
Comment on attachment 665910 [details] [diff] [review] Now outputs prettified source to scratchpad Review of attachment 665910 [details] [diff] [review]: ----------------------------------------------------------------- This is something of a 'while we're at it', but I think it's important ... ::: browser/locales/en-US/chrome/browser/devtools/gclicommands.properties @@ +847,2 @@ > # possible. > jsbBraceStyleDesc=Collapse, expand, end-expand, expand-strict The user can see the options from the menus, so I think we should be saying what this is for rather than listing the options. @@ +849,5 @@ > > # LOCALIZATION NOTE (jsbBraceStyleManual) A fuller description of the > # 'jsb <braceStyle>' parameter, displayed when the user asks for help > # on what it does. > jsbBraceStyleManual=The coding style of braces. Either collapse, expand, end-expand or expand-strict I think we really should describe the options here. We can use basic xhtml, so <br/> can be used to give examples. This is one place where help could be really useful.
Attachment #665910 -
Flags: review?(jwalker)
Assignee | ||
Comment 12•12 years ago
|
||
This pretty much does everything that we need in order to fix the copy paste issues. Green on try.
Attachment #665910 -
Attachment is obsolete: true
Attachment #666580 -
Flags: review?(dcamp)
Assignee | ||
Comment 13•12 years ago
|
||
Comment on attachment 666580 [details]
Addressed reviewers comments & fixed copy property
Wrong comments
Attachment #666580 -
Flags: review?(dcamp)
Assignee | ||
Comment 14•12 years ago
|
||
This works fine and is green on try. Due to the oversized panel that this creates we are pending bug 786803.
Attachment #666580 -
Attachment is obsolete: true
Attachment #666949 -
Flags: review?(jwalker)
Assignee | ||
Comment 15•12 years ago
|
||
Attachment #666949 -
Attachment is obsolete: true
Attachment #666949 -
Flags: review?(jwalker)
Attachment #666985 -
Flags: review?(jwalker)
Comment 16•12 years ago
|
||
Comment on attachment 666985 [details] [diff] [review] Added missing css Review of attachment 666985 [details] [diff] [review]: ----------------------------------------------------------------- ::: browser/themes/gnomestripe/devtools/commandline.css @@ +72,5 @@ > + font-size: 80%; > +} > + > +.gcli-row-out .nowrap { > + white-space: nowrap; I think this should probably be content CSS. What do you think? https://wiki.mozilla.org/DevTools/CSSTips#Content_or_Theme_CSS
Attachment #666985 -
Flags: review?(jwalker)
Assignee | ||
Comment 17•12 years ago
|
||
(In reply to Joe Walker [:jwalker] from comment #16) > Comment on attachment 666985 [details] [diff] [review] > Added missing css > > Review of attachment 666985 [details] [diff] [review]: > ----------------------------------------------------------------- > > ::: browser/themes/gnomestripe/devtools/commandline.css > @@ +72,5 @@ > > + font-size: 80%; > > +} > > + > > +.gcli-row-out .nowrap { > > + white-space: nowrap; > > I think this should probably be content CSS. > What do you think? > https://wiki.mozilla.org/DevTools/CSSTips#Content_or_Theme_CSS Of course it should ... done.
Attachment #666985 -
Attachment is obsolete: true
Attachment #667563 -
Flags: review?(jwalker)
Updated•12 years ago
|
Attachment #667563 -
Flags: review?(jwalker) → review+
Assignee | ||
Updated•12 years ago
|
Whiteboard: [land-in-fx-team]
Updated•12 years ago
|
Whiteboard: [land-in-fx-team] → [fixed-in-fx-team]
Comment 19•12 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/f3af7601c307
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 18
Comment 20•12 years ago
|
||
As usual, you can't change strings like this (jsbBraceStyleDesc, jsbBraceStyleManual) without changing the entity name. And to be honest, I don't think all that html in one string makes much sense jsbBraceStyleManual=<p class="nowrap">The coding style of braces. Select from one of the following:</p><ul><li>collapse<br/><pre>if (x == 1) {\n ...\n} else {\n ...\n}</pre></li><li>expand<br/><pre>if (x == 1)\n{\n ...\n}\nelse\n{\n ...\n}</pre></li><li>end-expand<br/><pre>if (x == 1) {\n ...\n}\nelse {\n ...\n}</pre></li><li>expand-strict<br/><pre>if (x == 1)\n{\n return // This option can break scripts\n {\n a: 1\n };\n} else {\n ...\n}</pre></li></ul> This landed late in the cycle, so this is already on aurora which is supposed to be string frozen.
Comment 21•12 years ago
|
||
(In reply to Francesco Lodolo [:flod] from comment #20) > As usual, you can't change strings like this (jsbBraceStyleDesc, > jsbBraceStyleManual) without changing the entity name. Yes. I think we should probably (fairly quickly) revert to the old string, and then fix it properly as a followup. What do you think Mike?
Assignee | ||
Comment 22•12 years ago
|
||
I do agree, we can probably find another way to do this?
Comment 23•12 years ago
|
||
I opened bug 799462 and bug 799463. Mike could you do bug 799462 fairly soon, and then bug 799463 as a lower priority (depending on how broken things look with the original strings?)
Updated•6 years ago
|
Product: Firefox → DevTools
You need to log in
before you can comment on or make changes to this bug.
Description
•