Closed Bug 156756 Opened 22 years ago Closed 22 years ago

Crash in nsComposerCommandsUpdater::CallUpdateCommands

Categories

(Core Graveyard :: Embedding: APIs, defect)

defect
Not set
critical

Tracking

(Not tracked)

VERIFIED DUPLICATE of bug 174439

People

(Reporter: rogc, Assigned: mjudge)

References

Details

(Keywords: crash, topembed+)

Attachments

(1 file)

I'm embedding the editor in my app, and I found that if I created and destroyed the window that embeds the editor very quickly, I'd get a NULL pointer dereference on line 264 of nsComposerCommandsUpdater.cpp. I've got a patch that fixes the problem that I'm going to check into the branch I'm using. I'll attach the patch to this bug as well.
I checked this patch which fixes the problem onto my branch (ROGC_20020430_BRANCH)
Severity: normal → critical
Keywords: crash
thanks for the patch! -->mjudge
Assignee: syd → mjudge
Component: Editor: Composer → Embedding: APIs
Keywords: patch
OS: Windows 2000 → All
Hardware: PC → All
Blocks: edembed
Comment on attachment 90831 [details] [diff] [review] Patch to fix the bug r=brade Simon--please sr=
Attachment #90831 - Flags: review+
Comment on attachment 90831 [details] [diff] [review] Patch to fix the bug sr=sfraser
Attachment #90831 - Flags: superreview+
ok i am marking this invalid since we dont use scriptglobalobject on the embedder's side any more. This should not happen on the trunk now.
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → INVALID
reopen for clarification I don't understand what you are saying Mike but I think we still need to fix a bug in this code. I see this in nsComposerCommandsUpdater::CallUpdateCommands nsCOMPtr<nsIScriptGlobalObject> scriptGlobalObject; theDoc->GetScriptGlobalObject(getter_AddRefs(scriptGlobalObject)); nsCOMPtr<nsIDocShell> docShell; scriptGlobalObject->GetDocShell(getter_AddRefs(docShell)); mDocShell = docShell.get(); Are you saying that embedders can't call CallUpdateCommands? Regardless, shouldn't we still have the safety check for scriptGlobalOject possibly being null?
Status: RESOLVED → REOPENED
Resolution: INVALID → ---
Keywords: topembed+
The relevant code has changed in my patch to bug 174439. In that fix, I test for the global script object and save docShell as member variable of nsComposerCommandsUpdater in its constructor. So we don't need this fix. *** This bug has been marked as a duplicate of 174439 ***
Status: REOPENED → RESOLVED
Closed: 22 years ago22 years ago
Resolution: --- → DUPLICATE
verified.
Status: RESOLVED → VERIFIED
This patch is needed on Angelo's 1.2 branch.
Done, thanks for thinking of me ;-)
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: