superreview denied: [Bug 253405] Warning for document.all doesn't list source file or line number : [Attachment 155287] get the source file and line number

Brendan Eich <brendan@mozilla.org> has denied Boris Zbarsky
<bzbarsky@mit.edu>'s request for superreview:
Bug 253405: Warning for document.all doesn't list source file or line number
http://bugzilla.mozilla.org/show_bug.cgi?id=253405

Attachment 155287: get the source file and line number
http://bugzilla.mozilla.org/attachment.cgi?id=155287&action=edit

------- Additional Comments from Brendan Eich <brendan@mozilla.org>
>-static void
>-PrintDocumentAllWarningOnConsole()
>+static nsresult
>+PrintDocumentAllWarningOnConsole(JSContext *cx)
> {
>+  nsresult rv;
>   nsCOMPtr<nsIStringBundleService>
>-    stringService(do_GetService(NS_STRINGBUNDLE_CONTRACTID));
>-  if (!stringService) {
>-    return;
>-  }

jst wrote this to return void, and the caller ignores the new nsresult rv
you've added.  Don't waste cycles fussing about failure codes if they're
ignored (as they should be).  Please revert all this, and so on below.

>+  JSStackFrame *fp, *iterator = nsnull;
>+  fp = JS_FrameIterator(cx, &iterator);

Nit, and below: most of the DOM code uses ::JS_* to call the global (C) JS API.
 Do likewise here for "when in Rome" style coherence?

>+	if (filename)
>+	  CopyUTF8toUTF16(nsDependentCString(filename), sourcefile);

Is the filename argument passed into the JS API from DOM code
(dom/src/base/nsJSEnvironment.cpp at least) always UTF-8?  It's const char *,
so it could be something else.	Worth a look to be sure (my memory fails me,
and things may have changed since I last looked).

>+	jsbytecode* pc = JS_GetFramePC(cx, fp);
>+	if (pc) {
>+	  lineno = JS_PCToLineNumber(cx, script, pc);
>+	}
>+    }
>   }
>+  rv = errorObject->Init(msg.get(),
>+			   sourcefile.get(), /* file name */
>+			   EmptyString().get(), /* source line */
>+			   lineno, /* line number */
>+			   0, /* column number */
>+			   nsIScriptError::warningFlag,
>+			   "DOM:HTML");

Why all the ragged C comments?	How about at least column-aligning // comments,
if we must have comments here (some of these are vacuous).

Thanks for undertaking to fix this, it will help developers (although it fires
only once per doc).

/be
0
bugzilla
8/5/2004 5:51:01 PM
netscape.mozilla.reviewers 29156 articles. 0 followers. Follow

0 Replies
997 Views

Similar Articles

[PageSpeed] 38
Get it on Google Play
Get it on Apple App Store

Reply:

Similar Artilces:

superreview requested: [Bug 253405] Warning for document.all doesn't list source file or line number : [Attachment 155287] get the source file and line number
timeless@myrealbox.com (working) <timeless@bemail.org> has asked Boris Zbarsky <bzbarsky@mit.edu> for superreview: Bug 253405: Warning for document.all doesn't list source file or line number http://bugzilla.mozilla.org/show_bug.cgi?id=253405 Attachment 155287: get the source file and line number http://bugzilla.mozilla.org/attachment.cgi?id=155287&action=edit ...

superreview requested: [Bug 253405] Warning for document.all doesn't list source file or line number : [Attachment 155287] get the source file and line number #2
Boris Zbarsky <bzbarsky@mit.edu> has asked Brendan Eich <brendan@mozilla.org> for superreview: Bug 253405: Warning for document.all doesn't list source file or line number http://bugzilla.mozilla.org/show_bug.cgi?id=253405 Attachment 155287: get the source file and line number http://bugzilla.mozilla.org/attachment.cgi?id=155287&action=edit ------- Additional Comments from Boris Zbarsky <bzbarsky@mit.edu> Brendan would be a much more reasonable sr for this than I (especially given that note on reviewers.html). ...

superreview cancelled: [Bug 253405] Warning for document.all doesn't list source file or line number : [Attachment 155876] dom style'd
timeless@myrealbox.com (working) <timeless@bemail.org> has cancelled timeless@myrealbox.com (working) <timeless@bemail.org>'s request for superreview: Bug 253405: Warning for document.all doesn't list source file or line number http://bugzilla.mozilla.org/show_bug.cgi?id=253405 Attachment 155876: dom style'd http://bugzilla.mozilla.org/attachment.cgi?id=155876&action=edit ...

superreview requested: [Bug 253405] Warning for document.all doesn't list source file or line number : [Attachment 155876] dom style'd
timeless@myrealbox.com (working) <timeless@bemail.org> has asked Brendan Eich <brendan@mozilla.org> for superreview: Bug 253405: Warning for document.all doesn't list source file or line number http://bugzilla.mozilla.org/show_bug.cgi?id=253405 Attachment 155876: dom style'd http://bugzilla.mozilla.org/attachment.cgi?id=155876&action=edit ...

superreview granted: [Bug 253405] Warning for document.all doesn't list source file or line number : [Attachment 156402] scriptError, K&R, commented 0, succeeded
Brendan Eich <brendan@mozilla.org> has granted timeless@myrealbox.com (working) <timeless@bemail.org>'s request for superreview: Bug 253405: Warning for document.all doesn't list source file or line number http://bugzilla.mozilla.org/show_bug.cgi?id=253405 Attachment 156402: scriptError, K&R, commented 0, succeeded http://bugzilla.mozilla.org/attachment.cgi?id=156402&action=edit ------- Additional Comments from Brendan Eich <brendan@mozilla.org> Sure -- how about that patch to the console service to avoid printing the column when zero is passed? Th...

superreview requested: [Bug 253405] Warning for document.all doesn't list source file or line number : [Attachment 156402] scriptError, K&R, commented 0, succeeded
timeless@myrealbox.com (working) <timeless@bemail.org> has asked Brendan Eich <brendan@mozilla.org> for superreview: Bug 253405: Warning for document.all doesn't list source file or line number http://bugzilla.mozilla.org/show_bug.cgi?id=253405 Attachment 156402: scriptError, K&R, commented 0, succeeded http://bugzilla.mozilla.org/attachment.cgi?id=156402&action=edit ...

superreview denied: [Bug 252733] ###!!! ASSERTION: Potential deadlock between Monitor@12f0a8 and Monitor@0: 'Error', file r:/mozilla/xpcom/threads/nsAutoLock.cpp, line 299 : [Attachment 158259] don't
Brendan Eich <brendan@mozilla.org> has denied timeless@myrealbox.com (working) <timeless@bemail.org>'s request for superreview: Bug 252733: ###!!! ASSERTION: Potential deadlock between Monitor@12f0a8 and Monitor@0: 'Error', file r:/mozilla/xpcom/threads/nsAutoLock.cpp, line 299 http://bugzilla.mozilla.org/show_bug.cgi?id=252733 Attachment 158259: don't record null locks/monitors http://bugzilla.mozilla.org/attachment.cgi?id=158259&action=edit ------- Additional Comments from Brendan Eich <brendan@mozilla.org> Hide and Show need to do nothing if...

superreview requested: [Bug 217903] ###!!! ASSERTION: prev sibling not in line list: 'Not Reached', file i:/build/mozilla/layout/html/base/src/nsBlockFrame.cpp, line 4679 : [Attachment 194408] Patch
Mats Palmgren <mats.palmgren@bredband.net> has asked Boris Zbarsky <bzbarsky@mit.edu> for superreview: Bug 217903: ###!!! ASSERTION: prev sibling not in line list: 'Not Reached', file i:/build/mozilla/layout/html/base/src/nsBlockFrame.cpp, line 4679 https://bugzilla.mozilla.org/show_bug.cgi?id=217903 Attachment 194408: Patch rev. 1 https://bugzilla.mozilla.org/attachment.cgi?id=194408&action=edit ------- Additional Comments from Mats Palmgren <mats.palmgren@bredband.net> This fixes the stack that I have, which is the same as the one in comment 1. The ...

superreview granted: [Bug 217903] ###!!! ASSERTION: prev sibling not in line list: 'Not Reached', file i:/build/mozilla/layout/html/base/src/nsBlockFrame.cpp, line 4679 : [Attachment 194408] Patch re
Boris Zbarsky <bzbarsky@mit.edu> has granted Mats Palmgren <mats.palmgren@bredband.net>'s request for superreview: Bug 217903: ###!!! ASSERTION: prev sibling not in line list: 'Not Reached', file i:/build/mozilla/layout/html/base/src/nsBlockFrame.cpp, line 4679 https://bugzilla.mozilla.org/show_bug.cgi?id=217903 Attachment 194408: Patch rev. 1 https://bugzilla.mozilla.org/attachment.cgi?id=194408&action=edit ------- Additional Comments from Boris Zbarsky <bzbarsky@mit.edu> r+sr=bzbarsky; sorry about this. :( We need this on the 1.8 branch too. ...

superreview granted: [Bug 341436] ###!!! ASSERTION: URI is empty: '!aURI.IsEmpty()', file c:/mozilla.org/baseline/mozilla/rdf/base/src/nsRDFService.cpp, line 978 : [Attachment 225493] Don't pass null
neil@parkwaycc.co.uk <neil@httl.net> has granted Alex Vincent <ajvincent@gmail.com>'s request for superreview: Bug 341436: ###!!! ASSERTION: URI is empty: '!aURI.IsEmpty()', file c:/mozilla.org/baseline/mozilla/rdf/base/src/nsRDFService.cpp, line 978 https://bugzilla.mozilla.org/show_bug.cgi?id=341436 Attachment 225493: Don't pass null in. https://bugzilla.mozilla.org/attachment.cgi?id=225493&action=edit ------- Additional Comments from neil@parkwaycc.co.uk <neil@httl.net> Nit: adding a blank line after the return would make the code look nicer...

superreview requested: [Bug 341436] ###!!! ASSERTION: URI is empty: '!aURI.IsEmpty()', file c:/mozilla.org/baseline/mozilla/rdf/base/src/nsRDFService.cpp, line 978 : [Attachment 225493] Don't pass nu
Alex Vincent <ajvincent@gmail.com> has asked neil@parkwaycc.co.uk <neil@httl.net> for superreview: Bug 341436: ###!!! ASSERTION: URI is empty: '!aURI.IsEmpty()', file c:/mozilla.org/baseline/mozilla/rdf/base/src/nsRDFService.cpp, line 978 https://bugzilla.mozilla.org/show_bug.cgi?id=341436 Attachment 225493: Don't pass null in. https://bugzilla.mozilla.org/attachment.cgi?id=225493&action=edit ...

superreview requested: [Bug 52116] javascript strict warning/error doesn't always contain Source File filename : [Attachment 153459] stop lying
timeless@myrealbox.com (working) <timeless@bemail.org> has asked Boris Zbarsky <bzbarsky@mit.edu> for superreview: Bug 52116: javascript strict warning/error doesn't always contain Source File filename http://bugzilla.mozilla.org/show_bug.cgi?id=52116 Attachment 153459: stop lying http://bugzilla.mozilla.org/attachment.cgi?id=153459&action=edit ...

superreview granted: [Bug 52116] javascript strict warning/error doesn't always contain Source File filename : [Attachment 153459] stop lying
Boris Zbarsky <bzbarsky@mit.edu> has granted timeless@myrealbox.com (working) <timeless@bemail.org>'s request for superreview: Bug 52116: javascript strict warning/error doesn't always contain Source File filename http://bugzilla.mozilla.org/show_bug.cgi?id=52116 Attachment 153459: stop lying http://bugzilla.mozilla.org/attachment.cgi?id=153459&action=edit ------- Additional Comments from Boris Zbarsky <bzbarsky@mit.edu> >Index: nsEventListenerManager.cpp >+ if (win) { >+ nsCOMPtr<nsIDOMDocument> domdoc; >+ win->GetDocument(g...

superreview granted: [Bug 52116] javascript strict warning/error doesn't always contain Source File filename : [Attachment 153459] stop lying #2
neil@parkwaycc.co.uk <neil.parkwaycc.co.uk@myrealbox.com> has granted Boris Zbarsky <bzbarsky@mit.edu>'s request for superreview: Bug 52116: javascript strict warning/error doesn't always contain Source File filename http://bugzilla.mozilla.org/show_bug.cgi?id=52116 Attachment 153459: stop lying http://bugzilla.mozilla.org/attachment.cgi?id=153459&action=edit ------- Additional Comments from neil@parkwaycc.co.uk <neil.parkwaycc.co.uk@myrealbox.com> >- doc = do_QueryInterface(aObject); >- > nsCOMPtr<nsIScriptGlobalObject> global...

Web resources about - superreview denied: [Bug 253405] Warning for document.all doesn't list source file or line number : [Attachment 155287] get the source file and line number - netscape.mozilla.reviewers

Biz & Finance Magazines
Australian magazine subscriptions price comparison.

Ehsan Akhgari
Bugzilla is an essential tool to the working process of Mozilla, and many of us spend a good portion of their day in Bugzilla. The Bugzilla Tweaks ...

Resources last updated: 11/26/2015 12:52:06 PM