Author Topic: Issue solved inside Flock  (Read 2193 times)

0 Members and 1 Guest are viewing this topic.

Offline polonus

  • Avast Überevangelist
  • Probably Bot
  • *****
  • Posts: 33900
  • malware fighter
Issue solved inside Flock
« on: December 26, 2006, 11:13:59 PM »
Hi Flock users,

There is another item that I had to solve now for Flock, that is when loading up a certain webpage I got a pop-up message for a Media Player error made somewhere in flock.exe. It forces the browser to close and have a restart. This was very frustrating for me. To get rid of this I add the following inside the plugins file:
---------------------------
Index: LegacyPlugin.cpp
===================================================================
RCS file: /cvsroot/mozilla/embedding/browser/activex/src/plugin/LegacyPlugin.cpp,v
retrieving revision 1.52
diff -p -u -3 -r1.52 LegacyPlugin.cpp
--- LegacyPlugin.cpp   18 Nov 2005 15:58:53 -0000   1.52
+++ LegacyPlugin.cpp   8 Jun 2006 17:51:14 -0000
@@ -459,18 +459,17 @@ WillHandleCLSID(const CLSID &clsid, Plug
     nsCOMPtr<nsIDispatchSupport> dispSupport = do_GetService(NS_IDISPATCH_SUPPORT_CONTRACTID);
     if (!dispSupport)
         return FALSE;
+    JSContext * cx = GetPluginsContext(pData);
+    if (!cx)
+        return FALSE;
     nsCID cid;
     memcpy(&cid, &clsid, sizeof(nsCID));
     PRBool isSafe = PR_FALSE;
     PRBool classExists = PR_FALSE;
-    JSContext * cx = GetPluginsContext(pData);
-    if (cx)
-    {
-        nsCOMPtr<nsIURI> uri;
-        MozAxPlugin::GetCurrentLocation(pData->pPluginInstance, getter_AddRefs(uri));
-        MozAxAutoPushJSContext autoContext(cx, uri);
-        dispSupport->IsClassSafeToHost(cx, cid, PR_TRUE, &classExists, &isSafe);
-    }
+    nsCOMPtr<nsIURI> uri;
+    MozAxPlugin::GetCurrentLocation(pData->pPluginInstance, getter_AddRefs(uri));
+    MozAxAutoPushJSContext autoContext(cx, uri);
+    dispSupport->IsClassSafeToHost(cx, cid, PR_TRUE, &classExists, &isSafe);
     if (classExists && !isSafe)
         return FALSE;
     return TRUE;
-----------------------------
The above should be pasted inside the plugins file named LegacyPlugin.cpp;
After I had done this no more problems, and the page loaded straight up, no more errors.
The hick-ups seems to come on systems that come without the fullfledged Ms Media Player on board (due to the EEC regulations), anyway this patch fixes it.
If you experience the same in FF the patch must work as well.

polonus

Cybersecurity is more of an attitude than anything else. Avast Evangelists.

Use NoScript, a limited user account and a virtual machine and be safe(r)!