Closed
Bug 1003848
Opened 10 years ago
Closed 10 years ago
Don't use sync messaging during BrowserElementChild initialization
Categories
(Core :: DOM: Core & HTML, defect, P3)
Tracking
()
People
(Reporter: smaug, Assigned: fabrice)
References
Details
(Keywords: perf, Whiteboard: [c= p= s= u=])
Attachments
(1 file, 4 obsolete files)
12.87 KB,
patch
|
smaug
:
review+
|
Details | Diff | Splinter Review |
http://mxr.mozilla.org/mozilla-central/source/dom/browser-element/BrowserElementChild.js?rev=9bf6ffacf4f6&mark=55-55#55 shows up in the profiles since it causes child process to just wait for parent. We could, I think, just send the name when creating the child.
Reporter | ||
Updated•10 years ago
|
Summary: Don't use sync messaging during BrowserElementChild initializationhttp://mxr.mozilla.org/mozilla-central/source/dom/browser-element/BrowserElementChild.js?rev=9bf6ffacf4f6&mark=55-55#55 → Don't use sync messaging during BrowserElementChild initialization
Assignee | ||
Comment 1•10 years ago
|
||
We need both fullscreenAllowed very early to let apps go fullscreen or not too.
Reporter | ||
Comment 2•10 years ago
|
||
We could just set name and fullscreenallowed when creating a mozbrowser. Parent would send that info during creation.
Reporter | ||
Comment 3•10 years ago
|
||
Hmm, we may run BrowserElementChild.js in the same process as *Parent
Reporter | ||
Comment 4•10 years ago
|
||
Boo, we have also the preload mechanism making this all more complicated.
Updated•10 years ago
|
Priority: -- → P3
Whiteboard: [c= p= s= u=]
Assignee | ||
Comment 6•10 years ago
|
||
It's mostly green on try (https://tbpl.mozilla.org/?tree=Try&rev=0b49b62a014d) but not fully yet...
Attachment #8507472 -
Flags: feedback?(bugs)
Reporter | ||
Comment 7•10 years ago
|
||
s/NS_LITERAL_STRING("")/EmptyString()/
Reporter | ||
Comment 8•10 years ago
|
||
Comment on attachment 8507472 [details] [diff] [review] no-sync-hello.patch Don't you need to have some special case for FakeShow
Attachment #8507472 -
Flags: feedback?(bugs)
Reporter | ||
Comment 9•10 years ago
|
||
But yes, the approach looks good to me.
Assignee | ||
Comment 10•10 years ago
|
||
Still one test failure (M5 emulator opt only :( ) where we get a visibilitychange event earlier than expected. https://tbpl.mozilla.org/?tree=Try&rev=4422f4aa98c4
Attachment #8507472 -
Attachment is obsolete: true
Updated•10 years ago
|
feature-b2g: --- → 2.2?
Assignee | ||
Comment 11•10 years ago
|
||
Rebased. Try run is at https://treeherder.mozilla.org/ui/#/jobs?repo=try&revision=dec35a628939 There are 2 real failures (Gip f2 and N2 in emulator opt) that are both related to visibilitychange issues. For the M2 failure (that I can't repro locally of course...) we get the visibilitychange event before the onload one in https://mxr.mozilla.org/mozilla-central/source/dom/browser-element/mochitest/file_browserElement_SetVisibleFrames_Inner.html?force=1 I'm not sure if that actually a bug or not. Olli, what do you think?
Reporter | ||
Comment 12•10 years ago
|
||
load event doesn't have anything to do with visibility so, so yes, visibilitychange may easily happen before load.
Flags: needinfo?(bugs)
Assignee | ||
Comment 13•10 years ago
|
||
Works fine, green run at https://treeherder.mozilla.org/ui/#/jobs?repo=try&revision=ec645029389c The test change is there to not expect anymore than we get onload before onvisibility change.
Attachment #8527032 -
Attachment is obsolete: true
Attachment #8529463 -
Flags: review?(bugs)
Reporter | ||
Comment 14•10 years ago
|
||
Comment on attachment 8529463 [details] [diff] [review] patch v4 >+ mDocShell->SetFullscreenAllowed( >+ mOwnerContent->HasAttr(kNameSpaceID_None, nsGkAtoms::allowfullscreen) || >+ mOwnerContent->HasAttr(kNameSpaceID_None, nsGkAtoms::mozallowfullscreen)); >+ bool isPrivate = mOwnerContent->HasAttr(kNameSpaceID_None, nsGkAtoms::mozprivatebrowsing); >+ if (isPrivate) { >+ bool nonBlank; >+ mDocShell->GetHasLoadedNonBlankURI(&nonBlank); >+ if (nonBlank) { >+ printf_stderr("We should not switch to Private Browsing after loading a document.\n"); this is a bit odd. Report to console? >- else { >+ /*else { > // Pass the message up to our parent. > alert(e.detail.message); >- } >+ }*/ I don't understand this. Please explain. And either remove the code, or remove /* and */ >+struct ShowInfo >+{ >+ nsString name; >+ bool fullscreenAllowed; >+ bool isPrivate; a ctor would be good here. It would initialize both bool variables to false. >+ ShowInfo info(EmptyString(), true, false); and then you could just have ShowInfo info; here. (I don't understand why you have true for fullscreenAllowed here. Looks wrong)
Attachment #8529463 -
Flags: review?(bugs) → review-
Assignee | ||
Comment 15•10 years ago
|
||
(In reply to Olli Pettay [:smaug] from comment #14) > Comment on attachment 8529463 [details] [diff] [review] > >+ if (nonBlank) { > >+ printf_stderr("We should not switch to Private Browsing after loading a document.\n"); > this is a bit odd. > Report to console? Done, using nsContentUtils::ReportToConsoleNonLocalized() > >- else { > >+ /*else { > > // Pass the message up to our parent. > > alert(e.detail.message); > >- } > >+ }*/ > > I don't understand this. Please explain. > And either remove the code, or remove /* and */ This is to fix the issue explained in comment 11 : we get a visibility change event before onload on emulator, and that makes the test fail because we relay an unexpected event. > >+struct ShowInfo > >+{ > >+ nsString name; > >+ bool fullscreenAllowed; > >+ bool isPrivate; > > a ctor would be good here. > It would initialize both bool variables to false. This is a ipdl struct, which is codegene'd. I didn't find a way to add a constructor by annotating the ipdl. Let me know if there's a way! > (I don't understand why you have true for fullscreenAllowed here. Looks > wrong) Fixed, and I verified with fullscreen apps that everything works properly.
Attachment #8529463 -
Attachment is obsolete: true
Attachment #8530472 -
Flags: review?(bugs)
Reporter | ||
Comment 16•10 years ago
|
||
Comment on attachment 8530472 [details] [diff] [review] patch v5 >+TabChild::ApplyShowInfo(const ShowInfo& info) aInfo ditto elsewhere for params.
Attachment #8530472 -
Flags: review?(bugs) → review+
Assignee | ||
Comment 17•10 years ago
|
||
https://hg.mozilla.org/integration/b2g-inbound/rev/fb224386bea8
Comment 18•10 years ago
|
||
sorry backed out for bustage like https://treeherder.mozilla.org/ui/logviewer.html#?job_id=941014&repo=b2g-inbound
Flags: needinfo?(fabrice)
Assignee | ||
Comment 19•10 years ago
|
||
https://hg.mozilla.org/integration/b2g-inbound/rev/6e90fd9bf6e2
Assignee | ||
Updated•10 years ago
|
Flags: needinfo?(fabrice)
Comment 20•10 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/6e90fd9bf6e2
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla37
Updated•10 years ago
|
feature-b2g: 2.2? → 2.2+
Updated•5 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•