Closed
Bug 828587
Opened 13 years ago
Closed 13 years ago
[Exception... "'JavaScript component does not have a method named: "alert"' when calling method: [nsIPromptService::alert]" nsresult: "0x80570030 (NS_ERROR_XPC_JSOBJECT_HAS_NO_FUNCTION_NAMED)" location: "JS frame :: chrome://messenger/content/FilterEdit
Categories
(Thunderbird :: Filters, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
Thunderbird 24.0
People
(Reporter: ishikawa, Assigned: aceman)
References
Details
Attachments
(4 files)
While testing thunderbird (debug build of comm-central source, but the
error should be visible in normal build also) by running
"make mozmill" locally, I noticed about occurrences NS_ERROR_* thrown and
not caught.
One of them is this bug.
Exception is not caught: NS_ERROR_XPC_JSOBJECT_HAS_NO_FUNCTION_NAMED
************************************************************
* Call to xpconnect wrapped JSObject produced this error: *
[Exception... "'JavaScript component does not have a method named: "alert"' when calling method: [nsIPromptService::alert]" nsresult: "0x80570030 (NS_ERROR_XPC_JSOBJECT_HAS_NO_FUNCTION_NAMED)" location: "JS frame :: chrome://messenger/content/FilterEditor.js :: saveFilter :: line 364" data: no]
************************************************************
version info of source files.
$ cd /home/ishikawa/TB-NEW/TB-3HG/new-src
$ hg identify
54a7a86bf250+ tip
$ cd mozilla || exit 1
$ pwd
/home/ishikawa/TB-NEW/TB-3HG/new-src/mozilla
$ hg identify
33064e13c3fd+ tip
Since the session log of a particular test target, "test_can_cancel_quit_on_filter_changes", is lengthy, I am attaching the log as an attachment.
TIA
| Reporter | ||
Comment 1•13 years ago
|
||
I noticed that there is an ASSERTION message toward the end of the session. (Not related to this bug.)
Just for the sake of completeness,
I ran fix-linux-stack.pl (In comm-central it is below mozilla/tools/rb/fix-linux-stack.pl) under the same directory where the tested TB binary is located,
e.g.
under /TB-NEW/TB-3HG/objdir-tb3/mozilla/dist/bin
../../../../new-src/mozilla/tools/rb/fix-linux-stack.pl ~/Dropbox/t-alert.txt > ~/Dropbox/t-alert-fixed-stack.txt
and attaching it.
Comment 2•13 years ago
|
||
(In reply to ISHIKAWA, chiaki from comment #0)
> While testing thunderbird (debug build of comm-central source, but the
> error should be visible in normal build also) by running
> "make mozmill" locally, I noticed about occurrences NS_ERROR_* thrown and
> not caught.
> One of them is this bug.
>
> Exception is not caught: NS_ERROR_XPC_JSOBJECT_HAS_NO_FUNCTION_NAMED
>
> ************************************************************
> * Call to xpconnect wrapped JSObject produced this error: *
> [Exception... "'JavaScript component does not have a method named: "alert"'
> when calling method: [nsIPromptService::alert]" nsresult: "0x80570030
> (NS_ERROR_XPC_JSOBJECT_HAS_NO_FUNCTION_NAMED)" location: "JS frame ::
> chrome://messenger/content/FilterEditor.js :: saveFilter :: line 364" data:
> no]
> ************************************************************
This error appears to be related to attempting to save a duplicate filter name. Is this the intention of the test? Perhaps mozmill replaces the prompt service to avoid blocking the UI.
Comment 3•13 years ago
|
||
There's a mock prompt service that's replacing nsIPromptService:
http://hg.mozilla.org/comm-central/annotate/8a07c456aaa6/mail/test/mozmill/shared-modules/test-prompt-helpers.js#l77
It doesn't have an alert() function, but probably should do. A good question first though, is to find out what it is trying to prompt about and see if that relates to the test at all (hint: add an alert function and dump the message passed to it).
| Reporter | ||
Comment 4•13 years ago
|
||
(In reply to Mark Banner (:standard8) from comment #3)
> A good question
> first though, is to find out what it is trying to prompt about and see if
> that relates to the test at all (hint: add an alert function and dump the
> message passed to it).
If someone can add this alert() function in the test-prompt-helpers.js function,
I would be happy to run the test with the resulting js file.
I searched for 'alert' using http://mxr.mozilla.org/comm-central/ident?i=alert&filter=
but I am not sure which function to emulate. (there are versions of alert() that take different number of arguments, even.)
TIA
I think the duplicate filter should not be created for the test to work.
I also think that the filter window tests from this file should be moved to a separate directory as they are quite hidden now in 'folder-widget'. And we plan to have more filter editor mozmill tests so they should be grouped logically.
Assignee: nobody → acelists
Status: NEW → ASSIGNED
Attachment #748522 -
Flags: review?(kent)
Attachment #748522 -
Flags: feedback?(ishikawa)
Comment 6•13 years ago
|
||
Comment on attachment 748522 [details] [diff] [review]
patch
I'm going to pass on the review of this. I'm afraid I do very little with mozmill tests, and I certainly am not qualified to review them. I suppose I should do more, but now is not the time.
Attachment #748522 -
Flags: review?(kent)
Comment on attachment 748522 [details] [diff] [review]
patch
Ok, no problem. I just wonder why the exception did not cause the test to fail. Instead it finished sucessfully.
Attachment #748522 -
Flags: review?(mconley)
| Reporter | ||
Comment 8•13 years ago
|
||
(In reply to :aceman from comment #5)
> Created attachment 748522 [details] [diff] [review]
> patch
>
> I think the duplicate filter should not be created for the test to work.
>
> I also think that the filter window tests from this file should be moved to
> a separate directory as they are quite hidden now in 'folder-widget'. And we
> plan to have more filter editor mozmill tests so they should be grouped
> logically.
:aceman, I am going to test the patch locally and report back the test result (whether the error occurs or not, etc.)
TIA
| Reporter | ||
Comment 9•13 years ago
|
||
Using the patch posted by :aceman, the particular problem disappeared. I am attaching the excerpt of the log.
DEBUG BUILD printed OTHER warnings and leaks, but I don't think they are related to the particular bug that was fixed.
TIA!
| Reporter | ||
Updated•13 years ago
|
Attachment #748522 -
Flags: feedback?(ishikawa) → feedback+
Comment 10•13 years ago
|
||
Comment on attachment 748522 [details] [diff] [review]
patch
Review of attachment 748522 [details] [diff] [review]:
-----------------------------------------------------------------
LGTM from inspection. Thanks aceman!
Attachment #748522 -
Flags: review?(mconley) → review+
Keywords: checkin-needed
Comment 11•13 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Flags: in-testsuite+
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 24.0
You need to log in
before you can comment on or make changes to this bug.
Description
•