Changeset 41895 in webkit for trunk/JavaScriptCore/API


Ignore:
Timestamp:
Mar 21, 2009, 7:52:41 PM (16 years ago)
Author:
[email protected]
Message:

Ensure that JSObjectMakeFunction doesn't produce incorrect line numbers.

Reviewed by Cameron Zwarich.

Also make test api correctly propagate failures.

File:
1 edited

Legend:

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

    r41893 r41895  
    860860   
    861861    string = JSValueToStringCopy(context, function, NULL);
    862     assertEqualsAsUTF8String(JSValueMakeString(context, string), "function foo(foo) {\nreturn foo;\n}");
     862    assertEqualsAsUTF8String(JSValueMakeString(context, string), "function foo(foo) { return foo;\n}");
    863863    JSStringRelease(string);
    864864
     
    968968
    969969    char* scriptUTF8 = createStringWithContentsOfFile(scriptPath);
    970     if (!scriptUTF8)
     970    if (!scriptUTF8) {
    971971        printf("FAIL: Test script could not be loaded.\n");
    972     else {
     972        failed = 1;
     973    } else {
    973974        script = JSStringCreateWithUTF8CString(scriptUTF8);
    974975        result = JSEvaluateScript(context, script, NULL, NULL, 1, &exception);
     
    982983            CFRelease(exceptionCF);
    983984            JSStringRelease(exceptionIString);
     985            failed = 1;
    984986        }
    985987        JSStringRelease(script);
Note: See TracChangeset for help on using the changeset viewer.