Changeset 15163 in webkit for trunk/JavaScriptCore/API/JSBase.h


Ignore:
Timestamp:
Jul 5, 2006, 9:52:54 AM (19 years ago)
Author:
ggaren
Message:

JavaScriptCore:

Reviewed by Maciej.

  • Return syntax error in JSCheckSyntax through a JSValueRef* exception argument


  • API/JSBase.h:
  • API/JSContextRef.cpp: (JSCheckSyntax):
  • API/testapi.c: (main):
  • JavaScriptCore.exp:
  • kjs/interpreter.cpp: (KJS::Interpreter::checkSyntax):
  • kjs/interpreter.h:

JavaScriptGlue:

Reviewed by Maciej.


  • JSRun.cpp: (JSRun::CheckSyntax): Updated to use new checkSyntax syntax in JSC.
  • JavaScriptGlue.xcodeproj/project.pbxproj:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/API/JSBase.h

    r15149 r15163  
    5353  @param sourceURL          URL to the file containing the JavaScript, or NULL - this is only used for error reporting
    5454  @param startingLineNumber the JavaScript's starting line number in the file located at sourceURL - this is only used for error reporting
    55   @param exception          pointer to a JSValueRef in which to store an uncaught exception, or NULL
     55  @param exception          pointer to a JSValueRef in which to store an uncaught exception, if any; can be NULL
    5656  @result                   result of evaluation, or NULL if an uncaught exception was thrown
    5757*/
     
    6060/*!
    6161  @function JSCheckSyntax
    62   Checks for syntax errors in a string of JavaScript code
    63   @param context execution context to use
    64   @param script a string containing the script source code
    65   @result true if the script is syntactically correct, false otherwise
     62  Check for syntax errors in a string of JavaScript
     63  @param context            execution context to use
     64  @param script             a character buffer containing the JavaScript to evaluate
     65  @param sourceURL          URL to the file containing the JavaScript, or NULL - this is only used for error reporting
     66  @param startingLineNumber the JavaScript's starting line number in the file located at sourceURL - this is only used for error reporting
     67  @param exception          pointer to a JSValueRef in which to store a syntax error, if any; can be NULL
     68  @result                   true if the script is syntactically correct, false otherwise
    6669
    6770*/
    68 bool JSCheckSyntax(JSContextRef context, JSCharBufferRef script);
     71bool JSCheckSyntax(JSContextRef context, JSCharBufferRef script, JSCharBufferRef sourceURL, int startingLineNumber, JSValueRef* exception);
    6972
    7073// Garbage collection
Note: See TracChangeset for help on using the changeset viewer.