Closed Bug 780546 Opened 13 years ago Closed 13 years ago

Add simple test for opening named windows inside mozbrowser

Categories

(Core :: DOM: Core & HTML, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla17

People

(Reporter: justin.lebar+bug, Assigned: justin.lebar+bug)

References

Details

Attachments

(1 file)

I've had this test sitting around for a while, but it was failing intermittently for mysterious reasons. But I think when I fixed the other mozbrowser oranges, I fixed this one too. We should check it in. Patch in a moment.
Blocks: browser-api
Attached patch Patch, v1Splinter Review
Attachment #649168 - Flags: review?(mounir)
Assignee: nobody → justin.lebar+bug
Attachment #649168 - Flags: review?(mounir) → review+
Depends on: 773980
Depends on: 780761
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla17
Except Ed backed this out...
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
(In reply to Ed Morley [:edmorley] from comment #4) > Backed out for causing bug 780761 one push after this landed: > https://hg.mozilla.org/integration/mozilla-inbound/rev/2ecf7d9b7580 https://hg.mozilla.org/mozilla-central/rev/2ecf7d9b7580
Blocks: 780351
This looks like yet another race condition initializing the message manager during window.open.
I don't see how this can be happening. 1) We must be hitting nsFrameMessageManager::SendAsyncMessageInternal's check if (mAsyncCallback) { NS_ENSURE_TRUE(mCallbackData, NS_ERROR_NOT_INITIALIZED); 2) If we're running code in BrowserElementParent.js for an OOP frame, that means nsFrameLoader::ShowRemoteFrame has run and tickled the remote-browser-frame-shown observer: mRemoteBrowser->Show(size); mRemoteBrowserShown = true; EnsureMessageManager(); nsCOMPtr<nsIObserverService> os = services::GetObserverService(); if (OwnerIsBrowserFrame() && os && !mRemoteBrowserInitialized) { os->NotifyObservers(NS_ISUPPORTS_CAST(nsIFrameLoader*, this), "remote-browser-frame-shown", NULL); mRemoteBrowserInitialized = true; } 3) So EnsureMessageManager() has been called with mRemoteBrowserShown == true. 4) ... which gives us very few reasons why the message manager's callback data should be null: nsresult nsFrameLoader::EnsureMessageManager() { NS_ENSURE_STATE(mOwnerContent); nsresult rv = MaybeCreateDocShell(); if (NS_FAILED(rv)) { return rv; } if (!mIsTopLevelContent && !OwnerIsBrowserFrame() && !mRemoteFrame) { return NS_OK; } if (mMessageManager) { if (ShouldUseRemoteProcess()) { mMessageManager->SetCallbackData(mRemoteBrowserShown ? this : nullptr); } return NS_OK; } 5) ...unless this message manager is not the message manager which is failing? Smaug, any pointers here would be appreciated.
> Smaug, any pointers here would be appreciated. I think I have a handle on this now...
No longer depends on: 773980
No longer blocks: 780351
Status: REOPENED → RESOLVED
Closed: 13 years ago13 years ago
Resolution: --- → FIXED
Depends on: 819320
Component: DOM: Mozilla Extensions → DOM
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: