Closed
      
        Bug 832696
      
      
        Opened 12 years ago
          Closed 12 years ago
      
        
    
  
gfx gets prefs in the plugin process
Categories
(Core :: Graphics, defect)
        Core
          
        
        
      
        
    
        Graphics
          
        
        
      
        
    Tracking
()
        RESOLVED
        FIXED
        
    
  
        
            mozilla21
        
    
  
People
(Reporter: khuey, Assigned: bugs)
References
Details
Attachments
(1 file)
| 1.01 KB,
          patch         | jrmuizel
:
              
              review+ | Details | Diff | Splinter Review | 
In bug 619487 I'm adding assertions that we never get the preferences service off the main thread.  These asserts fire on the main thread in the plugin process because we never init the thread manager so NS_IsMainThread always returns false.
Does getting preferences do anything in the plugin process?  Do I need to fix my assertions, or is this a gfx problem?
 0  libxul.so!mozilla::Preferences::InitStaticMembers() [Preferences.cpp : 272 + 0x19]
    eip = 0x0115fd8f   esp = 0xbfca9470   ebp = 0xbfca9498   ebx = 0x031be0fc
    esi = 0xbfca94c8   edi = 0x09590370   eax = 0x00000000   ecx = 0x00c5a32c
    edx = 0x00000000   efl = 0x00010286
    Found by: given as instruction pointer in context
 1  libxul.so!mozilla::Preferences::GetInt(char const*, int*) [Preferences.cpp : 1183 + 0x4]
    eip = 0x0116083b   esp = 0xbfca94a0   ebp = 0xbfca94a8   ebx = 0x031be0fc
    esi = 0xbfca94c8   edi = 0x09590370
    Found by: call frame info
 2  libxul.so!gfxPlatform::GetCMSMode() [gfxPlatform.cpp : 1345 + 0x4]
    eip = 0x021e31be   esp = 0xbfca94b0   ebp = 0xbfca94d8   ebx = 0x031be0fc
    esi = 0xbfca9600   edi = 0x09590370
    Found by: call frame info
 3  libxul.so!gfxContext::SetColor(gfxRGBA const&) [gfxContext.cpp : 1265 + 0x4]
    eip = 0x021c9901   esp = 0xbfca94e0   ebp = 0xbfca9518   ebx = 0x031be0fc
    esi = 0xbfca9600   edi = 0x09590370
    Found by: call frame info
 4  libxul.so!mozilla::plugins::PluginInstanceChild::PaintRectToSurface(nsIntRect const&, gfxASurface*, gfxRGBA const&) [PluginInstanceChild.cpp : 3335 + 0x12]
    eip = 0x01ee6bd0   esp = 0xbfca9520   ebp = 0xbfca95b8   ebx = 0x031be0fc
    esi = 0xbfca9598   edi = 0x09590370
    Found by: call frame info
 5  libxul.so!mozilla::plugins::PluginInstanceChild::ShowPluginFrame() [PluginInstanceChild.cpp : 3612 + 0x4]
    eip = 0x01ee8284   esp = 0xbfca95c0   ebp = 0xbfca96f8   ebx = 0x031be0fc
    esi = 0x09592fc8   edi = 0xbfca96dc
    Found by: call frame info
 6  libxul.so!mozilla::plugins::PluginInstanceChild::InvalidateRectDelayed() [PluginInstanceChild.cpp : 3743 + 0x8]
    eip = 0x01ee8509   esp = 0xbfca9700   ebp = 0xbfca9718   ebx = 0x031be0fc
    esi = 0x09592ec0   edi = 0xbfcaa2b0
    Found by: call frame info
 7  libxul.so!RunnableMethod<mozilla::plugins::PluginInstanceChild, void (mozilla::plugins::PluginInstanceChild::*)(), Tuple0>::Run() [tuple.h : 383 + 0x12]
    eip = 0x01ee35b8   esp = 0xbfca9720   ebp = 0xbfca9738   ebx = 0x031be0fc
    esi = 0x09592100   edi = 0xbfcaa2b0
    Found by: call frame info
 8  libxul.so!MessageLoop::RunTask(Task*) [message_loop.cc : 333 + 0x8]
    eip = 0x0219f51a   esp = 0xbfca9740   ebp = 0xbfca9778   ebx = 0x031be0fc
    esi = 0x09592100   edi = 0xbfcaa2b0
    Found by: call frame info
 9  libxul.so!MessageLoop::DeferOrRunPendingTask(MessageLoop::PendingTask const&) [message_loop.cc : 341 + 0x9]
    eip = 0x021a10a0   esp = 0xbfca9780   ebp = 0xbfca9798   ebx = 0x031be0fc
    esi = 0x09516da8   edi = 0xbfca97e0
    Found by: call frame info
10  libxul.so!MessageLoop::DoWork() [message_loop.cc : 441 + 0xd]
    eip = 0x021a1254   esp = 0xbfca97a0   ebp = 0xbfca97f8   ebx = 0x031be0fc
    esi = 0x09516da8   edi = 0xbfca97e0
    Found by: call frame info
11  libxul.so!base::MessagePumpForUI::RunWithDispatcher(base::MessagePump::Delegate*, base::MessagePumpForUI::Dispatcher*) [message_pump_glib.cc : 199 + 0xa]
    eip = 0x021bc4f7   esp = 0xbfca9800   ebp = 0xbfca9868   ebx = 0x031be0fc
    esi = 0x0950eda8   edi = 0x00000001
    Found by: call frame info
12  libxul.so!base::MessagePumpForUI::Run(base::MessagePump::Delegate*) [message_pump_glib.h : 59 + 0xd]
    eip = 0x021bc274   esp = 0xbfca9870   ebp = 0xbfca9888   ebx = 0x031be0fc
    esi = 0xbfcaa2b0   edi = 0xbfcaa2b0
    Found by: call frame info
13  libxul.so!MessageLoop::RunInternal() [message_loop.cc : 215 + 0x8]
    eip = 0x0219f742   esp = 0xbfca9890   ebp = 0xbfca98b8   ebx = 0x031be0fc
    esi = 0xbfcaa2b0   edi = 0xbfcaa2b0
    Found by: call frame info
14  libxul.so!MessageLoop::Run() [message_loop.cc : 208 + 0x6]
    eip = 0x0219f767   esp = 0xbfca98c0   ebp = 0xbfca98e8   ebx = 0x031be0fc
    esi = 0xbfcaa2b0   edi = 0xbfcaa2b0
    Found by: call frame info
15  libxul.so!XRE_InitChildProcess [nsEmbedFunctions.cpp : 494 + 0x8]
    eip = 0x00f87c09   esp = 0xbfca98f0   ebp = 0xbfcaa408   ebx = 0x031be0fc
    esi = 0xbfcaa3e0   edi = 0xbfcaa2b0
    Found by: call frame info
Flags: needinfo?(benjamin)
| Comment 1•12 years ago
           | ||
This is definitely a GFX bug. The fact that we can even get to the prefservice in a plugin process (which doesn't have XPCOM) is kinda scary.
Flags: needinfo?(benjamin)
| Assignee | ||
| Comment 2•12 years ago
           | ||
It looks like we can use SetDeviceColor() instead of SetColor() here as there's no need for color management in the pluginchild usage (it's always either 100% white or black.) 
SetDeviceColor() doesn't need to look up the CMS preferences and gets us past the thread boundary issue.
        Attachment #706256 -
        Flags: review?(bugzmuiz)
| Assignee | ||
| Updated•12 years ago
           | 
        Attachment #706256 -
        Flags: review?(bugzmuiz) → review?(jmuizelaar)
| Updated•12 years ago
           | 
        Attachment #706256 -
        Flags: review?(jmuizelaar) → review+
| Reporter | ||
| Updated•12 years ago
           | 
Assignee: nobody → bugs
| Assignee | ||
| Comment 3•12 years ago
           | ||
| Comment 4•12 years ago
           | ||
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla21
          You need to log in
          before you can comment on or make changes to this bug.
        
Description
•