Changeset 161229 in webkit


Ignore:
Timestamp:
Jan 2, 2014 2:43:57 PM (10 years ago)
Author:
mark.lam@apple.com
Message:

CStack: Interpreter::executeCall() should check for exceptions after calling callToNativeFunction().
https://bugs.webkit.org/show_bug.cgi?id=126405.

Not yet reviewed.

  • interpreter/Interpreter.cpp:

(JSC::Interpreter::executeCall):

  • executeCall() was expecting to return a non-null JSValue but neglected to check if an exception was thrown during a call to callToNativeFunction. We now check if an exception was thrown, and if so, we set the result to jsNull() the same way that JITCode::execute() does.
Location:
branches/jsCStack/Source/JavaScriptCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/jsCStack/Source/JavaScriptCore/ChangeLog

    r161225 r161229  
     12014-01-02  Mark Lam  <mark.lam@apple.com>
     2
     3        CStack: Interpreter::executeCall() should check for exceptions after calling callToNativeFunction().
     4        https://bugs.webkit.org/show_bug.cgi?id=126405.
     5
     6        Not yet reviewed.
     7
     8        * interpreter/Interpreter.cpp:
     9        (JSC::Interpreter::executeCall):
     10        - executeCall() was expecting to return a non-null JSValue but neglected
     11          to check if an exception was thrown during a call to callToNativeFunction.
     12          We now check if an exception was thrown, and if so, we set the result to
     13          jsNull() the same that JITCode::execute() does.
     14
    1152014-01-02  Filip Pizlo  <fpizlo@apple.com>
    216
  • branches/jsCStack/Source/JavaScriptCore/interpreter/Interpreter.cpp

    r161180 r161229  
    967967        if (isJSCall)
    968968            result = callData.js.functionExecutable->generatedJITCodeForCall()->execute(&vm, &protoCallFrame);
    969         else
     969        else {
    970970            result = JSValue::decode(callToNativeFunction(reinterpret_cast<void*>(callData.native.function), &vm, &protoCallFrame));
     971            if (callFrame->hadException())
     972                result = jsNull();
     973        }
    971974    }
    972975
Note: See TracChangeset for help on using the changeset viewer.