From 68f1c50927c7b83e8e7d89fe18be2a9e0d2633d3 Mon Sep 17 00:00:00 2001 From: "brendan%mozilla.org" Date: Sat, 7 Oct 2006 03:50:08 +0000 Subject: [PATCH] Simple null defense in js_PCToLineNumber (355341, r=igor). --- js/src/jsscript.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/js/src/jsscript.c b/js/src/jsscript.c index fabf3e45b7e..0691e0d3197 100644 --- a/js/src/jsscript.c +++ b/js/src/jsscript.c @@ -1441,6 +1441,10 @@ js_PCToLineNumber(JSContext *cx, JSScript *script, jsbytecode *pc) jssrcnote *sn; JSSrcNoteType type; + /* Cope with JSStackFrame.pc value prior to entering js_Interpret. */ + if (!pc) + return 0; + /* * Special case: function definition needs no line number note because * the function's script contains its starting line number.