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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user