Closed Bug 433796 Opened 16 years ago Closed 11 years ago

JavaScript exception: component does not have a method named: "observe"' when calling method: [nsIObserver::observe]

Categories

(Firefox :: Search, defect)

defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: cbook, Unassigned)

References

Details

Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9) Gecko/2008051206 Firefox/3.0

Steps to reproduce
-> Search Bar
-> Manage Search Engine
-> Change the Search Engine Ordering (like ebay to the top, etc)
-> Check the Error Console
--> 
Error: [Exception... "'JavaScript component does not have a method named: "observe"' when calling method: [nsIObserver::observe]"  nsresult: "0x80570030 (NS_ERROR_XPC_JSOBJECT_HAS_NO_FUNCTION_NAMED)"  location: "JS frame :: file:///C:/Program%20Files/Mozilla%20Firefox/components/nsSearchService.js :: notifyAction :: line 648"  data: no]
Source File: file:///C:/Program%20Files/Mozilla%20Firefox/components/nsSearchService.js
Line: 648
This seems to worksforme, using:
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1a2pre) Gecko/20080819034536 Minefield/3.1a2pre
this throws a lot in browser-chrome tests.
see bug 481406 for more informations.
I don't see why this would be happening after a quick look through http://mxr.mozilla.org/mozilla-central/search?string=browser-search-engine-modified . All of the observer objects seem to be valid.
Oh, actually, I guess this could be caused by the search bar adding itself as an observer and then having its XBL binding destroyed without being removed (IIRC XBL destructors aren't always called). I suppose this could also be causing leaks...
These two seem to be related: bug # 83635 and bug # 230086.
Summary: JavaScript component does not have a method named: "observe"' when calling method: [nsIObserver::observe] → JavaScript exception: component does not have a method named: "observe"' when calling method: [nsIObserver::observe]
(In reply to comment #2)
> this throws a lot in browser-chrome tests.
> see bug 481406 for more informations.

http://tinderbox.mozilla.org/showlog.cgi?log=Firefox/1246882480.1246889689.29547.gz&fulltext=1
Linux mozilla-central unit test on 2009/07/06 05:14:40

(Bug still there.)
No longer blocks: 481406
Depends on: 481406
Flags: wanted-firefox3.6?
(In reply to comment #2)
> this throws a lot in browser-chrome tests.

mochitest-browser-chrome: (3 platforms)

Firefox 3.5:
no bug.

Firefox 3.6:
Multiple tests, like
{
TEST-INFO | chrome://mochikit/content/browser/browser/base/content/test/browser_overflowScroll.js | Console message: [JavaScript Error: "[Exception... "'JavaScript component does not have a method named: "observe"' when calling method: [nsIObserver::observe]"  nsresult: "0x80570030 (NS_ERROR_XPC_JSOBJECT_HAS_NO_FUNCTION_NAMED)"  location: "JS frame :: file:///builds/moz2_slave/mozilla-central-linux-unittest-everythingelse/build/firefox/components/nsSearchService.js :: notifyAction :: line 664"  data: no]" {file: "file:///builds/moz2_slave/mozilla-central-linux-unittest-everythingelse/build/firefox/components/nsSearchService.js" line: 664}]
}
NB: Some tests are not related to "Search".

SeaMonkey 2.0:
Various xpinstall tests, like
{
TEST-INFO | chrome://mochikit/content/browser/xpinstall/tests/browser_cookies.js | Console message: [JavaScript Error: "[Exception... "'JavaScript component does not have a method named: "observe"' when calling method: [nsIObserver::observe]"  nsresult: "0x80570030 (NS_ERROR_XPC_JSOBJECT_HAS_NO_FUNCTION_NAMED)"  location: "JS frame :: chrome://mochikit/content/browser/xpinstall/tests/browser_cookies.js :: test :: line 17"  data: no]" {file: "chrome://mochikit/content/browser/xpinstall/tests/browser_cookies.js" line: 17}]
}

SeaMonkey 2.1:
"Same" as SM 2.0 plus more xpinstall tests.

Can I morph this bug to Core, or should I file a separate meta bug.?.
OS: Windows XP → All
Hardware: x86 → All
Flags: wanted-firefox3.6?
I don't see this with the STR in comment 0, and it's also not in browser-chrome logs anymore AFAICT.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → WORKSFORME
I don't see this with the STR in comment 0, and it's also not in browser-chrome logs anymore AFAICT.
You need to log in before you can comment on or make changes to this bug.