Ignore:
Timestamp:
Aug 2, 2013, 5:04:41 PM (12 years ago)
Author:
[email protected]
Message:

Give the error object's stack property accessor attributes.
https://bugs.webkit.org/show_bug.cgi?id=119404

Source/JavaScriptCore:

Patch by Chris Curtis <[email protected]> on 2013-08-02
Reviewed by Geoffrey Garen.

Changed the attributes of error object's stack property to allow developers to write
and delete the stack property. This will match the functionality of Chrome. Firefox
allows developers to write the error's stack, but not delete it.

  • interpreter/Interpreter.cpp:

(JSC::Interpreter::addStackTraceIfNecessary):

  • runtime/ErrorInstance.cpp:

(JSC::ErrorInstance::finishCreation):

LayoutTests:

Patch by Chris Curtis <[email protected]> on 2013-08-02
Reviewed by Geoffrey Garen.

  • fast/dom/DOMException/stack-trace-expected.txt:

New tests to show that the error object's stack property is writable and deleteable.

  • fast/js/error-object-write-and-detele-for-stack-property-expected.txt: Added.
  • fast/js/error-object-write-and-detele-for-stack-property.html: Added.
File:
1 edited

Legend:

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

    r153669 r153679  
    584584        return;
    585585   
    586     asObject(error)->putDirect(*vm, vm->propertyNames->stack, vm->interpreter->stackTraceAsString(vm->topCallFrame, stackTrace), ReadOnly | DontDelete);
     586    asObject(error)->putDirect(*vm, vm->propertyNames->stack, vm->interpreter->stackTraceAsString(vm->topCallFrame, stackTrace), None);
    587587
    588588}
Note: See TracChangeset for help on using the changeset viewer.