Ignore:
Timestamp:
Sep 27, 2011, 1:16:37 PM (14 years ago)
Author:
[email protected]
Message:

Unreviewed, rolling out r96131.
http://trac.webkit.org/changeset/96131
https://bugs.webkit.org/show_bug.cgi?id=68927

It made 18+ tests crash on all platform (Requested by
Ossy_night on #webkit).

Patch by Sheriff Bot <[email protected]> on 2011-09-27

Source/JavaScriptCore:

(JSC::Interpreter::throwException):

  • interpreter/Interpreter.h:
  • jsc.cpp:

(GlobalObject::finishCreation):

  • parser/Parser.h:

(JSC::Parser::parse):

  • runtime/CommonIdentifiers.h:
  • runtime/Error.cpp:

(JSC::addErrorInfo):

  • runtime/Error.h:

LayoutTests:

  • fast/js/exception-properties-expected.txt:
  • fast/js/script-tests/exception-properties.js:
  • fast/js/script-tests/stack-trace.js: Removed.
  • fast/js/stack-trace-expected.txt: Removed.
  • fast/js/stack-trace.html: Removed.
  • platform/chromium/test_expectations.txt:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/interpreter/Interpreter.h

    r96131 r96146  
    3232#include "ArgList.h"
    3333#include "JSCell.h"
    34 #include "JSFunction.h"
    3534#include "JSValue.h"
    3635#include "JSObject.h"
     
    4443    class CodeBlock;
    4544    class EvalExecutable;
    46     class ExecutableBase;
    4745    class FunctionExecutable;
     46    class JSFunction;
    4847    class JSGlobalObject;
    4948    class ProgramExecutable;
     
    6261        WillLeaveCallFrame,
    6362        WillExecuteStatement
    64     };
    65 
    66     enum StackFrameCodeType {
    67         StackFrameGlobalCode,
    68         StackFrameEvalCode,
    69         StackFrameFunctionCode,
    70         StackFrameNativeCode
    71     };
    72 
    73     struct StackFrame {
    74         Strong<JSObject> callee;
    75         Strong<CallFrame> callFrame;
    76         StackFrameCodeType codeType;
    77         Strong<ExecutableBase> executable;
    78         int line;
    79         UString sourceURL;
    80         UString toString() const
    81         {
    82             bool hasSourceURLInfo = !sourceURL.isNull() && !sourceURL.isEmpty();
    83             bool hasLineInfo = line > -1;
    84             String traceLine;
    85             JSObject* stackFrameCallee = callee.get();
    86 
    87             switch (codeType) {
    88             case StackFrameEvalCode:
    89                 if (hasSourceURLInfo)
    90                     traceLine = hasLineInfo ? String::format("eval at %s:%d", sourceURL.ascii().data(), line)
    91                                             : String::format("eval at %s", sourceURL.ascii().data());
    92                 else
    93                     traceLine = String::format("eval");
    94                 break;
    95             case StackFrameNativeCode:
    96                 traceLine = "Native code";
    97                 break;
    98             case StackFrameFunctionCode:
    99                 if (stackFrameCallee && stackFrameCallee->inherits(&JSFunction::s_info)) {
    100                     UString functionName = asFunction(stackFrameCallee)->name(callFrame.get());
    101                     if (hasSourceURLInfo)
    102                         traceLine = hasLineInfo ? String::format("%s at %s:%d", functionName.ascii().data(), sourceURL.ascii().data(), line)
    103                                                 : String::format("%s at %s", functionName.ascii().data(), sourceURL.ascii().data());
    104                     else
    105                         traceLine = String::format("%s\n", functionName.ascii().data());
    106                     break;
    107                 }
    108             case StackFrameGlobalCode:
    109                 traceLine = hasLineInfo ? String::format("at %s:%d", sourceURL.ascii().data(), line)
    110                                         : String::format("at %s", sourceURL.ascii().data());
    111             }
    112             return traceLine.impl();
    113         }
    11463    };
    11564
     
    180129        NEVER_INLINE HandlerInfo* throwException(CallFrame*&, JSValue&, unsigned bytecodeOffset);
    181130        NEVER_INLINE void debug(CallFrame*, DebugHookID, int firstLine, int lastLine);
    182         static const UString getTraceLine(CallFrame*, StackFrameCodeType, const UString&, int);
    183         static void getStackTrace(JSGlobalData*, int line, Vector<StackFrame>& results);
    184131
    185132        void dumpSampleData(ExecState* exec);
Note: See TracChangeset for help on using the changeset viewer.