Bug 510040 - Fix JS debugger crash on 64-bit: don't truncate PC to jsuint in jsds_FilterHook. r=timeless
authorMarti Raudsepp <marti@juffo.org>
Wed, 12 Aug 2009 22:09:29 +0300
changeset 31602 ecf63fdc78b7e36b32bc9d9b6116b45f15b0180f
parent 31601 d9742d839d7dc373405da5c8ea0e0727ba089ad0
child 31603 38008241849da0747b928b3adc48b048daecd701
push idunknown
push userunknown
push dateunknown
reviewerstimeless
bugs510040
milestone1.9.3a1pre
Bug 510040 - Fix JS debugger crash on 64-bit: don't truncate PC to jsuint in jsds_FilterHook. r=timeless This caused Firefox to segfault in 64-bit builds when starting up with the Chromebug extension loaded.
js/jsd/jsd_xpc.cpp
--- a/js/jsd/jsd_xpc.cpp
+++ b/js/jsd/jsd_xpc.cpp
@@ -371,17 +371,17 @@ jsds_FilterHook (JSDContext *jsdc, JSDTh
         NS_WARNING("No frame in threadstate");
         return PR_FALSE;
     }
 
     JSDScript *script = JSD_GetScriptForStackFrame (jsdc, state, frame);
     if (!script)
         return PR_TRUE;
 
-    jsuint pc = JSD_GetPCForStackFrame (jsdc, state, frame);
+    jsuword pc = JSD_GetPCForStackFrame (jsdc, state, frame);
 
     nsDependentCString url(JSD_GetScriptFilename (jsdc, script));
     if (url.IsEmpty()) {
         NS_WARNING ("Script with no filename");
         return PR_FALSE;
     }
 
     if (!gFilters)