Changeset 91116 in webkit


Ignore:
Timestamp:
Jul 15, 2011 3:03:09 PM (13 years ago)
Author:
barraclough@apple.com
Message:

NativeError.prototype objects have Class? of "Object" but should be "Error"
https://bugs.webkit.org/show_bug.cgi?id=55346

Reviewed by Sam Weinig.

Source/JavaScriptCore:

  • runtime/ErrorPrototype.cpp:

(JSC::ErrorPrototype::ErrorPrototype):

  • Switch to putDirect since we're not the only ones tranitioning this Structure now.
  • runtime/NativeErrorPrototype.cpp:

(JSC::NativeErrorPrototype::NativeErrorPrototype):

  • runtime/NativeErrorPrototype.h:
    • Switch base class to ErrorPrototype.

LayoutTests:

Added test case.

  • fast/js/native-error-prototype-expected.txt: Added.
  • fast/js/native-error-prototype.html: Added.
  • fast/js/script-tests/native-error-prototype.js: Added.
Location:
trunk
Files:
3 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r91114 r91116  
     12011-07-15  Gavin Barraclough  <barraclough@apple.com>
     2
     3        NativeError.prototype objects have [[Class]] of "Object" but should be "Error"
     4        https://bugs.webkit.org/show_bug.cgi?id=55346
     5
     6        Reviewed by Sam Weinig.
     7
     8        Added test case.
     9
     10        * fast/js/native-error-prototype-expected.txt: Added.
     11        * fast/js/native-error-prototype.html: Added.
     12        * fast/js/script-tests/native-error-prototype.js: Added.
     13
    1142011-06-27  Adrienne Walker  <enne@google.com>
    215
  • trunk/Source/JavaScriptCore/ChangeLog

    r91115 r91116  
     12011-07-15  Gavin Barraclough  <barraclough@apple.com>
     2
     3        NativeError.prototype objects have [[Class]] of "Object" but should be "Error"
     4        https://bugs.webkit.org/show_bug.cgi?id=55346
     5
     6        Reviewed by Sam Weinig.
     7
     8        * runtime/ErrorPrototype.cpp:
     9        (JSC::ErrorPrototype::ErrorPrototype):
     10            - Switch to putDirect since we're not the only ones tranitioning this Structure now.
     11        * runtime/NativeErrorPrototype.cpp:
     12        (JSC::NativeErrorPrototype::NativeErrorPrototype):
     13        * runtime/NativeErrorPrototype.h:
     14            - Switch base class to ErrorPrototype.
     15
    1162011-07-15  Gavin Barraclough  <barraclough@apple.com>
    217
  • trunk/Source/JavaScriptCore/runtime/ErrorPrototype.cpp

    r86730 r91116  
    5454    : ErrorInstance(&exec->globalData(), structure)
    5555{
    56     putDirectWithoutTransition(exec->globalData(), exec->propertyNames().name, jsNontrivialString(exec, "Error"), DontEnum);
     56    putDirect(exec->globalData(), exec->propertyNames().name, jsNontrivialString(exec, "Error"), DontEnum);
    5757
    5858    ASSERT(inherits(&s_info));
  • trunk/Source/JavaScriptCore/runtime/NativeErrorPrototype.cpp

    r88559 r91116  
    2222#include "NativeErrorPrototype.h"
    2323
    24 #include "ErrorPrototype.h"
    2524#include "JSGlobalObject.h"
    2625#include "JSString.h"
     
    3332
    3433NativeErrorPrototype::NativeErrorPrototype(ExecState* exec, JSGlobalObject* globalObject, Structure* structure, const UString& nameAndMessage, NativeErrorConstructor* constructor)
    35     : JSObjectWithGlobalObject(globalObject, structure)
     34    : ErrorPrototype(exec, globalObject, structure)
    3635{
    3736    putDirect(exec->globalData(), exec->propertyNames().name, jsString(exec, nameAndMessage), DontEnum);
  • trunk/Source/JavaScriptCore/runtime/NativeErrorPrototype.h

    r84052 r91116  
    2222#define NativeErrorPrototype_h
    2323
    24 #include "JSObjectWithGlobalObject.h"
     24#include "ErrorPrototype.h"
    2525
    2626namespace JSC {
    2727    class NativeErrorConstructor;
    2828
    29     class NativeErrorPrototype : public JSObjectWithGlobalObject {
     29    class NativeErrorPrototype : public ErrorPrototype {
    3030    public:
    3131        NativeErrorPrototype(ExecState*, JSGlobalObject*, Structure*, const UString&, NativeErrorConstructor*);
Note: See TracChangeset for help on using the changeset viewer.