Closed
      
        Bug 236946
      
      
        Opened 21 years ago
          Closed 21 years ago
      
        
    
  
Small cleanup in nsXULElement 
    Categories
(Core :: DOM: Core & HTML, defect)
        Core
          
        
        
      
        
    
        DOM: Core & HTML
          
        
        
      
        
    Tracking
()
        RESOLVED
        FIXED
        
    
  
People
(Reporter: caillon, Assigned: caillon)
Details
Attachments
(1 file)
| 10.90 KB,
          patch         | jst
:
              
              review+ jst
:
              
              superreview+ | Details | Diff | Splinter Review | 
I saw a few places in nsXULElement which QI itself for no good reason, and a few
places which do |if (foo) bar = do_QueryInterface(foo)|, as well as some static
casts that can go which I have cleaned up.
|   | Assignee | |
| Comment 1•21 years ago
           | ||
|   | Assignee | |
| Updated•21 years ago
           | 
        Attachment #143429 -
        Flags: superreview?(jst)
        Attachment #143429 -
        Flags: review?(jst)
| Comment 2•21 years ago
           | ||
Comment on attachment 143429 [details] [diff] [review]
Patch
r+sr=jst
        Attachment #143429 -
        Flags: superreview?(jst)
        Attachment #143429 -
        Flags: superreview+
        Attachment #143429 -
        Flags: review?(jst)
        Attachment #143429 -
        Flags: review+
|   | Assignee | |
| Comment 3•21 years ago
           | ||
Checked in 03/09/2004 17:34 PST.
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
| Comment 4•21 years ago
           | ||
Comment on attachment 143429 [details] [diff] [review]
Patch
>-    *aResult = NS_REINTERPRET_CAST(nsIStyledContent*, element);
>+    *aResult = NS_REINTERPRET_CAST(nsIStyledContent*, element.get());
>     NS_ADDREF(*aResult);
Not cleaned up enough :-P
NS_ADDREF(*aResult = element);
He guys, I like to reopening this bug, but I'll wait for you to reply, because
it is causing me a lot of trouble. I keep crashing with
element.builder.rebuild() It still works in 20040308 but fails in all builds
with this patch. Here's a small code example:
          <menu label="&qpHTTPUserAgentSettings.label;">
            <menupopup id="UAgentMenu" datasources="rdf:null"
ref="urn:useragent-data" 
                       onpopupshowing="initUserAgentMenu(this);">
              <template>
                <rule>
                  <menuitem uri="rdf:*" label="rdf:*" type="radio"/>
                </rule>
              </template>
            </menupopup>
          </menu>
function initUserAgentMenu(aParent)
{
  aParent.builder.rebuild(); <= crash !!!
|   | Assignee | |
| Comment 7•21 years ago
           | ||
File a new bug.
| Updated•6 years ago
           | 
Component: DOM → DOM: Core & HTML
          You need to log in
          before you can comment on or make changes to this bug.
        
Description
•