Changeset 35245 in webkit for trunk/JavaScriptCore/kjs/Parser.h


Ignore:
Timestamp:
Jul 18, 2008, 6:44:24 PM (17 years ago)
Author:
[email protected]
Message:

Bug 18774: SQUIRRELFISH: print meaningful error messages <https://bugs.webkit.org/show_bug.cgi?id=18774>
<rdar://problem/5769353> SQUIRRELFISH: JavaScript error messages are missing informative text

Reviewed by Cameron Zwarich

Add support for decent error messages in JavaScript. This patch achieves this by providing
ensuring the common errors and exceptions have messages that provide the text of expression
that trigger the exception. In addition it attaches a number of properties to the exception
object detailing where in the source the expression came from.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/kjs/Parser.h

    r35037 r35245  
    8181    {
    8282        m_sourceURL = sourceURL;
    83         parse(exec, sourceURL, startingLineNumber, source, sourceId, errLine, errMsg);
     83        RefPtr<SourceProvider> sourceProvider = source;
     84        parse(exec, sourceURL, startingLineNumber, sourceProvider.get(), sourceId, errLine, errMsg);
    8485        if (!m_sourceElements) {
    8586            m_sourceURL = UString();
     
    9091                                                     m_varDeclarations ? &m_varDeclarations->data : 0,
    9192                                                     m_funcDeclarations ? &m_funcDeclarations->data : 0,
     93                                                     sourceProvider.get(),
    9294                                                     m_usesEval,
    9395                                                     m_needsClosure);
Note: See TracChangeset for help on using the changeset viewer.