Changeset 29335 in webkit


Ignore:
Timestamp:
Jan 8, 2008 8:49:23 PM (16 years ago)
Author:
timothy@apple.com
Message:

Reviewed by Brady.

Bug 16678: Unreproducible crash in KJS::JSObject::inherits() after using Web Inspector
http://bugs.webkit.org/show_bug.cgi?id=16678

Add a NULL check for controller before calling JSObjectSetPrivate.

  • page/InspectorController.cpp: (WebCore::InspectorController::~InspectorController):
Location:
trunk/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r29334 r29335  
     12008-01-08  Timothy Hatcher  <timothy@apple.com>
     2
     3        Reviewed by Brady.
     4
     5        Bug 16678: Unreproducible crash in KJS::JSObject::inherits() after using Web Inspector
     6        http://bugs.webkit.org/show_bug.cgi?id=16678
     7
     8        Add a NULL check for controller before calling JSObjectSetPrivate.
     9
     10        * page/InspectorController.cpp:
     11        (WebCore::InspectorController::~InspectorController):
     12
    1132008-01-08  Xan Lopez  <xan@gnome.org>
    214
  • trunk/WebCore/page/InspectorController.cpp

    r29333 r29335  
    595595        JSRetainPtr<JSStringRef> controllerProperty(Adopt, JSStringCreateWithUTF8CString("InspectorController"));
    596596        JSObjectRef controller = JSValueToObject(m_scriptContext, JSObjectGetProperty(m_scriptContext, global, controllerProperty.get(), 0), 0);
    597         JSObjectSetPrivate(controller, 0);
     597        if (controller)
     598            JSObjectSetPrivate(controller, 0);
    598599    }
    599600
Note: See TracChangeset for help on using the changeset viewer.