[Webkit-unassigned] [Bug 74811] New: 'this' object is sometimes the DOMWindow when it shouldn't be

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Dec 18 09:57:00 PST 2011


https://bugs.webkit.org/show_bug.cgi?id=74811

           Summary: 'this' object is sometimes the DOMWindow when it
                    shouldn't be
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: Unspecified
        OS/Version: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: JavaScriptCore
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: timothy at apple.com
                CC: timothy at apple.com, ggaren at apple.com, oliver at apple.com,
                    barraclough at apple.com, msaboff at apple.com,
                    mhahnenberg at apple.com


I've been hitting an odd bug in the Web Inspector's TreeOutline (very old and stable code) that calls a function on this, but the this object inside the function is sometimes the window and not the 'this' from the callee.

Changing the code from:

this.onpopulate();

To:

this.onpopulate.call(this);

Which fixes it 100%. Otherwise it only works fine 95-99% of the time, and randomly seems to forget the 'this' object.

This is with TOT r103101.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list