Re: More defensive version of nsScriptablePeer::GetPlayState

Jari Korhonen <[email protected]> Wed, 10 Oct 2007 03:06:24 +0300
Newsgroups gmane.comp.mozilla.mplayerplug-in
Message-ID <[email protected]>
>Patch committed, but could you send me the actual website to test with?
>Since the page you included didn't work.

Sorry, it seems to have been removed. This is similar :

http://www.yle.fi/elavaarkisto/?s=s&g=6&ag=42&t=404&a=3392

Click on link "Sirkuspelle Hermanni" below picture to open video link.

Cheers,

Jari

Kevin DeKorte wrote:

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Jari Korhonen wrote:

Hello,

Included html file (clown_hermanni.htm) with link to Finnish
Broadcasting Co so-called "elävä arkisto" (living archive) seems to
rather reliably crash mplayerplug-in (daily build 5th Oct, 2007) in
function nsScriptablePeer::GetPlayState()

After some debugging, I found out that the it crashes because (for some
reason or other) variable mPlugin can be NULL when this function is called.

I changed function to be a little bit more defensive:

NS_IMETHODIMP nsScriptablePeer::GetPlayState(PRInt32 * aPlayState)
{
printf("JS playState issued\n");
assert (aPlayState != NULL);
//Apparently, mPlugin CAN be NULL here for some reason (external
bug ?).
//Try to avoid crash if so
if (mPlugin != NULL)
mPlugin->GetPlayState(aPlayState);
else
*aPlayState = JS_STATE_UNDEFINED;
return NS_OK;
}

with this change, "elävä arkisto" seems to work ok now.

Cheers,

Jari

Jari,

Patch committed, but could you send me the actual website to test with?
Since the page you included didn't work.

Kevin
- --
Get my public GnuPG key from
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x7D0BD5D1
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iD8DBQFHC/7F6w2kMH0L1dERAtw4AJ9fsYWJBxvYB3zJ7+hMKhrMrhFtuQCcCyUz
hLni6DwLFFGABOKxmnnVhMs=
=ceUx
-----END PGP SIGNATURE-----

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Mplayerplug-in-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mplayerplug-in-devel

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/

_______________________________________________
Mplayerplug-in-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mplayerplug-in-devel