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)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla17
People
(Reporter: justin.lebar+bug, Assigned: justin.lebar+bug)
References
Details
Attachments
(1 file)
6.46 KB,
patch
|
mounir
:
review+
|
Details | Diff | Splinter Review |
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.
Assignee | ||
Updated•13 years ago
|
Blocks: browser-api
Assignee | ||
Comment 1•13 years ago
|
||
Attachment #649168 -
Flags: review?(mounir)
Assignee | ||
Updated•13 years ago
|
Assignee: nobody → justin.lebar+bug
Assignee | ||
Comment 2•13 years ago
|
||
Updated•13 years ago
|
Attachment #649168 -
Flags: review?(mounir) → review+
Assignee | ||
Comment 3•13 years ago
|
||
Comment 4•13 years ago
|
||
Backed out for causing bug 780761 one push after this landed:
https://hg.mozilla.org/integration/mozilla-inbound/rev/2ecf7d9b7580
Comment 5•13 years ago
|
||
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla17
Assignee | ||
Comment 6•13 years ago
|
||
Except Ed backed this out...
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Comment 7•13 years ago
|
||
(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
Assignee | ||
Comment 8•13 years ago
|
||
This looks like yet another race condition initializing the message manager during window.open.
Assignee | ||
Comment 9•13 years ago
|
||
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.
Assignee | ||
Comment 10•13 years ago
|
||
> Smaug, any pointers here would be appreciated.
I think I have a handle on this now...
Comment 11•13 years ago
|
||
Status: REOPENED → RESOLVED
Closed: 13 years ago → 13 years ago
Resolution: --- → FIXED
Updated•13 years ago
|
Component: DOM: Mozilla Extensions → DOM
Updated•7 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•