Changeset 43603 in webkit for trunk/JavaScriptCore/API


Ignore:
Timestamp:
May 12, 2009, 7:39:34 PM (16 years ago)
Author:
[email protected]
Message:

<rdar://problem/6879881> Crash occurs at JSC::JSActivation::mark() when loading http://www.monster.com; http://www.cnet.com
<https://bugs.webkit.org/show_bug.cgi?id=25736> Crash loading www.google.dk/ig (and other igoogle's as well)

Reviewed by Gavin Barraclough.

Following on from the lazy arguments creation patch, it's now
possible for an activation to to have a null register in the callframe
so we can't just blindly mark the local registers in an activation,
and must null check first instead.

Location:
trunk/JavaScriptCore/API/tests
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/API/tests/testapi.c

    r42315 r43603  
    700700}
    701701
     702static JSValueRef functionGC(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
     703{
     704    UNUSED_PARAM(function);
     705    UNUSED_PARAM(thisObject);
     706    UNUSED_PARAM(argumentCount);
     707    UNUSED_PARAM(arguments);
     708    UNUSED_PARAM(exception);
     709    JSGarbageCollect(context);
     710    return JSValueMakeUndefined(context);
     711}
     712
    702713static JSStaticValue globalObject_staticValues[] = {
    703714    { "globalStaticValue", globalObject_get, globalObject_set, kJSPropertyAttributeNone },
     
    707718static JSStaticFunction globalObject_staticFunctions[] = {
    708719    { "globalStaticFunction", globalObject_call, kJSPropertyAttributeNone },
     720    { "gc", functionGC, kJSPropertyAttributeNone },
    709721    { 0, 0, 0 }
    710722};
  • trunk/JavaScriptCore/API/tests/testapi.js

    r41931 r43603  
    2323 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    2424 */
     25
     26function bludgeonArguments() { if (0) arguments; return function g() {} }
     27h = bludgeonArguments();
     28gc();
     29
    2530var failed = false;
    2631function pass(msg)
Note: See TracChangeset for help on using the changeset viewer.