Skip to content
  • barraclough@apple.com's avatar
    Bug 49488 - Only add source specific information to exceptions in Interpreter::throwException · e979a658
    barraclough@apple.com authored
    Reviewed by Geoff Garen.
    
    JavaScriptCore: 
    
    Three types of source location information are added to errors.
    
    (1) Divot information.
    
    This was added with the intention of using it to provide better source highlighting in the inspector.
    We may still want to do so, but we probably should not be exposing these values in a manner visible to
    user scripts – only through an internal C++ interface. The code adding divot properties to objects has
    been removed.
    
    (2) Line number information.
    
    Line number information is presently sometimes added at the point the exception is created, and sometimes
    added at the point the exception passes through throwException. Change this so that throwException has
    the sole responsibility for adding line number and source file information.
    
    (3) Source snippets in the message of certain type errors (e.g. 'doc' in `Result of expression 'doc' [undefined] is not an object.`).
    
    These messages ar...
    e979a658