Changeset 217695 in webkit


Ignore:
Timestamp:
Jun 1, 2017 9:35:25 PM (7 years ago)
Author:
Chris Dumez
Message:

REGRESSION (r206386): Xactimate Website Crashes @ com.apple.WebKit: WebKit::NPRuntimeObjectMap::convertJSValueToNPVariant + 255
https://bugs.webkit.org/show_bug.cgi?id=172846
<rdar://problem/31093005>

Reviewed by Andreas Kling.

In NPJSObject::invoke(), return early if there was an exception when calling JSC::call().
Using the value returned by JSC::call() when an exception occurred is unsafe.

  • WebProcess/Plugins/Netscape/NPJSObject.cpp:

(WebKit::NPJSObject::invoke):

Location:
trunk/Source/WebKit2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r217681 r217695  
     12017-06-01  Chris Dumez  <cdumez@apple.com>
     2
     3        REGRESSION (r206386): Xactimate Website Crashes @ com.apple.WebKit: WebKit::NPRuntimeObjectMap::convertJSValueToNPVariant + 255
     4        https://bugs.webkit.org/show_bug.cgi?id=172846
     5        <rdar://problem/31093005>
     6
     7        Reviewed by Andreas Kling.
     8
     9        In NPJSObject::invoke(), return early if there was an exception when calling JSC::call().
     10        Using the value returned by JSC::call() when an exception occurred is unsafe.
     11
     12        * WebProcess/Plugins/Netscape/NPJSObject.cpp:
     13        (WebKit::NPJSObject::invoke):
     14
    1152017-06-01  Jon Lee  <jonlee@apple.com>
    216
  • trunk/Source/WebKit2/WebProcess/Plugins/Netscape/NPJSObject.cpp

    r211247 r217695  
    312312    JSValue value = JSC::call(exec, function, callType, callData, m_jsObject.get(), argumentList);
    313313
     314    if (UNLIKELY(scope.exception())) {
     315        scope.clearException();
     316        return false;
     317    }
     318
    314319    // Convert and return the result of the function call.
    315320    m_objectMap->convertJSValueToNPVariant(exec, value, *result);
    316     scope.clearException();
    317321   
    318322    return true;
Note: See TracChangeset for help on using the changeset viewer.