Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Help on Bug 1046166 - [e10s] userContent.css does not work

83 views
Skip to first unread message

Ronan Jouchet

unread,
Aug 20, 2015, 9:05:33 PM8/20/15
to dev-tech-e...@lists.mozilla.org
Hi e10s devs.

I'm trying to take a stab at bug 1046166
<https://bugzilla.mozilla.org/show_bug.cgi?id=1046166>. I'm following
dbaron's suggestion to peek at nsLayoutStylesheetCache::InitFromProfile
<https://hg.mozilla.org/mozilla-central/file/0876695d1abd/layout/style/nsLayoutStylesheetCache.cpp#l397>,
here is where I am:

1. I have a breakpoint there at line 424, where in both e10s and
non-e10s the `contentFile` structure looks reasonable, with a
`mCachedStat` member looking good (e.g. good file size), so it's not
all broken here.
2. Then later on in LoadSheet
<https://dxr.mozilla.org/mozilla-central/source/layout/style/nsLayoutStylesheetCache.cpp#485>,
the call to LoadSheetSync
<https://dxr.mozilla.org/mozilla-central/source/layout/style/Loader.cpp#2256>
seems fine too and returns NS_OK, initialization seems okay...
3. ... and running with NSPR_LOG_MODULES="nsCSSLoader:5", the logs for
userContent.css seem to be all green, as for other internal
stylesheets (counterstyles.css, full-screen-override.css, ...):
> -134531264[7ffff6b9b5c0]: css::Loader::LoadSheetSync
> -134531264[7ffff6b9b5c0]: Non-document sheet uri:
> 'file:///home/ronj/.mozilla/firefox/dev/chrome/userContent.css'
> -134531264[7ffff6b9b5c0]: css::Loader::CheckLoadAllowed
> -134531264[7ffff6b9b5c0]: css::Loader::CreateSheet
> -134531264[7ffff6b9b5c0]: From completed: 0
> -134531264[7ffff6b9b5c0]: State: eSheetNeedsParser
> -134531264[7ffff6b9b5c0]: css::Loader::LoadSheet
> <https://dxr.mozilla.org/mozilla-central/source/layout/style/Loader.cpp#1416>
> -134531264[7ffff6b9b5c0]: Load from:
> 'file:///home/ronj/.mozilla/firefox/dev/chrome/userContent.css'
> -134531264[7ffff6b9b5c0]: Synchronous load
> <https://dxr.mozilla.org/mozilla-central/source/layout/style/Loader.cpp#1455>
> -134531264[7ffff6b9b5c0]: SheetLoadData::OnDetermineCharset for
> 'file:///home/ronj/.mozilla/firefox/dev/chrome/userContent.css'
> -134531264[7ffff6b9b5c0]: Setting from HTTP to: UTF-8
> -134531264[7ffff6b9b5c0]: SheetLoadData::OnStreamComplete
> -134531264[7ffff6b9b5c0]: css::Loader::ParseSheet
> -134531264[7ffff6b9b5c0]: No pending kids from parse
> -134531264[7ffff6b9b5c0]: css::Loader::SheetComplete
> <https://dxr.mozilla.org/mozilla-central/source/layout/style/Loader.cpp#1782>
> -134531264[7ffff6b9b5c0]: css::Loader::DoSheetComplete
> <https://dxr.mozilla.org/mozilla-central/source/layout/style/Loader.cpp#1825>
> -134531264[7ffff6b9b5c0]: Load completed, status: 0x0
> -134531264[7ffff6b9b5c0]: Finished loading:
> 'file:///home/ronj/.mozilla/firefox/dev/chrome/userContent.css'

To my newbie eyes, it looks like /initialization/ is doing well (yes?
no?), and I'd like to investigate if something could be wrong when
/opening pages/. But then I have no idea where to go ^^; I'm new to
Firefox development and would love some mentoring. Am I on the right
track? (I'm not even sure I'm having a look at "the content process" as
says dbaron). Any other suggestion very welcome!

Thanks!

Ronan

Blake Kaplan

unread,
Aug 26, 2015, 5:20:45 PM8/26/15
to mozilla-dev-te...@lists.mozilla.org
Ronan Jouchet <ro...@jouchet.fr> wrote:
> 1. I have a breakpoint there at line 424, where in both e10s and
> non-e10s the `contentFile` structure looks reasonable, with a
> `mCachedStat` member looking good (e.g. good file size), so it's not
> all broken here.

Hi Ronan,

I'm a little suspicious of this, we really shouldn't be able to access the
profile directory from the content process. When you say that you have a
breakpoint at the location, can you specify how you're creating your
breakpoint? My first guess is that you're actually in the parent process,
where things will continue to work as they always have. In order to create
your breakpoint, you should probably try something like running firefox as:

MOZ_DEBUG_CHILD_PROCESS=1 ./path/to/firefox -profile /some/profile -no-remote

and then, when you see a debug print like

CHILDCHILDCHILDCHILD
debug me @ 4835

attach gdb to the PID after the @ (you have 30 seconds before the child
process will start running) and set your breakpoint there.

> To my newbie eyes, it looks like /initialization/ is doing well (yes?
> no?), and I'd like to investigate if something could be wrong when
> /opening pages/. But then I have no idea where to go ^^; I'm new to

Your observations appear to be correct. My guess is that you're just mistaking
one process for the other (an easy mistake) and when you're properly in the
content process, you'll find that Bill's comment in the bug is correct.

> Firefox development and would love some mentoring. Am I on the right
> track? (I'm not even sure I'm having a look at "the content process" as
> says dbaron). Any other suggestion very welcome!

It seems that you're starting on the right track.
--
Blake Kaplan
0 new messages