Changeset 125513 in webkit


Ignore:
Timestamp:
Aug 14, 2012 12:22:31 AM (12 years ago)
Author:
commit-queue@webkit.org
Message:

regression(r124510) webintents/web-intents-obj-constructor.html is crashing
https://bugs.webkit.org/show_bug.cgi?id=93096

Patch by Christophe Dumez <Christophe Dumez> on 2012-08-14
Reviewed by Kentaro Hara.

Source/WebCore:

Add null-check for JSC::ExecState pointer in JSDictionary constructor
before using it. The exec may indeed be null, thus causing crashes.

No new test, already tested by webintents/web-intents-obj-constructor.html

  • bindings/js/JSDictionary.cpp:

(WebCore::JSDictionary::tryGetProperty):
(WebCore::JSDictionary::getWithUndefinedOrNullCheck):

  • bindings/js/JSDictionary.h:

(WebCore::JSDictionary::JSDictionary):

LayoutTests:

Unskip webintents/web-intents-obj-constructor.html now that the
crash is fixed in WebCore.

  • platform/efl-wk2/TestExpectations:
  • platform/efl/TestExpectations:
Location:
trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r125510 r125513  
     12012-08-14  Christophe Dumez  <christophe.dumez@intel.com>
     2
     3        regression(r124510) webintents/web-intents-obj-constructor.html is crashing
     4        https://bugs.webkit.org/show_bug.cgi?id=93096
     5
     6        Reviewed by Kentaro Hara.
     7
     8        Unskip webintents/web-intents-obj-constructor.html now that the
     9        crash is fixed in WebCore.
     10
     11        * platform/efl-wk2/TestExpectations:
     12        * platform/efl/TestExpectations:
     13
    1142012-08-13  Zan Dobersek  <zandobersek@gmail.com>
    215
  • trunk/LayoutTests/platform/efl-wk2/TestExpectations

    r125423 r125513  
    282282// WTR does not print information about Web Intents MessagePorts
    283283BUGWK89072 : webintents/web-intents-invoke-port.html = TEXT
    284 BUGWK89072 : webintents/web-intents-obj-constructor.html = CRASH
    285 
     284BUGWK89072 : webintents/web-intents-obj-constructor.html = TEXT
     285
  • trunk/LayoutTests/platform/efl/TestExpectations

    r125437 r125513  
    147147//////////////////////////////////////////////////////////////////////////////////////////
    148148
    149 BUGWK93096 : webintents/web-intents-obj-constructor.html = CRASH
    150149BUGWK93654 DEBUG : fast/events/keyevent-iframe-removed-crash.html = CRASH
    151150
  • trunk/Source/WebCore/ChangeLog

    r125507 r125513  
     12012-08-14  Christophe Dumez  <christophe.dumez@intel.com>
     2
     3        regression(r124510) webintents/web-intents-obj-constructor.html is crashing
     4        https://bugs.webkit.org/show_bug.cgi?id=93096
     5
     6        Reviewed by Kentaro Hara.
     7
     8        Add null-check for JSC::ExecState pointer in JSDictionary constructor
     9        before using it. The exec may indeed be null, thus causing crashes.
     10
     11        No new test, already tested by webintents/web-intents-obj-constructor.html
     12
     13        * bindings/js/JSDictionary.cpp:
     14        (WebCore::JSDictionary::tryGetProperty):
     15        (WebCore::JSDictionary::getWithUndefinedOrNullCheck):
     16        * bindings/js/JSDictionary.h:
     17        (WebCore::JSDictionary::JSDictionary):
     18
    1192012-08-13  Keishi Hattori  <keishi@webkit.org>
    220
  • trunk/Source/WebCore/bindings/js/JSDictionary.cpp

    r124510 r125513  
    4747JSDictionary::GetPropertyResult JSDictionary::tryGetProperty(const char* propertyName, JSValue& finalResult) const
    4848{
     49    ASSERT(isValid());
    4950    Identifier identifier(m_exec, propertyName);
    5051    PropertySlot slot(m_initializerObject.get());
     
    197198bool JSDictionary::getWithUndefinedOrNullCheck(const String& propertyName, String& result) const
    198199{
     200    ASSERT(isValid());
    199201    JSValue value;
    200202    if (tryGetProperty(propertyName.utf8().data(), value) != PropertyFound || value.isUndefinedOrNull())
  • trunk/Source/WebCore/bindings/js/JSDictionary.h

    r124510 r125513  
    4949    JSDictionary(JSC::ExecState* exec, JSC::JSObject* initializerObject)
    5050        : m_exec(exec)
    51         , m_initializerObject(exec->globalData(), initializerObject)
    5251    {
     52        if (exec && initializerObject)
     53            m_initializerObject = JSC::Strong<JSC::JSObject>(exec->globalData(), initializerObject);
    5354    }
    5455
Note: See TracChangeset for help on using the changeset viewer.