Bug 678988 - "potential null pointer dereference in js/jsd/jsd_scpt.c" [r=sphink]
authorAtul Aggarwal <atulagrwl>
Sun, 28 Aug 2011 07:48:00 -0700
changeset 76226 0cf9208a2bb55fb47c3c0eb0efe3783a8f51e198
parent 76225 a513e2816eaf5d55964ddd990c86c768da0ec520
child 76227 6eaa9655a1cf37f0a3ff614a2d3d744869edfca4
push id21087
push usermak77@bonardo.net
push dateWed, 31 Aug 2011 08:44:58 +0000
treeherdermozilla-central@c7e6f57e1732 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssphink
bugs678988
milestone9.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 678988 - "potential null pointer dereference in js/jsd/jsd_scpt.c" [r=sphink]
js/jsd/jsd_scpt.c
--- a/js/jsd/jsd_scpt.c
+++ b/js/jsd/jsd_scpt.c
@@ -525,18 +525,20 @@ jsd_GetScriptLineExtent(JSDContext* jsdc
 }
 
 jsuword
 jsd_GetClosestPC(JSDContext* jsdc, JSDScript* jsdscript, uintN line)
 {
     jsuword pc;
     JSCrossCompartmentCall *call;
 
+    if( !jsdscript )
+        return 0;
 #ifdef LIVEWIRE
-    if( jsdscript && jsdscript->lwscript )
+    if( jsdscript->lwscript )
     {
         uintN newline;
         jsdlw_RawToProcessedLineNumber(jsdc, jsdscript, line, &newline);
         if( line != newline )
             line = newline;
     }
 #endif