check for null context before clearing JS watchpoints. bug 49615. patch from afranke@ags.uni-sb.de. r=brendan, me a=brendan

git-svn-id: svn://10.0.0.236/trunk@77726 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
danm%netscape.com
2000-08-31 03:10:52 +00:00
parent 47f8253c72
commit 84b08eede7

View File

@@ -262,8 +262,9 @@ NS_IMETHODIMP GlobalWindowImpl::SetNewDocument(nsIDOMDocument* aDocument)
// when those sub-window objects are finalized, after JS_ClearScope and
// a GC run that finds them to be garbage.
::JS_ClearWatchPointsForObject((JSContext *) mContext->GetNativeContext(),
(JSObject *) mScriptObject);
if (mContext && mScriptObject)
::JS_ClearWatchPointsForObject((JSContext *) mContext->GetNativeContext(),
(JSObject *) mScriptObject);
if (mFirstDocumentLoad) {
mFirstDocumentLoad = PR_FALSE;