Changeset 15404 in webkit for trunk/JavaScriptCore/API/minidom.c


Ignore:
Timestamp:
Jul 13, 2006, 1:56:52 AM (19 years ago)
Author:
ggaren
Message:

Pleasing to Maciej.


  • Renamed JSEvaluate -> JSEvaluateScript, JSCheckSyntax -> JSCheckScriptSyntax
  • Added exception out parameters to JSValueTo* and JSValueIsEqual because they can throw
  • Removed JSObjectGetDescription because it's useless and vague, and JSValueToString/JSValueIsObjectOfClass do a better job, anyway
  • Clarified comments about "IsFunction/Constructor" to indicate that they are true of all functions/constructors, not just those created by JSObjectMake*
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/API/minidom.c

    r15376 r15404  
    5151    JSStringRef script = JSStringCreateWithUTF8CString(scriptUTF8);
    5252    JSValueRef exception;
    53     JSValueRef result = JSEvaluate(context, script, NULL, NULL, 0, &exception);
     53    JSValueRef result = JSEvaluateScript(context, script, NULL, NULL, 0, &exception);
    5454    if (result)
    5555        printf("PASS: Test script executed successfully.\n");
    5656    else {
    5757        printf("FAIL: Test script threw exception:\n");
    58         JSStringRef exceptionIString = JSValueToStringCopy(context, exception);
     58        JSStringRef exceptionIString = JSValueToStringCopy(context, exception, NULL);
    5959        CFStringRef exceptionCF = JSStringCopyCFString(kCFAllocatorDefault, exceptionIString);
    6060        CFShow(exceptionCF);
     
    8282{
    8383    if (argc > 0) {
    84         JSStringRef string = JSValueToStringCopy(context, argv[0]);
     84        JSStringRef string = JSValueToStringCopy(context, argv[0], NULL);
    8585        size_t numChars = JSStringGetMaximumUTF8CStringSize(string);
    8686        char stringUTF8[numChars];
Note: See TracChangeset for help on using the changeset viewer.